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

A309704 a(1) = 3, a(2) = 4, a(3) = 5, a(4) = 4, a(5) = 5; a(6) = 6; a(n) = a(n-a(n-1)) + a(n-a(n-4)) for n > 6.

Original entry on oeis.org

3, 4, 5, 4, 5, 6, 7, 7, 8, 8, 9, 10, 10, 10, 11, 11, 13, 12, 14, 14, 14, 15, 15, 16, 17, 17, 18, 18, 19, 19, 20, 20, 20, 21, 21, 22, 24, 23, 23, 25, 24, 26, 27, 27, 26, 28, 28, 28, 29, 29, 30, 31, 31, 32, 32, 33, 33, 34, 35, 35, 35, 36, 36, 37, 37, 38, 39, 39, 39, 40, 40, 40, 41, 41, 42, 43, 43, 45, 45, 45, 45, 48, 44, 48, 49, 47, 52, 47, 51, 50, 47, 52, 50, 54, 52, 54, 55, 54, 54, 56
Offset: 1

Views

Author

Altug Alkan and Rémy Sigrist, Aug 13 2019

Keywords

Comments

This sequence is finite but has an exceptionally long life: a(3080193026) = 3101399868 is its last term since a(3080193027) refers to a nonpositive index and thus fails to exist. See plots in Links section to fractal-like structure of a(n)-n/2.

Crossrefs

Programs

  • Mathematica
    Nest[Append[#, #[[-#[[-1]] ]] + #[[-#[[-4]] ]]] &, {3, 4, 5, 4, 5, 6}, 94] (* Michael De Vlieger, May 08 2020 *)
  • PARI
    q=vector(100); q[1]=3; q[2]=4; q[3]=5; q[4]=4; q[5]=5; q[6]=6; for(n=7, #q, q[n] = q[n-q[n-1]] + q[n-q[n-4]]); q

Extensions

a(3080193026) from Giovanni Resta, Aug 13 2019

A309967 a(1) = a(2) = 1, a(3) = 2, a(4) = 3, a(5) = 8, a(6) = 6, a(7) = a(8) = 4; a(n) = a(n-a(n-1)) + a(n-a(n-4)) for n > 8.

Original entry on oeis.org

1, 1, 2, 3, 8, 6, 4, 4, 9, 4, 8, 7, 9, 12, 6, 13, 7, 14, 17, 6, 18, 7, 19, 22, 6, 23, 7, 24, 27, 6, 28, 7, 29, 32, 6, 33, 7, 34, 37, 6, 38, 7, 39, 42, 6, 43, 7, 44, 47, 6, 48, 7, 49, 52, 6, 53, 7, 54, 57, 6, 58, 7, 59, 62, 6, 63, 7, 64, 67, 6, 68, 7, 69, 72, 6, 73, 7, 74, 77, 6, 78, 7
Offset: 1

Views

Author

Altug Alkan, Aug 25 2019

Keywords

Comments

A quasilinear solution sequence for Hofstadter V recurrence (a(n) = a(n-a(n-1)) + a(n-a(n-4))).

Crossrefs

Programs

  • PARI
    q=vector(100); q[1]=q[2]=1; q[3]=2; q[4]=3; q[5]=8; q[6]=6; q[7]=q[8]=4; for(n=9, #q, q[n]=q[n-q[n-1]]+q[n-q[n-4]]); q
    
  • PARI
    Vec(x*(1 + x + 2*x^2 + 3*x^3 + 8*x^4 + 4*x^5 + 2*x^6 + 3*x^8 - 12*x^9 - 3*x^10 +  3*x^12 - 3*x^13 + 6*x^14 + 3*x^15 - 3*x^16 + 2*x^18 - 2*x^19) / ((1 - x)^2*(1 + x + x^2 + x^3 + x^4)^2) + O(x^40)) \\ Colin Barker, Aug 25 2019

Formula

For k > 2:
a(5*k-4) = 5*k-7,
a(5*k-3) = 7,
a(5*k-2) = 5*k-6,
a(5*k-1) = 5*k-3,
a(5*k) = 6.
From Colin Barker, Aug 25 2019: (Start)
G.f.: x*(1 + x + 2*x^2 + 3*x^3 + 8*x^4 + 4*x^5 + 2*x^6 + 3*x^8 - 12*x^9 - 3*x^10 + 3*x^12 - 3*x^13 + 6*x^14 + 3*x^15 - 3*x^16 + 2*x^18 - 2*x^19) / ((1 - x)^2*(1 + x + x^2 + x^3 + x^4)^2).
a(n) = 2*a(n-5) - a(n-10) for n > 20.
(End)
Showing 1-2 of 2 results.