A110658 a(n) = A028242(A028242(A028242(n))).
1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 4, 3, 2, 4, 3, 2, 4, 3, 5, 4, 3, 5, 4, 3, 5, 4, 6, 5, 4, 6, 5, 4, 6, 5, 7, 6, 5, 7, 6, 5, 7, 6, 8, 7, 6, 8, 7, 6, 8, 7, 9, 8, 7, 9, 8, 7, 9, 8, 10, 9, 8, 10, 9, 8, 10, 9, 11, 10, 9, 11, 10, 9, 11, 10, 12, 11, 10, 12, 11, 10, 12, 11, 13, 12, 11, 13
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,0,1,-1)
Crossrefs
Cf. A110656.
Programs
-
Mathematica
A028242[n_] := (1 + 2*n + 3*(-1)^n)/4; Table[A028242[A028242[ A028242[n] ]], {n, 0, 50}] (* G. C. Greubel, Sep 03 2017 *)
Formula
a(n) = floor(n/8) + (4 - (n mod 8) mod 3) mod 3.
G.f.: (x^2-x+1)*(x^6-2*x^4+x^2+1) / ((x-1)^2*(x+1)*(x^2+1)*(x^4+1)). - Colin Barker, Apr 01 2013