OFFSET
1,1
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
H. I. Okagbue, M. O. Adamu, S. A. Iyase, A. A. Opanuga, Sequence of Integers Generated by Summing the Digits of their Squares, Indian Journal of Science and Technology, Vol 8(15), DOI: 10.17485/ijst/2015/v8i15/69912, July 2015.
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,1,-1).
FORMULA
From Colin Barker, Feb 06 2016: (Start)
a(n) = a(n-1)+a(n-5)-a(n-6) for n>6.
G.f.: x*(2+x)*(1-x+x^2)*(1+x+x^2) / ((1-x)^2*(1+x+x^2+x^3+x^4)).
(End)
MATHEMATICA
Select[Range@ 100, MemberQ[{0, 2, 3, 5, 6, 8}, #] &@ FixedPoint[Total@ IntegerDigits@ # &, #] &] (* Michael De Vlieger, Feb 01 2016 *)
PROG
(PARI) Vec(x*(2+x)*(1-x+x^2)*(1+x+x^2)/((1-x)^2*(1+x+x^2+x^3+x^4)) + O(x^100)) \\ Colin Barker, Feb 06 2016
(Magma) I:=[2, 3, 5, 6, 8, 11]; [n le 6 select I[n] else Self(n-1) +Self(n-5) -Self(n-6): n in [1..70]]; // Vincenzo Librandi, Feb 06 2016
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
N. J. A. Sloane, Jan 30 2016
EXTENSIONS
Warning: the Indian Journal of Science and Technology is run by the 'Science & Knowledge Publishing Corporation Limited', which is listed in Jeffrey Beall's list (http://scholarlyoa.com/publishers/) of predatory publishers. - Michel Marcus, Jan 31 2016
STATUS
approved