login
Period 9: repeat [1, 1, 2, 4, 7, 2, 7, 4, 2].
3

%I #35 Dec 12 2023 08:52:00

%S 1,1,2,4,7,2,7,4,2,1,1,2,4,7,2,7,4,2,1,1,2,4,7,2,7,4,2,1,1,2,4,7,2,7,

%T 4,2,1,1,2,4,7,2,7,4,2,1,1,2,4,7,2,7,4,2,1,1,2,4,7,2,7,4,2,1,1,2,4,7,

%U 2,7,4,2,1,1,2,4,7,2,7,4,2,1,1,2,4,7,2,7,4,2,1,1,2,4,7,2,7,4,2,1,1,2,4,7,2

%N Period 9: repeat [1, 1, 2, 4, 7, 2, 7, 4, 2].

%C For n>0, digital roots of centered 10-gonal numbers (A062786). - _Colin Barker_, Jan 30 2015

%C For n>0, also the digital roots of central polygonal numbers (the Lazy Caterer's sequence) A000124. - _Peter M. Chema_, Sep 17 2016

%H Colin Barker, <a href="/A133292/b133292.txt">Table of n, a(n) for n = 0..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 G.f.: -(2*x^8+4*x^7+7*x^6+2*x^5+7*x^4+4*x^3+2*x^2+x+1) / ((x-1)*(x^2+x+1)*(x^6+x^3+1)). - _Colin Barker_, Apr 04 2015

%F a(n) = a(n-9). - _Wesley Ivan Hurt_, May 09 2022

%t PadRight[{},111,{1,1,2,4,7,2,7,4,2}] (* _Harvey P. Dale_, Apr 29 2012 *)

%o (PARI) a(n)=[1,1,2,4,7,2,7,4,2][n%9+1] \\ _Charles R Greathouse IV_, Jun 02 2011

%o (PARI) Vec(-(2*x^8+4*x^7+7*x^6+2*x^5+7*x^4+4*x^3+2*x^2+x+1)/((x-1)*(x^2+x+1)*(x^6+x^3+1)) + O(x^100)) \\ _Colin Barker_, Apr 04 2015

%Y Cf. A000124, A062786.

%K nonn,easy,less

%O 0,3

%A _Paul Curtz_, Oct 17 2007