%I #28 Dec 14 2023 05:32:39
%S 1,2,3,4,5,6,7,8,9,10,2,3,4,5,6,7,8,9,10,2,3,4,5,6,7,8,9,10,2,3,4,5,6,
%T 7,8,9,10,2,3,4,5,6,7,8,9,10,2,3,4,5,6,7,8,9,10,2,3,4,5,6,7,8,9,10,2,
%U 3,4,5,6,7,8,9,10,2,3,4,5,6,7,8,9,10,2,3,4,5,6,7,8,9,10,2,3,4,5,6,7,8,9,10
%N Start with 1 and repeatedly reverse the digits and add 1 to get the next term.
%H N. J. A. Sloane and others, <a href="/wiki/Sequences_of_RADD_type">Sequences of RADD type</a>, OEIS wiki.
%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 Has period 9.
%F G.f.: -x*(9*x^9 +9*x^8 +8*x^7 +7*x^6 +6*x^5 +5*x^4 +4*x^3 +3*x^2 +2*x +1) / ((x -1)*(x^2 +x +1)*(x^6 +x^3 +1)). - _Colin Barker_, May 23 2014
%p read transforms; t1:=[1]; for n from 1 to 80 do t1:=[op(t1),1+digrev(t1[n])]; od:
%t Join[{1},LinearRecurrence[{0,0,0,0,0,0,0,0,1},{2,3,4,5,6,7,8,9,10},99]] (* _Ray Chandler_, Jul 18 2015 *)
%o (PARI) a(n)=if(n>1,(n-2)%9+2,1) \\ _M. F. Hasler_, May 22 2014
%Y Cf. A117830, A117521, A117828, A117800, A117816, A117817.
%K nonn,base,easy
%O 1,2
%A _N. J. A. Sloane_, following discussions with Luc Stevens, May 04 2006
%E Correction to the terms of the sequence (inserted missing term) _Jeremy Gardiner_, Jun 17 2010
|