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.

User: Brennan G. Benfield

Brennan G. Benfield's wiki page.

Brennan G. Benfield has authored 6 sequences.

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

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

A375089 Number of positive integers with Pisano period equal to 2n.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 1, 2, 3, 2, 1, 10, 1, 2, 8, 4, 1, 9, 1, 11, 8, 2, 3, 55, 6, 2, 6, 11, 3, 49, 1, 8, 8, 2, 13, 133, 1, 6, 20, 46, 1, 49, 3, 27, 81, 4, 1, 260, 2, 38, 20, 11, 1, 106, 21, 78, 20, 4, 7, 874, 1, 6, 81, 48, 29, 49, 3, 27, 42, 108, 1, 1319, 3, 14, 174, 23, 13, 101, 1, 444
Offset: 1

Author

Keywords

Comments

a(n) = 0 for all odd values n > 3 since the Pisano period of m is always even except when m=1 or 2.
The Pisano period of m divides n if and only if F_m = 0 (mod n) and F_{m+1} = 1 (mod n), hence n | gcd(F_m,F_{m+1}-1).
Conjecture: If n is of the form 12*5^j (i.e. 2n is of the form 24*5^j which has the unique property that pi(2n)=2n), then a(n) > a(m) for all m < n.
Conjecture: Every natural number appears on this list.

Examples

			a(9) = 3 because the Pisano periods of 76, 38, and 19, but no others, are 2*9=18.
There are no numbers with Pisano period 2 or 4, so a(1) = a(2) = 0.
		

Crossrefs

See A375519 for the "equal to n" version.

Programs

  • Python
    from functools import lru_cache
    from math import gcd, lcm
    from sympy import factorint, divisors, fibonacci
    def A375089(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((m:=n<<1)+1), fibonacci(m)
        return sum(1 for d in divisors(gcd(a-1,b),generator=True) if A001175(d)==m) # Chai Wah Wu, Aug 28 2024
  • Sage
    def a(n):
        num=0
        if n<3:
            return 0
        x=gcd(fibonacci(2*n),fibonacci(2*n+1)-1)
        for d in divisors(x):
            if BinaryRecurrenceSequence(1,1,0,1).period(d)==2*n:
                num+=1
        return num
    for i in range(1,101):
        print(a(i))
    

A374486 Numbers k such that Taxicab(2,j,k) exists for large j.

Original entry on oeis.org

1, 2, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30, 31, 33, 37, 39, 40, 42, 44, 48, 50, 51, 52, 53, 56, 59, 62, 66, 68, 70, 72, 74, 77, 79, 87, 91, 92, 96, 97, 103, 108, 112, 115, 117, 120, 121, 124, 130, 131, 138, 148, 149, 161, 164, 176, 184, 185, 194, 200
Offset: 1

Author

Keywords

Comments

Here Taxicab(2,j,k) denotes the smallest number (if it exists) that is the sum of j perfect squares in exactly k ways. For sufficiently large N, Taxicab(2,j,k) either always exists for j > N or always does not exist for j > N.
Conjecture: Infinitely many positive integers are in this sequence, and infinitely many positive integers are not in this sequence.
Conjecture: This sequence grows exponentially. Computationally it appears to have asymptotic a(n) = 1.03691*exp(0.594473*n^(1/2)).

Examples

			For k = 3, Taxicab(2,j,3) does not exist for all j > 9, hence 3 is not a member of the sequence.
		

References

  • E. Grosswald. Representations of Integers as Sums of Squares. Springer New York, NY, 1985.

Crossrefs

A375018 Numbers k such that repeated application of the Pisano period eventually gives 24.

Original entry on oeis.org

2, 3, 4, 6, 7, 8, 9, 12, 13, 14, 16, 17, 18, 19, 21, 23, 24, 26, 27, 28, 29, 32, 34, 36, 37, 38, 39, 42, 46, 47, 48, 49, 51, 52, 53, 54, 56, 57, 58, 59, 63, 64, 67, 68, 69, 72, 73, 74, 76, 78, 79, 81, 83, 84, 87, 91, 92, 94, 96, 97, 98
Offset: 1

Author

Keywords

Comments

This sequence is infinite. A number n is a fixed point if the Pisano period of n is equal to n. The trajectory of k is the sequence of values the Pisano period takes on under repeated iteration, starting at k and leading to a fixed point; this sequence is the sequence of integers such that the trajectory leads to 24.

Examples

			a(1)=2 because 2 is the smallest number with Pisano period trajectory terminating at 24: pi(2)=3, pi(3)=8, pi(8)=12, pi(12)=24.
		

Crossrefs

Cf. A001175.

Programs

  • Sage
    L=[]
    for i in range(2,101):
        a=i
        y=BinaryRecurrenceSequence(1,1,0,1).period(Integer(i))
        while a!=y:
            a=y
            y=BinaryRecurrenceSequence(1,1,0,1).period(Integer(a))
        if a==24:
            L.append(i)
    print(L)

A352083 Numbers k such that (3^k - k^3)/2 is prime.

Original entry on oeis.org

5, 13, 205, 409, 413, 545, 88649
Offset: 1

Author

Brennan G. Benfield, Mar 03 2022

Keywords

Comments

All terms must be odd. - Michael S. Branicky, Mar 03 2022
No further terms less than 25000. - Michael S. Branicky, Mar 04 2022

Examples

			5 is a term since (3^5 - 5^3)/2 = 59 is prime.
		

Programs

  • Mathematica
    Select[Range[1, 600, 2], PrimeQ[(3^# - #^3)/2] &] (* Amiram Eldar, Mar 03 2022 *)
  • PARI
    isok(k) = if (denominator(x=(3^k-k^3)/2) == 1, ispseudoprime(x)); \\ Michel Marcus, Mar 03 2022
    
  • Python
    from sympy import isprime
    def afind(limit):
        for k in range(1, limit+1, 2):
            if isprime((3**k - k**3)//2):
                print(k, end=", ")
    afind(1000) # Michael S. Branicky, Mar 03 2022
  • Sage
    for n in srange(1,10000):
                 if ((3^n-n^3)//2).is_prime():
                      print(n)
    

Extensions

a(7) from Michael S. Branicky, Oct 03 2024

A346160 a(n) is the smallest K such that the power partition function P_n(k) is log-concave for all k > K.

Original entry on oeis.org

0, 25, 1041, 15655, 637854, 2507860, 35577568
Offset: 0

Author

Brennan G. Benfield, Sep 28 2021

Keywords

Comments

The power partition function P_n(k) is a restriction on the partition function. P_n(k) equals the number of ways a positive integer k can be written as the sum of perfect n powers. DeSalvo and Pak showed that the partition function (P_1(k)) is log-concave for all k > 24.

Examples

			For n=0, P_0(k)^2 >= P_0(k-1)*P_0(k+1) for all k > 0.
For n=1, P_1(k)^2 >= P_1(k-1)*P_1(k+1) for all k > 24.
For n=2, P_2(k)^2 >= P_2(k-1)*P_2(k+1) for all k > 1042.
For n=3, P_3(k)^2 >= P_3(k-1)*P_3(k+1) for all k > 15656.
No further terms are known.
		

References

  • Stephen DeSalvo and Igor Pak, Log-concavity of the partition function, The Ramanujan Journal, 38 (2015), 61-73.

Crossrefs

Programs

  • SageMath
    def power_partition_generating_series(s, n=20):
        R = ZZ['q']
        ans = R.one()
        m = 1
        while m**s < n:
            l = [0] * n
            l[0] = 1
            for i in range(1, (n + m**s - 1) // m**s):
                l[i*m**s] = 1
            ans = ans.mul_trunc(R(l), n)
            m += 1
        return ans
    %time
    seq = power_partition_generating_series(2, 15000).coefficients()
    last_neg = None
    for n in range(2, len(seq) - 1):
        d = seq[n]**2 / seq[n-1] / seq[n+1]
        if d < 1:
            last_neg = n
    print(last_neg)
    # Vincent Delecroix, Dec 28 2022

Extensions

Data corrected by Brennan G. Benfield, Dec 28 2022