OFFSET
0,1
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Bertrand Teguia Tabuguia, Hypergeometric-Type Sequences, arXiv:2401.00256 [cs.SC], 2023. See p. 20.
Index entries for linear recurrences with constant coefficients, signature (0,0,1).
FORMULA
From Colin Barker, Oct 04 2019: (Start)
G.f.: (21 + 64*x + 32*x^2 - 5*x^3 - 56*x^4 - 28*x^5 - 14*x^6 - 7*x^7) / ((1 - x)*(1 + x + x^2)).
a(n) = a(n-3) for n>15.
(End)
MATHEMATICA
NestList[If[EvenQ[#], #/2, 3#+1]&, 21, 100] (* or *) PadRight[ {21, 64, 32, 16, 8}, 100, {2, 1, 4}] (* Harvey P. Dale, Sep 30 2018 *)
PROG
(PARI) Vec((21 + 64*x + 32*x^2 - 5*x^3 - 56*x^4 - 28*x^5 - 14*x^6 - 7*x^7) / ((1 - x)*(1 + x + x^2)) + O(x^80)) \\ Colin Barker, Oct 04 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved