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.

A074048 Pentanacci numbers with initial conditions a(0)=5, a(1)=1, a(2)=3, a(3)=7, a(4)=15.

Original entry on oeis.org

5, 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
Offset: 0

Views

Author

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

Keywords

Comments

These pentanacci numbers follow the same pattern as Lucas, generalized tribonacci(A001644) and generalized tetranacci (A073817) numbers: Binet's formula is a(n)=r1^n+r^2^n+r3^n+r4^n+r5^n, with r1, r2, r3, r4, r5 roots of the characteristic polynomial. a(n) is also the trace of A^n, where A is the pentamatrix ((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)).
For n >= 5, a(n) is the number of cyclic sequences consisting of n zeros and ones that do not contain five consecutive ones provided the positions of the zeros and ones are fixed on a circle. This is proved in Charalambides (1991) and Zhang and Hadjicostas (2015). (For n=1,2,3,4 the statement is still true provided we allow the sequence to wrap around itself on a circle). - Petros Hadjicostas, Dec 18 2016
a(3407) has 1001 decimal digits. - Michael De Vlieger, Dec 28 2016

Crossrefs

Cf. A000078, A001630, A001644, A000032, A073817, A106297 (Pisano Periods).
Essentially the same as A023424.
Cf. A106273.

Programs

  • 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, 30}], x]
    LinearRecurrence[{1, 1, 1, 1, 1}, {5, 1, 3, 7, 15}, 60] (* Vladimir Joseph Stephan Orlovsky, Feb 08 2012 *)
  • PARI
    polsym(polrecip(1-x-x^2-x^3-x^4-x^5),33) \\ Joerg Arndt, Jan 28 2019

Formula

a(n) = a(n-1) +a(n-2) +a(n-3) +a(n-4) +a(n-5).
G.f.: (5-4*x-3*x^2-2*x^3-x^4) / (1-x-x^2-x^3-x^4-x^5).
a(n) = 2*a(n-1) -a(n-6), n>5. [Vincenzo Librandi, Dec 20 2010]
For k>0 and n>=0, a(n+5*k) = a(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). For example, if k=4, n=3, we have a(n+5*k) = a(23) = 5651423, a(4)*a(19) - A123127(3)*a(15) + A123126(3)*a(1695) - A074062(4)*a(7) + a(3) = (15)*(378329) - (1)*(25327) + (1)*(1695) - (-1)*(113) + (7) = 5651423. - Kai Wang, Sep 13 2020
From Kai Wang, Dec 16 2020: (Start)
For k >= 0,
| a(k+4) a(k+5) a(k+6) a(k+7) a(k+8) |
| a(k+3) a(k+4) a(k+5) a(k+6) a(k+7) |
det | a(k+2) a(k+3) a(k+4) a(k+5) a(k+6) | = 9584 = A106273(5).
| a(k+1) a(k+2) a(k+3) a(k+4) a(k+5) |
| a(k) a(k+1) a(k+2) a(k+3) a(k+4) |
(End)

A106303 Period of the Fibonacci 5-step sequence A001591 mod n.

Original entry on oeis.org

1, 6, 104, 12, 781, 312, 2801, 24, 312, 4686, 16105, 312, 30941, 16806, 81224, 48, 88741, 312, 13032, 9372, 291304, 96630, 12166, 312, 3905, 185646, 936, 33612, 70728, 243672, 190861, 96, 1674920, 532446, 2187581, 312, 1926221, 13032
Offset: 1

Views

Author

T. D. Noe, May 02 2005

Keywords

Comments

This sequence can differ from the corresponding Lucas sequence (A106297) 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]

Crossrefs

Cf. A001591, A106273 (discriminant of the polynomial x^n-x^(n-1)-...-x-1), A106297 (period of Lucas 5-step sequence mod n).

Programs

  • Mathematica
    n=5; Table[p=i; a=Join[{1}, Table[0, {n-1}]] 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 A106303(n):
        a = b = (0,)*4+(1 % n,)
        s = 1 % 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 21-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. If a(p) != a(p^2) for p prime, then a(p^k) = p^(k-1)*a(p) for k > 0. - Chai Wah Wu, Feb 25 2022

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
Showing 1-3 of 3 results.