This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A375519 #19 Aug 28 2024 16:37:04 %S A375519 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, %T A375519 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, %U A375519 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 %N A375519 Number of positive integers with Pisano period equal to n. %C A375519 See also A375089, which is the main entry. %C A375519 [This was the version of A375089 that was originally submitted. I think both belong in the OEIS. - _N. J. A. Sloane_, Aug 28 2024] %F A375519 a(2n) = A375089(n). - _Chai Wah Wu_, Aug 28 2024 %o A375519 (Python) %o A375519 from functools import lru_cache %o A375519 from math import gcd, lcm %o A375519 from sympy import factorint, divisors, fibonacci %o A375519 def A375519(n): %o A375519 @lru_cache(maxsize=None) %o A375519 def A001175(n): %o A375519 if n == 1: %o A375519 return 1 %o A375519 f = factorint(n).items() %o A375519 if len(f) > 1: %o A375519 return lcm(*(A001175(a**b) for a,b in f)) %o A375519 else: %o A375519 k,x = 1, (1,1) %o A375519 while x != (0,1): %o A375519 k += 1 %o A375519 x = (x[1], (x[0]+x[1]) % n) %o A375519 return k %o A375519 a, b = fibonacci(n+1), fibonacci(n) %o A375519 return sum(1 for d in divisors(gcd(a-1,b),generator=True) if A001175(d)==n) # _Chai Wah Wu_, Aug 28 2024 %Y A375519 Cf. A001175, A375089. %K A375519 nonn %O A375519 1,18 %A A375519 _Oliver Lippard_ and _Brennan G. Benfield_, Jul 29 2024