A283878 An eventually quasilinear solution to Hofstadter's Q recurrence.
0, 2, 3, 1, 3, 6, 1, 3, 9, 1, 3, 12, 1, 3, 15, 1, 3, 18, 1, 3, 21, 1, 3, 24, 1, 3, 27, 1, 3, 30, 1, 3, 33, 1, 3, 36, 1, 3, 39, 1, 3, 42, 1, 3, 45, 1, 3, 48, 1, 3, 51, 1, 3, 54, 1, 3, 57, 1, 3, 60, 1, 3, 63, 1, 3, 66, 1, 3, 69, 1, 3, 72, 1, 3, 75
Offset: 1
Links
- Nathan Fox, Table of n, a(n) for n = 1..10000
- Index entries for linear recurrences with constant coefficients, signature (0, 0, 2, 0, 0, -1).
Programs
Formula
G.f.: (-x*(x^6 + x^5 + x^3 - x^2 - 3*x - 2)) / ((-1 + x)^2*(1 + x + x^2)^2).
a(n) = 2*a(n-3) - a(n-6) for n > 8.
a(1) = 0, a(2) = 2; thereafter a(3*k) = 3*k, a(3*k+1) = 1, a(3*k+2) = 3.
Comments