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.

Previous Showing 11-20 of 31 results. Next

A074584 Esanacci (hexanacci or "6-anacci") numbers.

Original entry on oeis.org

6, 1, 3, 7, 15, 31, 63, 120, 239, 475, 943, 1871, 3711, 7359, 14598, 28957, 57439, 113935, 225999, 448287, 889215, 1763832, 3498707, 6939975, 13766015, 27306031, 54163775, 107438335, 213112838, 422726969, 838513963, 1663261911, 3299217791, 6544271807
Offset: 0

Views

Author

Mario Catalani (mario.catalani(AT)unito.it), Aug 26 2002

Keywords

Comments

These esanacci numbers follow the same pattern as Lucas, generalized tribonacci (A001644), generalized tetranacci (A073817), and generalized pentanacci (A074048) numbers.
The closed form is a(n) = r1^n + r^2^n + r3^n + r4^n + r5^n + r6^n, with r1, r2, r3, r4, r5, r6 roots of the characteristic polynomial.
a(n) is also the trace of A^n, where A is the matrix ((1, 1, 0, 0, 0, 0), (1, 0, 1, 0, 0, 0), (1, 0, 0, 1, 0, 0), (1, 0, 0, 0, 1, 0), (1, 0, 0, 0, 0, 1), (1, 0, 0, 0, 0, 0)).

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (6-5*x-4*x^2-3*x^3-2*x^4-x^5)/(1-x-x^2-x^3-x^4-x^5-x^6) )); // G. C. Greubel, Apr 22 2019
    
  • Mathematica
    CoefficientList[Series[(6-5*x-4*x^2-3*x^3-2*x^4-x^5)/(1-x-x^2-x^3-x^4-x^5-x^6), {x, 0, 40}], x]
    LinearRecurrence[{1,1,1,1,1,1},{6,1,3,7,15,31},40] (* Harvey P. Dale, Nov 08 2011 *)
  • PARI
    polsym(polrecip(1-x-x^2-x^3-x^4-x^5-x^6), 40) \\ G. C. Greubel, Apr 22 2019
    
  • Python
    def aupton(nn):
      alst = [6, 1, 3, 7, 15, 31]
      for n in range(6, nn+1): alst.append(sum(alst[n-6:n]))
      return alst[:nn+1]
    print(aupton(33)) # Michael S. Branicky, Jun 01 2021
  • Sage
    ((6-5*x-4*x^2-3*x^3-2*x^4-x^5)/(1-x-x^2-x^3-x^4-x^5-x^6)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Apr 22 2019
    

Formula

a(n) = a(n-1) + a(n-2) + a(n-3) + a(n-4) + a(n-5) + a(n-6), a(0)=6, a(1)=1, a(2)=3, a(3)=7, a(4)=15, a(5)=31.
G.f.: (6-5*x-4*x^2-3*x^3-2*x^4-x^5)/(1-x-x^2-x^3-x^4-x^5-x^6).
a(n) = 2*a(n-1) - a(n-7) for n >= 7. - Vincenzo Librandi, Dec 20 2010

A104621 Heptanacci-Lucas numbers.

Original entry on oeis.org

7, 1, 3, 7, 15, 31, 63, 127, 247, 493, 983, 1959, 3903, 7775, 15487, 30847, 61447, 122401, 243819, 485679, 967455, 1927135, 3838783, 7646719, 15231991, 30341581, 60439343, 120393007, 239818559, 477709983, 951581183, 1895515647, 3775799303, 7521257025
Offset: 0

Views

Author

Jonathan Vos Post, Mar 17 2005

Keywords

Comments

This 7th-order linear recurrence is a generalization of the Lucas sequence A000032. Mario Catalani would refer to this is a generalized heptanacci sequence, had he not stopped his series of sequences after A001644 "generalized tribonacci", A073817 "generalized tetranacci", A074048 "generalized pentanacci", A074584 "generalized hexanacci." T. D. Noe and I have noted that each of these has many more primes than the corresponding tribonacci A000073 (see A104576), tetranacci A000288 (see A104577), pentanacci, hexanacci and heptanacci (see A104414). For primes in Heptanacci-Lucas numbers, see A104622. For semiprimes in Heptanacci-Lucas numbers, see A104623.

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (-7+6*x+ 5*x^2+4*x^3+3*x^4+2*x^5+x^6)/(-1+x +x^2+x^3+x^4+x^5+x^6+x^7) )); // G. C. Greubel, Apr 22 2019
    
  • Maple
    A104621 := proc(n)
        option remember;
        if n <=6 then
            op(n+1,[7, 1, 3, 7, 15, 31, 63])
        else
            add(procname(n-i),i=1..7) ;
        end if;
    end proc: # R. J. Mathar, Mar 26 2015
  • Mathematica
    a[0]=7; a[1]=1; a[2]=3; a[3]=7; a[4]=15; a[5]=31; a[6]=63; a[n_]:= a[n]= a[n-1]+a[n-2]+a[n-3]+a[n-4]+a[n-5]+a[n-6]+a[n-7]; Table[a[n], {n,0,40}] (* Robert G. Wilson v, Mar 17 2005 *)
    LinearRecurrence[{1, 1, 1, 1, 1, 1, 1}, {7, 1, 3, 7, 15, 31, 63}, 40] (* Vladimir Joseph Stephan Orlovsky, Feb 08 2012 *)
  • PARI
    my(x='x+O('x^40)); Vec((-7+6*x+5*x^2+4*x^3+3*x^4+2*x^5+x^6)/(-1+x +x^2+x^3+x^4+x^5+x^6+x^7)) \\ G. C. Greubel, Dec 18 2017
    
  • PARI
    polsym(polrecip(1-x-x^2-x^3-x^4-x^5-x^6-x^7), 40) \\ G. C. Greubel, Apr 22 2019
    
  • Sage
    ((-7+6*x+5*x^2+4*x^3+3*x^4+2*x^5+x^6)/(-1+x +x^2+x^3+x^4+x^5+x^6 +x^7)).series(x, 41).coefficients(x, sparse=False) # G. C. Greubel, Apr 22 2019

Formula

a(n) = a(n-1) + a(n-2) + a(n-3) + a(n-4) + a(n-5) + a(n-6) + a(n-7); a(0) = 7, a(1) = 1, a(2) = 3, a(3) = 7, a(4) = 15, a(5) = 31, a(6) = 63.
From R. J. Mathar, Nov 16 2007: (Start)
G.f.: (7 - 6*x - 5*x^2 - 4*x^3 - 3*x^4 - 2*x^5 - x^6)/(1 - x - x^2 - x^3 - x^4 - x^5 - x^6 - x^7).
a(n) = 7*A066178(n) - 6*A066178(n-1) - 5*A066178(n-2) - ... - 2*A066178(n-5) - A066178(n-6) if n >= 6. (End)

A105754 Lucas 8-step numbers.

Original entry on oeis.org

1, 3, 7, 15, 31, 63, 127, 255, 502, 1003, 2003, 3999, 7983, 15935, 31807, 63487, 126719, 252936, 504869, 1007735, 2011471, 4014959, 8013983, 15996159, 31928831, 63730943, 127208950, 253913031, 506818327, 1011625183, 2019235407
Offset: 1

Views

Author

T. D. Noe, Apr 22 2005

Keywords

Crossrefs

Cf. A000032, A001644, A073817, A074048, A074584, A104621, A105755 (Lucas n-step numbers).

Programs

  • Mathematica
    a={-1, -1, -1, -1, -1, -1, -1, 8}; Table[s=Plus@@a; a=RotateLeft[a]; a[[ -1]]=s, {n, 50}]
    CoefficientList[Series[-x*(1 + 2*x + 3*x^2 + 4*x^3 + 5*x^4 + 6*x^5 + 7*x^6 + 8*x^7 + 9*x^8)/(-1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 + x^9), {x, 0, 50}], x] (* G. C. Greubel, Dec 18 2017 *)
  • PARI
    a(n)=([0,1,0,0,0,0,0,0; 0,0,1,0,0,0,0,0; 0,0,0,1,0,0,0,0; 0,0,0,0,1,0,0,0; 0,0,0,0,0,1,0,0; 0,0,0,0,0,0,1,0; 0,0,0,0,0,0,0,1; 1,1,1,1,1,1,1,1]^(n-1)*[1;3;7;15;31;63;127;255])[1,1] \\ Charles R Greathouse IV, Jun 14 2015
    
  • PARI
    x='x+O('x^30); Vec(-x*(1 + 2*x + 3*x^2 + 4*x^3 + 5*x^4 + 6*x^5 + 7*x^6 + 8*x^7 + 9*x^8)/(-1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 + x^9)) \\ G. C. Greubel, Dec 18 2017

Formula

a(n) = Sum_{k=1..8} a(n-k) for n > 0, a(0)=8, a(n)=-1 for n=-7..-1.
G.f.: -x*(1 + 2*x + 3*x^2 + 4*x^3 + 5*x^4 + 6*x^5 + 7*x^6 + 8*x^7)/( -1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 ). - R. J. Mathar, Jun 20 2011

A105755 Lucas 9-step numbers.

Original entry on oeis.org

1, 3, 7, 15, 31, 63, 127, 255, 511, 1013, 2025, 4047, 8087, 16159, 32287, 64511, 128895, 257535, 514559, 1028105, 2054185, 4104323, 8200559, 16384959, 32737631, 65410751, 130692607, 261127679, 521740799, 1042453493, 2082852801
Offset: 1

Views

Author

T. D. Noe, Apr 22 2005

Keywords

Crossrefs

Cf. A000032, A001644, A073817, A074048, A074584, A104621, A105754 (Lucas n-step numbers).

Programs

  • Mathematica
    a={-1, -1, -1, -1, -1, -1, -1, -1, 9}; Table[s=Plus@@a; a=RotateLeft[a]; a[[ -1]]=s, {n, 50}]
  • Maxima
    a(n):=n*sum(sum((-1)^i*binomial(k,k-i)*binomial(n-9*i-1,k-1),i,0,(n-k)/9)/k,k,1,n);
    makelist(a(n),n,1,17); /* Vladimir Kruchinin, Aug 10 2011 */
    
  • PARI
    a(n)=([0,1,0,0,0,0,0,0,0; 0,0,1,0,0,0,0,0,0; 0,0,0,1,0,0,0,0,0; 0,0,0,0,1,0,0,0,0; 0,0,0,0,0,1,0,0,0; 0,0,0,0,0,0,1,0,0; 0,0,0,0,0,0,0,1,0; 0,0,0,0,0,0,0,0,1; 1,1,1,1,1,1,1,1,1]^(n-1)*[1;3;7;15;31;63;127;255;511])[1,1] \\ Charles R Greathouse IV, Jun 15 2015

Formula

a(n) = Sum_{k=1..9} a(n-k) for n > 0, a(0)=9, a(n)=-1 for n=-8..-1
G.f.: -x*(1 + 2*x + 3*x^2 + 4*x^3 + 5*x^4 + 6*x^5 + 7*x^6 + 8*x^7 + 9*x^8) / ( -1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 + x^9 ). - R. J. Mathar, Jun 20 2011
a(n) = n*Sum_{k=1..n} (Sum_{i=0..floor((n-k)/9)} (-1)^i*binomial(k, k-i)*binomial(n-9*i-1, k-1))/k. - Vladimir Kruchinin, Aug 10 2011

A106273 Discriminant of the polynomial x^n - x^(n-1) - ... - x - 1.

Original entry on oeis.org

1, 5, -44, -563, 9584, 205937, -5390272, -167398247, 6042477824, 249317139869, -11597205023744, -601139006326619, 34383289858207744, 2151954708695291177, -146323302326154543104, -10742330662077208945103, 846940331265064719417344, 71373256668946058057974997
Offset: 1

Views

Author

T. D. Noe, May 02 2005

Keywords

Comments

This polynomial is the characteristic polynomial of the Fibonacci and Lucas n-step sequences. These discriminants are prime for n=2, 4, 6, 26, 158 (A106274). It appears that the term a(2n+1) always has a factor of 2^(2n). With that factor removed, the discriminants are prime for odd n=3, 5, 7, 21, 99, 405. See A106275 for the combined list.
a(n) is the determinant of an r X r Hankel matrix whose entries are w(i+j) where w(n) = x1^n + x2^n + ... + xr^n where x1,x2,...xr are the roots of the titular characteristic polynomial. E.g., A000032 for n=2, A001644 for n=3, A073817 for n=4, A074048 for n=5, A074584 for n=6, A104621 for n=7, ... - Kai Wang, Jan 17 2021
Luca proves that a(n) is a term of the corresponding k-nacci sequence only for n=2 and 3. - Michel Marcus, Apr 12 2025

Crossrefs

Cf. A086797 (discriminant of the polynomial x^n-x-1), A000045, A000073, A000078, A001591, A001592 (Fibonacci n-step sequences), A000032, A001644, A073817, A074048, A074584, A104621, A105754, A105755 (Lucas n-step sequences), A086937, A106276, A106277, A106278 (number of distinct zeros of these polynomials for n=2, 3, 4, 5).

Programs

  • Mathematica
    Discriminant[p_?PolynomialQ, x_] := With[{n=Exponent[p, x]}, Cancel[((-1)^(n(n-1)/2) Resultant[p, D[p, x], x])/Coefficient[p, x, n]^(2n-1)]]; Table[Discriminant[x^n-Sum[x^i, {i, 0, n-1}], x], {n, 20}]
  • PARI
    {a(n)=(-1)^(n*(n+1)/2)*((n+1)^(n+1)-2*(2*n)^n)/(n-1)^2}  \\ Max Alekseyev, May 05 2005
    
  • PARI
    a(n)=poldisc('x^n-sum(k=0,n-1,'x^k)); \\ Joerg Arndt, May 04 2013

Formula

a(n) = (-1)^(n*(n+1)/2) * ((n+1)^(n+1)-2*(2*n)^n)/(n-1)^2. - Max Alekseyev, May 05 2005

A125127 Array L(k,n) read by antidiagonals: k-step Lucas numbers.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 3, 4, 1, 1, 3, 7, 7, 1, 1, 3, 7, 11, 11, 1, 1, 3, 7, 15, 21, 18, 1, 1, 3, 7, 15, 26, 39, 29, 1, 1, 3, 7, 15, 31, 51, 71, 47, 1, 1, 3, 7, 15, 31, 57, 99, 131, 76, 1, 1, 3, 7, 15, 31, 63, 113, 191, 241, 123, 1
Offset: 1

Views

Author

Jonathan Vos Post, Nov 21 2006

Keywords

Examples

			Table begins:
1 | 1  1  1   1   1   1    1    1    1    1
2 | 1  3  4   7  11  18   29   47   76  123
3 | 1  3  7  11  21  39   71  131  241  443
4 | 1  3  7  15  26  51   99  191  367  708
5 | 1  3  7  15  31  57  113  223  439  863
6 | 1  3  7  15  31  63  120  239  475  943
7 | 1  3  7  15  31  63  127  247  493  983
8 | 1  3  7  15  31  63  127  255  502 1003
9 | 1  3  7  15  31  63  127  255  511 1013
		

Crossrefs

n-step Lucas number analog of A092921 Array F(k, n) read by antidiagonals: k-generalized Fibonacci numbers (and see related A048887, A048888). L(1, n) = "1-step Lucas numbers" = A000012. L(2, n) = 2-step Lucas numbers = A000204. L(3, n) = 3-step Lucas numbers = A001644. L(4, n) = 4-step Lucas numbers = A001648 Tetranacci numbers A073817 without the leading term 4. L(5, n) = 5-step Lucas numbers = A074048 Pentanacci numbers with initial conditions a(0)=5, a(1)=1, a(2)=3, a(3)=7, a(4)=15. L(6, n) = 6-step Lucas numbers = A074584 Esanacci ("6-anacci") numbers. L(7, n) = 7-step Lucas numbers = A104621 Heptanacci-Lucas numbers. L(8, n) = 8-step Lucas numbers = A105754. L(9, n) = 9-step Lucas numbers = A105755. See A000295, A125129 for comments on partial sums of diagonals.

Programs

  • Sage
    def L(k, n):
        if n < 0:
            return -1
        a = [-1]*(k-1) + [k] # [-1, -1, ..., -1, k]
        for i in range(1, n+1):
            a[:] = a[1:] + [sum(a)]
        return a[-1]
    [L(k, n) for d in (1..12) for k, n in zip((d..1, step=-1), (1..d))] # Freddy Barrera, Jan 10 2019

Formula

L(k,n) = L(k,n-1) + L(k,n-2) + ... + L(k,n-k); L(k,n) = -1 for n < 0, and L(k,0) = k.
G.f. for row k: x*(dB(k,x)/dx)/(1-B(k,x)), where B(k,x) = x + x^2 + ... + x^k. - Petros Hadjicostas, Jan 24 2019

Extensions

Corrected by Freddy Barrera, Jan 10 2019

A023424 Expansion of (1+2*x+3*x^2+4*x^3+5*x^4)/(1-x-x^2-x^3-x^4-x^5).

Original entry on oeis.org

1, 3, 7, 15, 31, 57, 113, 223, 439, 863, 1695, 3333, 6553, 12883, 25327, 49791, 97887, 192441, 378329, 743775, 1462223, 2874655, 5651423, 11110405, 21842481, 42941187, 84420151, 165965647, 326279871, 641449337, 1261056193, 2479171199, 4873922247, 9581878847
Offset: 0

Views

Author

Keywords

Comments

Traces of successive powers of pentanacci matrix. - Artur Jasinski, Jan 05 2007

Crossrefs

Essentially the same as A074048.

Programs

  • Magma
    I:=[1,3,7,15,31]; [n le 5 select I[n] else Self(n-1) + Self(n-2) + Self(n-3) + Self(n-4) + Self(n-5): n in [1..30]]; // G. C. Greubel, Jan 01 2018
  • Mathematica
    LinearRecurrence[{1, 1, 1, 1, 1}, {1, 3, 7, 15, 31}, 60] (* Vladimir Joseph Stephan Orlovsky, Feb 08 2012 *)
    CoefficientList[Series[(1+2*x+3*x^2+4*x^3+5*x^4)/(1-x-x^2-x^3-x^4-x^5), {x, 0, 50}], x] (* G. C. Greubel, Jan 01 2018 *)
  • Maxima
    a(n):=n*sum(1/k*sum(binomial(k,r)*sum(binomial(r,m)*sum(binomial(m,j)*binomial(j,n-m-k-j-r),j,0,m),m,0,r),r,0,k),k,1,n);
    
  • PARI
    Vec((1+2*x+3*x^2+4*x^3+5*x^4)/(1-x-x^2-x^3-x^4-x^5)+O(x^100)) \\ Charles R Greathouse IV, Feb 24 2011
    

Formula

a(n) = n * Sum_{k=1..n} (1/k)*Sum_{r=0..k} binomial(k,r)*Sum_{m=0..r} binomial(r,m) * Sum_{j=0..m} binomial(m,j)*binomial(j,n-m-k-j-r), n>0. - Vladimir Kruchinin, Feb 22 2011

A104622 Indices of prime values of heptanacci-Lucas numbers A104621.

Original entry on oeis.org

0, 2, 3, 5, 7, 10, 17, 24, 25, 26, 28, 38, 40, 49, 62, 79, 89, 114, 140, 145, 182, 248, 353, 437, 654, 702, 784, 921, 931, 986, 1206, 2136, 2137, 3351, 5411, 13264, 13757, 16348, 27087, 27160
Offset: 1

Views

Author

Jonathan Vos Post, Mar 17 2005

Keywords

Comments

The 7th-order linear recurrence A104622 (heptanacci-Lucas numbers) is a generalization of the Lucas sequence A000032. T. D. Noe and I have noted that the heptanacci-Lucas numbers have many more primes than the corresponding heptanacci (see A104414) which he found has only the first 3 primes that I identified through the first 5000 values, whereas these heptanacci-Lucas numbers have 17 primes among the first 100 values. For semiprimes in heptanacci-Lucas numbers, see A104623.

Examples

			A104621(0) = 7,
A104621(2) = 3,
A104621(3) = 7,
A104621(5) = 31,
A104621(7) = 127,
A104621(10) = 983,
A104621(17) = 122401,
A104621(24) = 15231991.
		

Crossrefs

Programs

  • Mathematica
    a[0] = 7; a[1] = 1; a[2] = 3; a[3] = 7; a[4] = 15; a[5] = 31; a[6] = 63; a[n_] := a[n] = a[n - 1] + a[n - 2] + a[n - 3] + a[n - 4] + a[n - 5] + a[n - 6] + a[n - 7]; Do[ If[ PrimeQ[ a[n]], Print[n]], {n, 5000}] (* Robert G. Wilson v, Mar 17 2005 *)
    Flatten[Position[LinearRecurrence[{1,1,1,1,1,1,1},{7,1,3,7,15,31,63},28000],?PrimeQ]]-1 (* _Harvey P. Dale, Jan 02 2016 *)

Formula

Prime values of the heptanacci-Lucas numbers, which are defined by: a(0) = 7, a(1) = 1, a(2) = 3, a(3) = 7, a(4) = 15, a(5) = 31, a(6) = 63, for n > 6: a(n) = a(n-1)+a(n-2)+a(n-3)+a(n-4)+a(n-5)+a(n-6)+a(n-7).

Extensions

More terms from T. D. Noe and Robert G. Wilson v, Mar 17 2005

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

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
Previous Showing 11-20 of 31 results. Next