OFFSET
0,2
LINKS
E. Hetmaniok, M. Pleszczynski, I. Sobstyl, R. Witula, Kaprekar's transformations. Part II-numerical results and intriguing corollaries, Position Papers of the Federated Conference on Computer Science and Information Systems pp. 97-104, ACSIS, Vol. 6; DOI: 10.15439/2015F15.
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
A007318 * [1, 3, 3, 1, 1, -1, 1, -1, 1, ...].
From Emeric Deutsch, Jun 03 2008: (Start)
a(n) = n*(11 + n^2)/3 for n >= 1.
G.f.: (1+x^4)/(1-x)^4. (End)
EXAMPLE
a(5) = 36 = (1, 4, 6, 4, 1) dot (1, 3, 3, 1, 1) = (1 + 12 + 18 + 4 + 1).
MAPLE
1, seq((1/3)*n*(11+n^2), n=1..35); # Emeric Deutsch, Jun 03 2008
MATHEMATICA
CoefficientList[Series[(1+x^4)/(1-x)^4, {x, 0, 50}], x] (* or *) LinearRecurrence[{4, -6, 4, -1}, {1, 4, 10, 20, 36}, 50] (* Harvey P. Dale, Aug 17 2021 *)
PROG
(PARI) a(n)=max(n*(11 + n^2)/3, 1) \\ Charles R Greathouse IV, Oct 19 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gary W. Adamson, May 12 2008
EXTENSIONS
More terms from Emeric Deutsch, Jun 03 2008
STATUS
approved