%I #4 Jun 20 2021 08:35:20
%S 1,2,3,5,11,2,3,5,11,2,3,5,11,2,3,5,11,2,3,5,11,2,3,5,11,2,3,5,11,2,3,
%T 5,11,2,3,5,11,2,3,5,11,2,3,5,11,2,3,5,11,2,3,5,11,2,3,5,11,2,3,5,11,
%U 2,3,5,11,2,3,5,11,2,3,5,11,2,3,5,11,2,3,5,11,2,3,5,11,2,3,5,11,2,3,5,11,2
%N a(1)=1; a(n)=prime(mod(a(n-1),10)).
%C Starting with the second term, cycles every four terms.
%C Not the same sequence as a(1)=1; a(n)=mod(prime(a(n-1)),10).
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,1).
%F a(1)=1; a(n)=prime(mod(a(n-1),10)).
%F G.f.: x -x^2*(2+3*x+5*x^2+11*x^3) / ( (x-1)*(1+x)*(1+x^2) ). - _R. J. Mathar_, Jun 20 2021
%t f[s_List] := Block[{}, Append[s, Prime@ Last@ Mod[s, 10]]]; Nest[f, {1}, 93]
%K nonn,less,easy
%O 1,2
%A _Robert G. Wilson v_, May 13 2007
%E NAME adapted to offset. - _R. J. Mathar_, Jun 20 2021
|