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-4 of 4 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

A106278 Number of distinct zeros of x^5-x^4-x^3-x^2-x-1 mod prime(n).

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 2, 3, 0, 2, 3, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 3, 1, 2, 3, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 3, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 2, 1, 0, 0, 3, 3, 1, 0, 1, 0, 0, 0, 1, 1, 1, 2, 1, 2, 0, 2, 0, 1, 1, 0, 1, 2, 0, 0, 2, 2, 1, 1, 2, 0, 0, 2, 1, 2, 2, 2, 1, 0, 0, 0, 0, 0, 0, 1, 0
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. Similar polynomials are treated in Serre's paper. The discriminant of the polynomial is 9584=16*599 and 599 is the only prime for which the polynomial has 4 distinct zeros. The primes p yielding 5 distinct zeros, A106281, correspond to the periods of the sequences A001591(k) mod p and A074048(k) mod p having length less than p. The Lucas 5-step sequence mod p has one additional prime p for which the period is less than p: the 599 factor of the discriminant. For this prime, the Fibonacci 5-step sequence mod p has a period of p(p-1).

Crossrefs

Cf. A106298 (period of the Lucas 5-step sequences mod prime(n)), A106284 (prime moduli for which the polynomial is irreducible).

Programs

  • Mathematica
    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, 150}]
  • Python
    from sympy import Poly, prime
    from sympy.abc import x
    def A106278(n): return len(Poly(x*(x*(x*(x*(x-1)-1)-1)-1)-1, x, modulus=prime(n)).ground_roots()) # Chai Wah Wu, Mar 14 2024

A106304 Period of the Fibonacci 5-step sequence A001591 mod prime(n).

Original entry on oeis.org

6, 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, Nov 19 2006

Keywords

Comments

This sequence is the same as the period of the Lucas 5-step sequence (A106298) 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 in A106281.

Crossrefs

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

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 A106304(n):
        a = b = (0,)*4+(1 % (p:= prime(n)),)
        s = 1 % 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) = A106303(prime(n)).

Extensions

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

A211671 Least prime p such that the polynomial x^n - x^(n-1) - ... - 1 (mod p) has n distinct zeros.

Original entry on oeis.org

2, 11, 47, 137, 691, 25621, 59233, 2424511, 2607383, 78043403, 1032758989, 80051779
Offset: 1

Views

Author

T. D. Noe, Apr 18 2012

Keywords

Comments

This is the characteristic polynomial of the n-step Fibonacci and Lucas sequences. For composite p, the polynomial can have more than n zeros! See A211672.

Examples

			For p = 11, x^2-x-1 = (x+3)(x+7) (mod p).
For p = 47, x^3-x^2-x-1 = (x+21)(x+30)(x+42) (mod p).
For p = 137, x^4-x^3-x^2-x-1 = (x+12)(x+79)(x+85)(x+97) (mod p).
		

Crossrefs

Cf. A045468 (n=2), A106279 (n=3), A106280 (n=4), A106281 (n=5).
Cf. A211672 (for composite p).

Programs

  • Mathematica
    Table[poly = x^n - Sum[x^k, {k, 0, n - 1}]; k = 1; While[p = Prime[k]; cnt = 0; Do[If[Mod[poly, p] == 0, cnt++], {x, 0, p - 1}]; cnt < n, k++]; p, {n, 5}]
  • PARI
    a(n)={my(P=x^n-sum(k=0, n-1, x^k) ); forprime(p=2, oo, if(#polrootsmod(P,p)==n, return(p) ) );} \\ Joerg Arndt, Apr 15 2013

Extensions

a(8)-a(10) from Joerg Arndt, Apr 15 2013
a(11)-a(12) from Jinyuan Wang, Apr 25 2025
Showing 1-4 of 4 results.