OFFSET

0,3

LINKS

Robert Israel, Table of n, a(n) for n = 0..10000

MAPLE

A[0]:= 0:

for n from 1 to 100 do A[n]:= (A[n-1]^2 mod n) + 1 od:

seq(A[i], i=0..100); # Robert Israel, Dec 05 2016

MATHEMATICA

f[l_List] := Append[l, Mod[l[[ -1]]^2, Length[l]] + 1]; Nest[f, {1}, 83] (* Ray Chandler, Feb 08 2007 *)

CROSSREFS

KEYWORD

easy,nonn

AUTHOR

Leroy Quet, Jan 30 2007

EXTENSIONS

Extended by Ray Chandler, Feb 08 2007

STATUS

approved