Python Forum
Stuck with using lists to solve task
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stuck with using lists to solve task
#6
(Jan-16-2024, 06:57 AM)DPaul Wrote: I'm interested in the result, so here is my solution (True = open),
Anybody. ? Wink
I think the result is True if the number of divisors of n is odd. The number of divisors of a number is given by the sequence https://oeis.org/A000005. This page says
oeis.org Wrote:a(n) is odd iff n is a square.
All of this needs to be clarified.

This page also contains a python code that uses sympy to get the number of divisors of a number.
« We can solve any problem by introducing an extra level of indirection »
Reply


Messages In This Thread
Stuck with using lists to solve task - by gery576 - Jan-15-2024, 11:03 AM
RE: Stuck with using lists to solve task - by DPaul - Jan-16-2024, 06:57 AM
RE: Stuck with using lists to solve task - by Gribouillis - Jan-16-2024, 08:33 AM
RE: Stuck with using lists to solve task - by DPaul - Jan-16-2024, 08:44 AM
RE: Stuck with using lists to solve task - by DPaul - Jan-16-2024, 06:29 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to solve this task? DERO 2 1,909 Dec-06-2021, 07:15 PM
Last Post: BashBedlam
  simple task with lists... Maxwell123 3 2,491 Jun-27-2020, 01:00 PM
Last Post: GOTO10
  I need help to solve this task using while statement rico4pepe 6 9,438 Apr-02-2020, 11:34 AM
Last Post: pyzyx3qwerty

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020