login
A375519
Number of positive integers with Pisano period equal to n.
2
1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 3, 0, 2, 0, 1, 0, 10, 0, 1, 0, 2, 0, 8, 0, 4, 0, 1, 0, 9, 0, 1, 0, 11, 0, 8, 0, 2, 0, 3, 0, 55, 0, 6, 0, 2, 0, 6, 0, 11, 0, 3, 0, 49, 0, 1, 0, 8, 0, 8, 0, 2, 0, 13, 0, 133, 0, 1, 0, 6, 0, 20, 0, 46, 0, 1, 0, 49, 0, 3, 0, 27, 0, 81, 0, 4, 0, 10, 260, 0, 2, 0, 38
OFFSET
1,18
COMMENTS
See also A375089, which is the main entry.
[This was the version of A375089 that was originally submitted. I think both belong in the OEIS. - N. J. A. Sloane, Aug 28 2024]
FORMULA
a(2n) = A375089(n). - Chai Wah Wu, Aug 28 2024
PROG
(Python)
from functools import lru_cache
from math import gcd, lcm
from sympy import factorint, divisors, fibonacci
def A375519(n):
@lru_cache(maxsize=None)
def A001175(n):
if n == 1:
return 1
f = factorint(n).items()
if len(f) > 1:
return lcm(*(A001175(a**b) for a, b in f))
else:
k, x = 1, (1, 1)
while x != (0, 1):
k += 1
x = (x[1], (x[0]+x[1]) % n)
return k
a, b = fibonacci(n+1), fibonacci(n)
return sum(1 for d in divisors(gcd(a-1, b), generator=True) if A001175(d)==n) # Chai Wah Wu, Aug 28 2024
CROSSREFS
Sequence in context: A095704 A351964 A163496 * A092241 A336124 A256580
KEYWORD
nonn
AUTHOR
STATUS
approved