OFFSET
1,1
COMMENTS
Same recurrence as in A046699 but with different starting values.
This sequence is quasilinear.
LINKS
Nathan Fox, Table of n, a(n) for n = 1..1000
Nathan Fox, Finding Linear-Recurrent Solutions to Hofstadter-Like Recurrences Using Symbolic Computation, arXiv:1609.06342 [math.NT], 2016.
Index entries for linear recurrences with constant coefficients, signature (0,0,2,0,0,-1).
FORMULA
a(3n) = 3n, a(3n+1) = 3, a(3n+2) = 3n+6.
a(n) = 2*a(n-3) - a(n-6) for n>6.
G.f.: -(3*x^4 +3*x^3 -3*x^2 -6*x-3)/((x-1)^2*(x^2+x+1)^2).
MATHEMATICA
Flatten[Array[{3, 3*# + 6, 3*# + 3} &, 30, 0]] (* Paolo Xausa, Oct 23 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Nathan Fox, Jul 24 2016
STATUS
approved