login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

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

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

Sequence in context: A209555 A059594 A183760 * A091562 A106585 A057227

Adjacent sequences:  A125675 A125676 A125677 * A125679 A125680 A125681

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 17 09:32 EST 2020. Contains 330949 sequences. (Running on oeis4.)