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-10 of 31 results. Next

A074062 Reflected (see A074058) pentanacci numbers A074048.

Original entry on oeis.org

5, -1, -1, -1, -1, 9, -7, -1, -1, -1, 19, -23, 5, -1, -1, 39, -65, 33, -7, -1, 79, -169, 131, -47, 5, 159, -417, 431, -225, 57, 313, -993, 1279, -881, 339, 569, -2299, 3551, -3041, 1559, 799, -5167, 9401, -9633, 6159, 39, -11133, 23969, -28667, 21951, -6081, -22305
Offset: 0

Views

Author

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

Keywords

Comments

a(n) is also the trace of A^(-n), where A is the matrix ( (1,1,0,0,0), (1,0,1,0,0), (1,0,0,1,0), (1,0,0,0,1), (1,0,0,0,0) ).
a(n) is also the sum of determinants of 4th-order principal minors of A^n.

Crossrefs

Programs

  • Magma
    I:=[5,-1,-1,-1,-1]; [n le 5 select I[n] else (-1)*(Self(n-1) +Self(n-2) +Self(n-3) +Self(n-4)) + Self(n-5): n in [1..61]]; // G. C. Greubel, Jul 05 2021
    
  • Mathematica
    CoefficientList[Series[(5+4*x+3*x^2+2*x^3+x^4)/(1+x+x^2+x^3+x^4-x^5), {x, 0, 60}], x]
  • PARI
    Vec((5+4*x+3*x^2+2*x^3+x^4)/(1+x+x^2+x^3+x^4-x^5) + O(x^60)) \\ Michel Marcus, Sep 14 2020
    
  • Sage
    def A074062_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (5+4*x+3*x^2+2*x^3+x^4)/(1+x+x^2+x^3+x^4-x^5) ).list()
    A074062_list(60) # G. C. Greubel, Jul 05 2021

Formula

a(n) = -a(n-1) -a(n-2) -a(n-3) -a(n-4) +a(n-5), a(0)=5, a(1)=-1, a(2)=-1, a(3)=-1, a(4)=-1.
G.f.: (5 +4*x +3*x^2 +2*x^3 +x^4)/(1 +x +x^2 +x^3 +x^4 -x^5).

Extensions

More terms from Michel Marcus, Sep 14 2020

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

A106297 Period of the Lucas 5-step sequence A074048 mod n.

Original entry on oeis.org

1, 1, 104, 6, 781, 104, 2801, 12, 312, 781, 16105, 312, 30941, 2801, 81224, 24, 88741, 312, 13032, 4686, 291304, 16105, 12166, 312, 3905, 30941, 936, 16806, 70728, 81224, 190861, 48, 1674920, 88741, 2187581, 312, 1926221, 13032, 3217864, 9372, 2896405
Offset: 1

Views

Author

T. D. Noe, May 02 2005, Nov 19 2006

Keywords

Comments

This sequence can differ from the corresponding Fibonacci sequence (A106303) only when n is a multiple of 2 or 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. [corrected by Avery Diep, Aug 25 2025]
a(n) divides A106303(n). - Avery Diep, Aug 25 2025

Crossrefs

Cf. A074048, A106303 (period of Fibonacci 5-step sequence mod n), A106273 (discriminant of the polynomial x^n-x^(n-1)-...-x-1).

Programs

  • Mathematica
    n=5; Table[p=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, 50}]
  • Python
    from itertools import count
    def A106297(n):
        a = b = (5%n,1%n,7%n,3%n,15%n)
        s = sum(b) % n
        for m in count(1):
            b, s = b[1:] + (s,), (s+s-b[0]) % n
            if a == b:
                return m # Chai Wah Wu, Feb 22-27 2022

Formula

Let the prime factorization of n be p1^e1...pk^ek. Then a(n) = lcm(a(p1^e1), ..., a(pk^ek)).
Conjectures: a(5^k) = 781*5^(k-1) for k > 0. a(2^k) = 3*2^(k-1) for k > 1. If a(p) != a(p^2) for prime p > 2, then a(p^k) = p^(k-1)*a(p) for k > 0. - Chai Wah Wu, Feb 25 2022

A105289 Indices of Lucas 5-step numbers A074048 which have a nontrivial divisor in common with index.

Original entry on oeis.org

6, 12, 18, 20, 21, 33, 36, 48, 51, 54, 55, 60, 75, 78, 87, 99, 100, 108, 110, 112, 114, 120, 129, 132, 133, 144, 147, 153, 154, 155, 159, 162, 165, 174, 177, 180, 182, 183, 185, 195, 210, 219, 225, 228, 230, 234, 237, 245, 261, 267, 270, 275, 285, 290, 297, 310
Offset: 1

Views

Author

Jonathan Vos Post, Apr 25 2005

Keywords

Comments

Extension by T. D. Noe. Wanted: closed-form formula for this as exists for Fibonacci and Lucas numbers. See also A105764 (indices of prime Lucas 5-step numbers).

Examples

			gcd(6, A074048(6)) = gcd(6,57) = 3,
gcd(20, A074048(20)) = gcd(20,743775) = 5.
gcd(21, A074048(21)) = gcd(21,1462223) = 7.
		

Crossrefs

Programs

  • Mathematica
    m=300; s = LinearRecurrence[{1, 1, 1, 1, 1}, {5, 1, 3, 7, 15}, m+1]; Select[Range[m], !CoprimeQ[#, s[[#+1]]] &] (* Amiram Eldar, Sep 05 2019 *)

Formula

gcd(a(n), A074048(a(n))) > 1.

Extensions

More terms from Amiram Eldar, Sep 05 2019

A105764 Indices of prime Lucas 5-step numbers, A074048.

Original entry on oeis.org

2, 3, 5, 7, 8, 9, 10, 13, 30, 35, 77, 98, 126, 160, 192, 810, 1086, 1999, 2021, 3157, 3426, 3471, 15066, 24115, 29782, 29941
Offset: 1

Views

Author

T. D. Noe, Apr 22 2005

Keywords

Comments

No other n < 30000.

Crossrefs

Cf. A105765 (prime Lucas 5-step numbers).

Programs

  • Mathematica
    a={-1, -1, -1, -1, 5}; lst={}; Do[s=Plus@@a; a=RotateLeft[a]; a[[ -1]]=s; If[PrimeQ[s], AppendTo[lst, n]], {n, 30000}]; lst

A106301 Primes that do not divide any term of the Lucas 5-step sequence A074048.

Original entry on oeis.org

2, 691, 3163, 4259, 5419, 6637, 6733, 14923, 25111, 27947, 29339, 34123, 34421, 34757, 42859, 55207, 57529, 59693, 61643, 68897, 70249, 75991, 82763, 83177, 85607, 86441, 87103, 93169, 93283, 98573, 106121, 106433, 114847, 129589, 132313
Offset: 1

Views

Author

T. D. Noe, May 02 2005

Keywords

Comments

If a prime p divides a term a(k) of this sequence, then k must be less than the period of the sequence mod p. Hence these primes are found by computing A074048(k) mod p for increasing k and stopping when either A074048(k) mod p = 0 or the end of the period is reached. Interestingly, for all of these primes, the period of the sequence A074048(k) mod p appears to be (p-1)/d, where d is a small integer.

Crossrefs

Cf. A053028 (primes not dividing any Lucas number), A106299 (primes not dividing any Lucas 3-step number), A106300 (primes not dividing any Lucas 4-step number).

Programs

  • Mathematica
    n=5; lst={}; Table[p=Prime[i]; a=Join[Table[ -1, {n-1}], {n}]; a=Mod[a, p]; a0=a; While[s=Mod[Plus@@a, p]; a=RotateLeft[a]; a[[n]]=s; !(a==a0 || s==0)]; If[s>0, AppendTo[lst, p]], {i, 10000}]; lst

A105765 Prime Lucas 5-step numbers, A074048.

Original entry on oeis.org

3, 7, 31, 113, 223, 439, 863, 6553, 641449337, 18837477823, 40276345611255837298559, 58893004546665606516457357571, 9774215601155945008361439560567878777
Offset: 1

Views

Author

T. D. Noe, Apr 22 2005

Keywords

Crossrefs

Cf. A105764 (indices of prime Lucas 5-step numbers).

Programs

  • Mathematica
    a={-1, -1, -1, -1, 5}; lst={}; Do[s=Plus@@a; a=RotateLeft[a]; a[[ -1]]=s; If[PrimeQ[s], AppendTo[lst, s]], {n, 1000}]; lst

A075156 Binomial transform of pentanacci numbers A074048: a(n) = Sum_{k=0..n} binomial(n,k)*A074048(k).

Original entry on oeis.org

5, 6, 10, 24, 70, 216, 664, 2008, 5998, 17808, 52770, 156360, 463492, 1374392, 4076222, 12090144, 35859742, 106359928, 315460168, 935639768, 2775057510, 8230670416, 24411730298, 72403913480, 214746249796, 636926269816
Offset: 0

Views

Author

Mario Catalani (mario.catalani(AT)unito.it), Sep 07 2002

Keywords

Crossrefs

Cf. A074048.

Programs

  • Maple
    M := Matrix(5, (i,j)-> if (i=j-1) then 1 elif j>1 then 0 else [6,-13,14,-7,2][i] fi); a := n -> (Matrix([[70,24,10,6,5]]).M^(n))[1,5]; seq (a(n), n=0..50); # Alois P. Heinz, Jul 25 2008
  • Mathematica
    CoefficientList[Series[(5-24*x+39*x^2-28*x^3+7*x^4)/(1-6*x+13*x^2-14*x^3+7*x^4-2*x^5), {x, 0, 25}], x]
    LinearRecurrence[{6,-13,14,-7,2},{5,6,10,24,70},30] (* Harvey P. Dale, Mar 10 2019 *)

Formula

a(n) = 6a(n-1) - 13a(n-2) + 14a(n-3) - 7a(n-4) + 2a(n-5), a(0)=5, a(1)=6, a(2)=10, a(3)=24, a(4)=70.
G.f.: (5 - 24*x + 39*x^2 - 28*x^3 + 7*x^4)/(1 - 6*x + 13*x^2 - 14*x^3 + 7*x^4 - 2*x^5).
a(n) = term (1,5) in the 1 X 5 matrix [70,24,10,6,5]. [6,1,0,0,0; -13,0,1,0,0; 14,0,0,1,0; -7,0,0,0,1; 2,0,0,0,0]^n. - Alois P. Heinz, Jul 25 2008

A075194 Binomial transform of pentanacci numbers A074048: a(n)=Sum((-1)^k*Binomial(n,k)*A074048(k),(k=0,..,n)).

Original entry on oeis.org

5, 4, 6, 4, 6, 4, 0, -24, -82, -212, -454, -876, -1548, -2544, -3858, -5276, -6050, -4348, 3744, 25768, 75206, 174444, 357858, 673076, 1175972, 1909904, 2851270, 3789508, 4089238, 2255044, -4809280, -22969880, -62544962, -140412180, -281990486, -521513324, -896946156, -1432099056
Offset: 0

Views

Author

Mario Catalani (mario.catalani(AT)unito.it), Sep 08 2002

Keywords

Crossrefs

Cf. A074048.

Programs

  • Mathematica
    CoefficientList[Series[(5-16x+15x^2-5x^4)/(1-4x+5x^2-5x^4+4x^5), {x, 0, 40}], x]

Formula

a(n)=4a(n-1)-5a(n-2)+5a(n-4)-4a(n-5), a(0)=5, a(1)=4, a(2)=6, a(3)=4, a(4)=6. G.f.: (5-16x+15x^2-5x^4)/(1-4x+5x^2-5x^4+4x^5).

A001591 Pentanacci numbers: a(n) = a(n-1) + a(n-2) + a(n-3) + a(n-4) + a(n-5), a(0)=a(1)=a(2)=a(3)=0, a(4)=1.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 2, 4, 8, 16, 31, 61, 120, 236, 464, 912, 1793, 3525, 6930, 13624, 26784, 52656, 103519, 203513, 400096, 786568, 1546352, 3040048, 5976577, 11749641, 23099186, 45411804, 89277256, 175514464, 345052351, 678355061, 1333610936, 2621810068
Offset: 0

Views

Author

Keywords

Comments

Number of permutations satisfying -k <= p(i) - i <= r, i=1..n-4, with k=1, r=4. - Vladimir Baltic, Jan 17 2005
a(n) is the number of compositions of n-4 with no part greater than 5. - Vladimir Baltic, Jan 17 2005
The pentanomial (A035343(n)) transform of a(n) is a(5n+4), n >= 0. - Bob Selcoe, Jun 10 2014
a(n) is the number of ways to tile a strip of length n-4 with squares, dominoes, trominoes (of length 3), and rectangles with length 4 (tetraminoes) and length 5 (pentaminoes). - Wajdi Maaloul, Jun 21 2022

Examples

			n=2: a(14) = (1*1 + 2*1 + 3*2 + 4*4 + 5*8 + 4*16 + 3*31 + 2*61 + 1*120) = 464. - _Bob Selcoe_, Jun 10 2014
G.f. = x^4 + x^5 + 2*x^6 + 4*x^7 + 8*x^8 + 16*x^9 + 31*x^10 + 120*x^11 + ...
		

References

  • Silvia Heubach and Toufik Mansour, Combinatorics of Compositions and Words, CRC Press, 2010.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Row 5 of arrays A048887 and A092921 (k-generalized Fibonacci numbers).
Cf. A106303 (Pisano period lengths).
Cf. A035343 (pentanomial coefficients).

Programs

  • Magma
    a:=[0,0,0,0,1]; [n le 5 select a[n] else Self(n-1) + Self(n-2) + Self(n-3) + Self(n-4) + Self(n-5): n in [1..40]]; // Marius A. Burtea, Oct 03 2019
    
  • Maple
    g:=1/(1-z-z^2-z^3-z^4-z^5): gser:=series(g, z=0, 49): seq((coeff(gser, z, n)), n=-4..32); # Zerinvary Lajos, Apr 17 2009
    # second Maple program:
    a:= n-> (<<0|1|0|0|0>, <0|0|1|0|0>, <0|0|0|1|0>, <0|0|0|0|1>, <1|1|1|1|1>>^n)[1, 5]:
    seq(a(n), n=0..44);  # Alois P. Heinz, Apr 09 2021
  • Mathematica
    CoefficientList[Series[x^4/(1 - x - x^2 - x^3 - x^4 - x^5), {x, 0, 50}], x]
    a[0] = a[1] = a[2] = a[3] = 0; a[4] = a[5] = 1; a[n_] := a[n] = 2 a[n - 1] - a[n - 6]; Array[a, 37, 0]
    LinearRecurrence[{1, 1, 1, 1, 1}, {0, 0, 0, 0, 1}, 50] (* Vladimir Joseph Stephan Orlovsky, May 25 2011 *)
  • Maxima
    a(n):=mod(floor(10^((n-4)*(n+1))*10^(5*(n+1))*(10^(n+1)-1)/(10^(6*(n+1))-2*10^(5*(n+1))+1)),10^n); /* Tani Akinari, Apr 10 2014 */
    
  • PARI
    a=vector(100);a[4]=a[5]=1;for(n=6,#a,a[n]=a[n-1]+a[n-2]+a[n-3]+a[n-4]+a[n-5]);concat(0, a) \\ Charles R Greathouse IV, Jul 15 2011
    
  • PARI
    A001591(n,m=5)=(matrix(m,m,i,j,i==j-1||i==m)^n)[1,m] \\ M. F. Hasler, Apr 20 2018
    
  • PARI
    a(n)= {my(x='x, p=polrecip(1 - x - x^2 - x^3 - x^4 - x^5)); polcoef(lift(Mod(x, p)^n), 4); }
    vector(41, n, a(n-1)) \\ Joerg Arndt, May 16 2021
    
  • Python
    def pentanacci():
        a, b, c, d, e = 0, 0, 0, 0, 1
        while True:
            yield a
            a, b, c, d, e = b, c, d, e, a + b + c + d + e
    f = pentanacci()
    print([next(f) for  in range(100)]) # _Reza K Ghazi Apr 09 2021

Formula

G.f.: x^4/(1 - x - x^2 - x^3 - x^4 - x^5). - Simon Plouffe in his 1992 dissertation.
G.f.: Sum_{n >= 0} x^(n+4) * (Product_{k = 1..n} (k + k*x + k*x^2 + k*x^3 + x^4)/(1 + k*x + k*x^2 + k*x^3 + k*x^4)). - Peter Bala, Jan 04 2015
Another form of the g.f.: f(z) = (z^4-z^5)/(1-2*z+z^6); then a(n) = Sum_{i=0..floor((n-4)/6)} ((-1)^i*binomial(n-4-5*i,i)*2^(n-4-6*i)) - Sum_{i=0..floor((n-5)/6)} ((-1)^i*binomial(n-5-5*i,i)*2^(n-5-6*i)) with convention Sum_{i=m..n} alpha(i) = 0 for m > n. - Richard Choulet, Feb 22 2010
a(n) = Sum_{k=1..n} (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, Aug 30 2010
Sum_{k=0..4*n} a(k+b)*A035343(n,k) = a(5*n+b), b >= 0.
a(n) = 2*a(n-1) - a(n-6). - Vincenzo Librandi, Dec 19 2010
a(n) = (Sum_{i=0..n-1} a(i)*A074048(n-i))/(n-4) for n > 4. - Greg Dresden and Advika Srivastava, Oct 01 2019
For k>0 and n>0, a(n+5*k) = A074048(k)*a(n+4*k) - A123127(k-1)*a(n+3*k) + A123126(k-1)*a(n+2*k) - A074062(k)*a(n+k) + a(n). - Kai Wang, Sep 06 2020
lim n->oo a(n)/a(n-1) = A103814. - R. J. Mathar, Mar 11 2024
Showing 1-10 of 31 results. Next