cp's OEIS Frontend

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.

A375519 Number of positive integers with Pisano period equal to n.

Original entry on oeis.org

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

Views

Author

Keywords

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]

Crossrefs

Programs

  • 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

Formula

a(2n) = A375089(n). - Chai Wah Wu, Aug 28 2024