login
Digital roots of centered square numbers (A001844).
2

%I #14 Aug 26 2015 17:09:06

%S 1,5,4,7,5,7,4,5,1,1,5,4,7,5,7,4,5,1,1,5,4,7,5,7,4,5,1,1,5,4,7,5,7,4,

%T 5,1,1,5,4,7,5,7,4,5,1,1,5,4,7,5,7,4,5,1,1,5,4,7,5,7,4,5,1,1,5,4,7,5,

%U 7,4,5,1,1,5,4,7,5,7,4,5,1,1,5,4,7,5

%N Digital roots of centered square numbers (A001844).

%C The sequence is periodic with period 9.

%H Colin Barker, <a href="/A254373/b254373.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Rec#order_09">Index entries for linear recurrences with constant coefficients</a>, signature (0, 0, 0, 0, 0, 0, 0, 0, 1).

%F a(n) = A010888(A001844(n)).

%F a(n) = a(n-9).

%F G.f.: -x*(x^8+5*x^7+4*x^6+7*x^5+5*x^4+7*x^3+4*x^2+5*x+1) / ((x-1)*(x^2+x+1)*(x^6+x^3+1)).

%e a(3) = 4 because the 3rd centered square number is 13, the digital root of which is 4.

%t FixedPoint[Plus @@ IntegerDigits[#] &, #] & /@ Table[2 n (n + 1) + 1, {n, 0, 80}] (* _Michael De Vlieger_, Feb 01 2015 *)

%t LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 0, 1},{1, 5, 4, 7, 5, 7, 4, 5, 1},86] (* _Ray Chandler_, Aug 26 2015 *)

%o (PARI) m=4; vector(200, n, (m*n*(n-1)/2)%9+1)

%Y Cf. A001844, A010888.

%K nonn,easy,base

%O 1,2

%A _Colin Barker_, Jan 29 2015