login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A125678 a(0) = 1; for n>0, a(n) = (a(n-1)^2 reduced mod n) + 1. 1
1, 1, 2, 2, 1, 2, 5, 5, 2, 5, 6, 4, 5, 13, 2, 5, 10, 16, 5, 7, 10, 17, 4, 17, 2, 5, 26, 2, 5, 26, 17, 11, 26, 17, 18, 10, 29, 28, 25, 2, 5, 26, 5, 26, 17, 20, 33, 9, 34, 30, 1, 2, 5, 26, 29, 17, 10, 44, 23, 58, 5, 26, 57, 37, 26, 27, 4, 17, 18, 49, 22, 59, 26, 20, 31, 62, 45, 24, 31, 14, 37 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
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
Sequence in context: A209555 A059594 A183760 * A091562 A106585 A057227
KEYWORD
easy,nonn
AUTHOR
Leroy Quet, Jan 30 2007
EXTENSIONS
Extended by Ray Chandler, Feb 08 2007
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 3 04:24 EDT 2024. Contains 372205 sequences. (Running on oeis4.)