OFFSET
1,1
COMMENTS
From a(2) onwards, the digital root follows the pattern alternately 4,7,4,7,4,7,...
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0,28).
FORMULA
a(1) = 2, a(2) = 4, a(3) = 16. a(2*n) = 4*a(2*n-1), a(2*n+1) = 7*a(2*n) for n > 1.
From Colin Barker, May 05 2016: (Start)
a(n) = 2^(-1+n)*(7^(1/2*(-3+n))*(2-2*(-1)^n + sqrt(7) + (-1)^n*sqrt(7))) for n > 1.
a(n) = 2^n*7^(n/2-1) for n > 1 and even.
a(n) = 2^(n+1)*7^((n-3)/2) for n > 1 and odd.
a(n) = 28*a(n-2) for n > 3.
G.f.: 2*x*(1+2*x-20*x^2) / (1-28*x^2).
(End)
E.g.f.: (-7 + 70*x + 7*cosh(2*Sqrt(7)*x) + 2*sqrt(7)*sinh(2*sqrt(7)*x))/49. - Ilya Gutkovskiy, May 05 2016
MATHEMATICA
k = 2; Do[Print[k]; k *= Mod[Plus @@ IntegerDigits[k], 9], {n, 1, 30}] (* Ryan Propper, Oct 13 2005 *)
LinearRecurrence[{0, 28}, {2, 4, 16}, 30] (* Harvey P. Dale, Mar 17 2019 *)
PROG
(PARI) Vec(2*x*(1+2*x-20*x^2)/(1-28*x^2) + O(x^50)) \\ Colin Barker, May 05 2016
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Amarnath Murthy, Jul 24 2005
EXTENSIONS
More terms from Ryan Propper, Oct 13 2005
Name clarified by Robert Israel, May 05 2016
STATUS
approved