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.

A268368 An eventually quasi-quadratic sequence satisfying a Hofstadter-like recurrence.

Original entry on oeis.org

0, 1, 0, 4, 4, 4, 3, 12, 8, 4, 3, 24, 12, 4, 3, 40, 16, 4, 3, 60, 20, 4, 3, 84, 24, 4, 3, 112, 28, 4, 3, 144, 32, 4, 3, 180, 36, 4, 3, 220, 40, 4, 3, 264, 44, 4, 3, 312, 48, 4, 3, 364, 52, 4, 3, 420, 56, 4, 3, 480, 60, 4, 3, 544, 64, 4, 3, 612, 68, 4, 3, 684
Offset: 1

Views

Author

Nathan Fox, Feb 23 2016

Keywords

Comments

a(n) is the solution to the recurrence relation a(n) = a(n-a(n-1)) + a(n-a(n-2)) + a(n-a(n-3)), with the initial conditions: a(n) = 0 if n <= 0; a(1) = 0, a(2) = 1, a(3) = 0, a(4) = 4, a(5) = 4, a(6) = 4, a(7) = 3.

Crossrefs

Programs

  • PARI
    concat(0, Vec(x^2*(1 + 4*x^2 + 4*x^3 + x^4 + 3*x^5 - 4*x^7 - 5*x^8 - 6*x^9 + 3*x^12 + 3*x^13) / ((1 - x)^3*(1 + x)^3*(1 + x^2)^3) + O(x^100))) \\ Colin Barker, Jun 22 2017

Formula

a(2) = 1, a(3) = 0; otherwise a(4n) = 2n^2+2n, a(4n+1) = 4n, a(4n+2) = 4, a(4n+3) = 3.
From Colin Barker, Jun 22 2017: (Start)
G.f.: x^2*(1 + 4*x^2 + 4*x^3 + x^4 + 3*x^5 - 4*x^7 - 5*x^8 - 6*x^9 + 3*x^12 + 3*x^13) / ((1 - x)^3*(1 + x)^3*(1 + x^2)^3).
a(n) = 3*a(n-4) - 3*a(n-8) + a(n-12) for n>12.
(End)