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-7 of 7 results.

A080891 Period 5: repeat [0, 1, -1, -1, 1].

Original entry on oeis.org

0, 1, -1, -1, 1, 0, 1, -1, -1, 1, 0, 1, -1, -1, 1, 0, 1, -1, -1, 1, 0, 1, -1, -1, 1, 0, 1, -1, -1, 1, 0, 1, -1, -1, 1, 0, 1, -1, -1, 1, 0, 1, -1, -1, 1, 0, 1, -1, -1, 1, 0, 1, -1, -1, 1, 0, 1, -1, -1, 1, 0, 1, -1, -1, 1, 0, 1, -1, -1, 1, 0, 1, -1, -1, 1, 0, 1, -1, -1, 1, 0, 1, -1, -1, 1, 0, 1, -1, -1, 1, 0, 1, -1, -1, 1, 0, 1, -1, -1, 1, 0
Offset: 0

Views

Author

N. J. A. Sloane, Sep 23 2003

Keywords

Comments

a(n) = (5/n), where (k/n) is the Kronecker symbol.
L(1;5) (Dirichlet L-series) is the integral from 0 to 1 of the g.f. of a(n+1). Partial sums are A092202. - Paul Barry, Apr 01 2005
From R. J. Mathar, Jul 15 2010, simplified Jul 27 2010: (Start)
The sequence is the real non-principal Dirichlet character mod 5. (The principal character mod 5 is A011558.)
Associated Dirichlet L-functions are, for example, L(1,chi) = Sum_{n>=1} a(n)/n = A086466 or L(2,chi) = Sum_{n>=1} a(n)/n^2 = 0.7062114... = 4*Pi^2/(25*sqrt(5)). (End)
This sequence {a(n)} appears in the formula 2*exp(2*Pi*n*i/5) = (A(n) + a(n)*phi) + (C(n) + D(n)*phi)*sqrt(2 + phi)*i, with the golden section phi, i = sqrt(-1) and A(n) = A164116(n+5), C(n) = A156174(n+4) and D(n) = A010891(n+3) for n >= 0. See a comment on A164116. - Wolfdieter Lang, Feb 26 2014
In Gil and Robins 2003 on page 33 the g.f. is denoted by f_{4, 4}(x). - Michael Somos, Sep 04 2015

Examples

			G.f. = x - x^2 - x^3 + x^4 + x^6 - x^7 - x^8 + x^9 + x^11 - x^12 - x^13 + ...
		

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1986, page 139, k=5, Chi_2(n).
  • H. Cohn, Advanced Number Theory, Dover Publications, Inc., 1962, p. 173.

Crossrefs

Programs

  • Magma
    &cat [[0, 1, -1, -1, 1]^^30]; // Wesley Ivan Hurt, Dec 26 2016
  • Maple
    A080891 := proc(n) numtheory[jacobi](n,5) ; end proc: seq(A080891(n),n=0..100) ; # R. J. Mathar, Jul 29 2010
  • Mathematica
    a[ n_] := Mod[n^2 + 1, 5] - 1; (* Michael Somos, May 24 2015 *)
    a[ n_] := KroneckerSymbol[ n, 5]; (* Michael Somos, May 24 2015 *)
    a[ n_] := {1, -1, -1, 1, 0}[[Mod[n, 5, 1]]]; (* Michael Somos, May 24 2015 *)
    PadRight[{},120,{0,1,-1,-1,1}] (* Harvey P. Dale, Nov 30 2023 *)
  • MuPAD
    numlib::jacobi(n,5)$ n=0..100 // Zerinvary Lajos, May 13 2008
    
  • PARI
    a(n)=kronecker(5,n) /* Also, a(n)=kronecker(n,5) */
    
  • PARI
    {a(n) = (n^2 + 1)%5 - 1}; /* Michael Somos, Dec 01 2004 */
    

Formula

If n == 0 (mod 5) a(n)=0; if n == 1 or 4 (mod 5) a(n)=1; if n == 2 or 3 (mod 5) a(n)=-1.
G.f.: x*(1-x^2)/(1+x+x^2+x^3+x^4). - Paul Barry, Apr 01 2005
G.f.: x * (1 - x) * (1 - x^2) / (1 - x^5). a(n) = a(-n) = a(n+5) for all n in Z. - Michael Somos, Jun 17 2005
Euler transform of length 5 sequence [-1, -1, 0, 0, 1]. - Michael Somos, Jun 17 2005
Transform of the Fibonacci numbers by the Riordan array A102587. - Paul Barry, Jul 14 2005
a(n) = -1 + floor(12002/99999*10^(n+1)) mod 10. - Hieronymus Fischer, Jan 04 2013
a(n) = -1 + floor(137/242*3^(n+1)) mod 3. - Hieronymus Fischer, Jan 04 2013
|A011558(n)| = |a(n)| = |A100047(n)|. - Michael Somos, May 24 2015
a(n) is completely multiplicative with a(p) = Kronecker(5, p). - Michael Somos, Jun 17 2015
From Wesley Ivan Hurt, Dec 26 2016: (Start)
a(n) = a(n-5) for n > 4.
a(n) + a(n-1) + a(n-2) + a(n-3) + a(n-4) = 0 for n > 3.
a(n) = 1 + 2*floor((n-4)/5) - 2*floor((n-2)/5) + floor((n-1)/5) - floor(n/5). (End)
a(n) = 2*(cos(2*n*Pi/5) - cos(4*n*Pi/5))/sqrt(5). - Wesley Ivan Hurt, Sep 26 2018
a(n) = a(n-1)*a(n-4) - a(n-2)*a(n-3) for n > 3. - Nicolas Bělohoubek, May 21 2024
a(n) = n^2 - 5*floor((n^2+1)/5). - Aaron J Grech, Aug 28 2024

Extensions

Name specified by Wolfdieter Lang, Feb 26 2014

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

A086965 Number of distinct zeros of x^3-x-1 mod prime(n).

Original entry on oeis.org

0, 0, 1, 1, 1, 0, 1, 1, 2, 0, 0, 1, 0, 1, 0, 1, 3, 1, 1, 0, 0, 1, 1, 1, 1, 3, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 3, 3, 0, 1, 1, 0, 0, 1, 3, 3, 1, 1, 0, 0, 1, 1, 0, 1, 0, 3, 0, 1, 1, 1, 3, 0, 1, 3, 0, 1, 3, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 3, 1, 0, 3, 1, 1, 0, 0, 0
Offset: 1

Views

Author

N. J. A. Sloane, Sep 24 2003

Keywords

Comments

For the prime modulus 23, the polynomial can be factored as (x+13)^2 (x+20), showing that x=10 is a zero of multiplicity 2. The discriminant of the polynomial is -23. - T. D. Noe, Aug 12 2004

Crossrefs

Programs

  • Mathematica
    Table[p=Prime[n]; cnt=0; Do[If[Mod[x^3-x-1, p]==0, cnt++ ], {x, 0, p-1}]; cnt, {n, 100}] (* T. D. Noe, Aug 12 2004 *)

Formula

If p = prime(n), a(n) = A030199(p) + 1.

A086966 Number of distinct zeros of x^4-x-1 mod prime(n).

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 2, 0, 1, 1, 0, 2, 1, 0, 0, 2, 1, 1, 2, 0, 0, 2, 4, 1, 1, 0, 1, 2, 0, 0, 0, 2, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 2, 2, 2, 1, 1, 0, 0, 2, 1, 2, 2, 1, 1, 1, 1, 1, 0, 0, 3, 1, 1, 0, 0, 1, 2, 1, 0, 1, 1, 2, 2, 1, 1, 0, 1, 0, 2, 2, 1, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 0, 1, 0, 1, 2, 2, 1, 1, 0
Offset: 1

Views

Author

N. J. A. Sloane, Sep 24 2003

Keywords

Comments

For the prime modulus 283, the polynomial can be factored as (x+18) (x+168) (x+190)^2, showing that x=93 is a zero of multiplicity 2. The discriminant of the polynomial is 283. - T. D. Noe, Aug 12 2004

Crossrefs

Programs

  • Maple
    f:= n -> nops([msolve(x^4-x-1,ithprime(n))]):
    map(f, [$1..100]); # Robert Israel, Aug 10 2023
  • Mathematica
    Table[p=Prime[n]; cnt=0; Do[If[Mod[x^4-x-1, p]==0, cnt++ ], {x, 0, p-1}]; cnt, {n, 105}] (* T. D. Noe, Sep 24 2003 *)

Extensions

More terms from T. D. Noe, Sep 24 2003

A086967 Number of distinct zeros of x^5-x-1 mod prime(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 2, 1, 1, 1, 1, 0, 2, 2, 2, 2, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 2, 0, 2, 1, 1, 0, 0, 0, 2, 1, 3, 0, 1, 2, 2, 2, 3, 0, 0, 0, 1, 3, 2, 0, 1, 1, 1, 0, 1, 1, 0, 0, 2, 0, 2, 3, 2, 1, 2, 1, 0, 2, 2, 0, 1, 0, 2, 0, 0, 1, 0, 0, 2, 0, 1, 0, 1, 1, 1, 0, 2, 0, 2, 3, 1, 3, 1, 3, 0, 0, 1, 0, 1
Offset: 1

Views

Author

N. J. A. Sloane, Sep 24 2003

Keywords

Comments

For the prime modulus 19, the polynomial can be factored as (x+6)^2 (x^3+7x^2+13x+10), showing that x=13 is a zero of multiplicity 2. For the prime modulus 151, the polynomial can be factored as (x+9) (x+39)^2 (x^2+64x+61), showing that x=112 is a zero of multiplicity 2. The discriminant of the polynomial is 2869=19*151. - T. D. Noe, Aug 12 2004

Crossrefs

Programs

  • Mathematica
    Table[p=Prime[n]; cnt=0; Do[If[Mod[x^5-x-1, p]==0, cnt++ ], {x, 0, p-1}]; cnt, {n, 100}] (from T. D. Noe)

Extensions

More terms from T. D. Noe, Sep 24 2003

A256580 Number of quadruples (x, x+1, x+2, x+3) with 1 < x < p-3 of consecutive integers whose product is 1 mod p.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 2, 2, 0, 2, 0, 0, 0, 4, 0, 4, 0, 0, 4, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 4, 4, 2, 0, 2, 0, 0, 2, 0, 4, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, 4, 2, 0, 0, 2, 0, 0, 0, 2, 0, 0, 4, 2, 2, 0, 4, 0, 0, 0, 0, 2, 4, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 2, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 4, 0, 0, 0, 0, 0, 2, 2, 0, 0, 4, 4, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 2, 0, 2, 0, 4, 0, 2, 2, 0, 0, 4, 4, 0, 4, 2, 0, 0
Offset: 1

Views

Author

Marian Kraus, Apr 02 2015

Keywords

Comments

If "quadruples" is changed to "pairs" we get A086937 (for the counts) and A038872 (for the primes for which the count is nonzero).

Examples

			p=7, x_1=2, 2*3*4*5 == 1 (mod 7), T={2}, |T|=1;
p=17, x_1=2, 2*3*4*5 == 1 (mod 17), x_2=12, 12*13*14*15 == 1 (mod 17), T={2,12}, |T|=2;
p=23, x_1=5, 5*6*7*8 == 1 (mod 23), x_2=15, 15*16*17*18 == 1 (mod 23), x_3=19, 19*20*21*22 == 1 (mod 23), T={5,15,19}, |T|=3.
		

Crossrefs

Programs

  • R
    library(numbers);IP <- vector();t <- vector();S <- vector();IP <- c(Primes(1000));for (j in 1:(length(IP))){for (i in 2:(IP[j]-4)){t[i-1] <-as.vector(mod((i*(i+1)*(i+2)*(i+3)),IP[j]));Z[j] <- sum(which(t==1));S[j] <- length(which(t==1))}};S

Formula

|T| where T = {x|x*(x+1)*(x+2)*(x+3) == 1 mod p, p is prime, 1 < x < p-3}.

A106306 Primes that yield a simple orbit structure in 2-step recursions.

Original entry on oeis.org

2, 3, 7, 13, 17, 23, 37, 41, 43, 47, 53, 61, 67, 73, 83, 89, 97, 103, 107, 109, 113, 127, 137, 149, 157, 163, 167, 173, 193, 197, 223, 227, 233, 241, 257, 263, 269, 277, 281, 283, 293, 307, 313, 317, 337, 347, 353, 367, 373, 383, 389, 397, 401, 409, 421, 433
Offset: 1

Views

Author

T. D. Noe, May 02 2005

Keywords

Comments

Consider the 2-step recursion x(k)=x(k-1)+x(k-2) mod n. For any of the n^2 initial conditions x(1) and x(2) in Zn, the recursion has a finite period. When n is a prime in this sequence, all of the orbits, except the one containing (0,0), have the same length.
Except for 5, this appears to be the complement of A053032, odd primes p with one 0 in Fibonacci numbers mod p. - T. D. Noe, May 03 2005
A prime p is in this sequence if either (1) the polynomial x^2-x-1 mod p has no zeros for x in [0,p-1] (see A086937) or (2) the polynomial has zeros, but none is a root of unity mod p. The first few primes in the second category are 41, 61, 89 and 109. - T. D. Noe, May 12 2005

Crossrefs

Cf. A015134 (orbits of 2-step sequences).
Showing 1-7 of 7 results.