%I #10 Jan 08 2021 18:34:25
%S 2,1,0,3,4,5,1,4,0,9,7,8,10,11,13,2,10,17,8,19,8,21,12,5,2,25,20,15,8,
%T 1,4,7,12,15,24,31,3,14,25,38,12,25,1,18,35,4,27,10,41,20,49,28,4,39,
%U 21,4,45,26,8,49,27,10,2,57,45,32,28,25,27,26,24,23,25,28,32,35,39,46,52,61
%N a(1) = 2; for n > 1, a(n) = (a(n-1) + prime(n)) mod n.
%H Harvey P. Dale, <a href="/A088523/b088523.txt">Table of n, a(n) for n = 1..1000</a>
%t a[1] = 2; a[n_] := a[n] = Mod[a[n - 1] + Prime[n], n]; Table[a[n], {n, 68, 81}]
%t nxt[{n_,a_}]:={n+1,Mod[a+Prime[n+1],n+1]}; NestList[nxt,{1,2},80][[All,2]] (* _Harvey P. Dale_, Jan 08 2021 *)
%Y Cf. A088521, A088522, A006257.
%K nonn,easy
%O 1,1
%A _N. J. A. Sloane_, Nov 14 2003
%E More terms from _Robert G. Wilson v_ and _Ray Chandler_, Nov 15 2003
|