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!)
A119979 a(n+1)=(2^a(n) mod n)+1, with a(0)=1. 1
1, 1, 3, 1, 3, 3, 2, 5, 6, 5, 11, 9, 6, 9, 3, 9, 3, 9, 19, 9, 9, 7, 14, 17, 23, 21, 9, 9, 20, 17, 5, 1, 3, 9, 23, 33, 15, 13, 3, 9, 21, 9, 40, 13, 3, 9, 43, 33, 30, 25, 3, 9, 36, 29, 18, 9, 57, 3, 9, 33, 54, 17, 33, 1, 3, 9, 44, 17, 42, 65, 21, 9, 2, 5, 33, 13, 31, 51, 68, 17, 15, 51, 56, 5, 33 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
a(n+1)=(2^a(n) mod n)+1, with a(0)=0.
EXAMPLE
a(0)=1.
a(1)=(2^1 mod 1)+1=(2 mod 1)+1=0+1=1.
a(2)=(2^1 mod 2)+1=(2 mod 2)+1=0+1=1.
a(3)=(2^1 mod 3)+1=(2 mod 3)+1=2+1=3.
a(4)=(2^3 mod 4)+1=(8 mod 4)+1=0+1=1
MAPLE
P:=proc(n) local i, j, k; j:=0; k:=1; for i from 1 by 1 to n do j:=(2^k mod i)+1; k:=j; print(j); od; end: P(100);
MATHEMATICA
nxt[{n_, a_}]:={n+1, PowerMod[2, a, n+1]+1}; NestList[nxt, {1, 1}, 90][[All, 2]] (* Harvey P. Dale, Dec 13 2018 *)
CROSSREFS
Sequence in context: A205453 A328776 A110629 * A143149 A268498 A059787
KEYWORD
easy,nonn
AUTHOR
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 March 28 20:05 EDT 2024. Contains 371254 sequences. (Running on oeis4.)