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.

Showing 1-3 of 3 results.

A106298 Period of the Lucas 5-step sequence A074048 mod prime(n).

Original entry on oeis.org

1, 104, 781, 2801, 16105, 30941, 88741, 13032, 12166, 70728, 190861, 1926221, 2896405, 79506, 736, 8042221, 102689, 3720, 20151120, 2863280, 546120, 39449441, 48030024, 3690720, 29509760, 104060400, 37516960, 132316201, 28231632, 6384, 86714880, 2248090, 3128
Offset: 1

Views

Author

T. D. Noe, May 02 2005

Keywords

Comments

This sequence is the same as the period of Fibonacci 5-step sequence (A106304) mod prime(n) except for n=1 and 109, which correspond to the primes 2 and 599 because 9584 is the discriminant of the characteristic polynomial x^5-x^4-x^3-x^2-x-1 and the prime factors of 9584 are 2 and 599. We have a(n) < prime(n) for the primes 2, 599 and A106281.

Crossrefs

Cf. A106281 (primes p such that x^5-x^4-x^3-x^2-x-1 mod p has 5 distinct zeros), A106297.

Programs

  • Mathematica
    n=5; Table[p=Prime[i]; a=Join[Table[ -1, {n-1}], {n}]; a=Mod[a, p]; a0=a; k=0; While[k++; s=Mod[Plus@@a, p]; a=RotateLeft[a]; a[[n]]=s; a!=a0]; k, {i, 40}]
  • Python
    from itertools import count
    from sympy import prime
    def A106298(n):
        a = b = (5%(p:=prime(n)),1%p,7%p,3%p,15%p)
        s = sum(b) % p
        for m in count(1):
            b, s = b[1:] + (s,), (s+s-b[0]) % p
            if a == b:
                return m # Chai Wah Wu, Feb 22-27 2022

Formula

a(n) = A106297(prime(n)).

Extensions

a(31)-a(33) from Chai Wah Wu, Feb 27 2022

A106281 Primes p such that the polynomial x^5-x^4-x^3-x^2-x-1 mod p has 5 distinct zeros.

Original entry on oeis.org

691, 733, 3163, 4259, 4397, 5419, 6637, 6733, 8009, 8311, 9803, 11731, 14923, 17291, 20627, 20873, 22777, 25111, 26339, 27947, 29339, 29389, 29527, 29917, 34123, 34421, 34739, 34757, 36527, 36809, 38783, 40433, 40531, 41131, 42859, 43049
Offset: 1

Views

Author

T. D. Noe, May 02 2005

Keywords

Comments

This polynomial is the characteristic polynomial of the Fibonacci and Lucas 5-step sequences, A001591 and A074048. The periods of the sequences A001591(k) mod p and A074048(k) mod p have length less than p.

Crossrefs

Cf. A106278 (number of distinct zeros of x^5-x^4-x^3-x^2-x-1 mod prime(n)), A106298, A106304 (period of Lucas and Fibonacci 5-step mod prime(n)).

Programs

  • Mathematica
    t=Table[p=Prime[n]; cnt=0; Do[If[Mod[x^5-x^4-x^3-x^2-x-1, p]==0, cnt++ ], {x, 0, p-1}]; cnt, {n, 5000}];Prime[Flatten[Position[t, 5]]]
  • Python
    from itertools import islice
    from sympy import Poly, nextprime
    from sympy.abc import x
    def A106281_gen(): # generator of terms
        p = 2
        while True:
            if len(Poly(x*(x*(x*(x*(x-1)-1)-1)-1)-1, x, modulus=p).ground_roots())==5:
                yield p
            p = nextprime(p)
    A106281_list = list(islice(A106281_gen(),20)) # Chai Wah Wu, Mar 14 2024

A106284 Primes p such that the polynomial x^5-x^4-x^3-x^2-x-1 mod p has no zeros.

Original entry on oeis.org

3, 5, 7, 11, 13, 17, 31, 37, 41, 53, 71, 79, 83, 107, 151, 157, 199, 229, 233, 239, 241, 257, 263, 277, 281, 311, 317, 331, 337, 379, 389, 409, 431, 433, 463, 467, 521, 523, 541, 547, 557, 563, 571, 577, 607, 631, 659, 677, 727, 769, 787, 809, 827, 839, 853
Offset: 1

Views

Author

T. D. Noe, May 02 2005

Keywords

Comments

This polynomial is the characteristic polynomial of the Fibonacci and Lucas 5-step sequences, A001591 and A074048.

Crossrefs

Cf. A106278 (number of distinct zeros of x^5-x^4-x^3-x^2-x-1 mod prime(n)), A106298, A106304 (period of Lucas and Fibonacci 5-step sequence mod prime(n)), A003631 (primes p such that x^2-x-1 is irreducible mod p).

Programs

  • Maple
    P:= x^5-x^4-x^3-x^2-x-1:
    select(p -> [msolve(P,p)] = [], [seq(ithprime(i),i=1..10000)]); # Robert Israel, Mar 13 2024
  • Mathematica
    t=Table[p=Prime[n]; cnt=0; Do[If[Mod[x^5-x^4-x^3-x^2-x-1, p]==0, cnt++ ], {x, 0, p-1}]; cnt, {n, 200}];Prime[Flatten[Position[t, 0]]]
  • Python
    from itertools import islice
    from sympy import Poly, nextprime
    from sympy.abc import x
    def A106284_gen(): # generator of terms
        from sympy.abc import x
        p = 2
        while True:
            if len(Poly(x*(x*(x*(x*(x-1)-1)-1)-1)-1, x, modulus=p).ground_roots())==0:
                yield p
            p = nextprime(p)
    A106284_list = list(islice(A106284_gen(),20)) # Chai Wah Wu, Mar 14 2024

Extensions

Name corrected by Robert Israel, Mar 13 2024
Showing 1-3 of 3 results.