login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A131644 a(n) = 2^(a(n-1)) mod n. 4
0, 1, 2, 0, 1, 2, 4, 0, 1, 2, 4, 4, 3, 8, 1, 2, 4, 16, 5, 12, 1, 2, 4, 16, 11, 20, 4, 16, 25, 2, 4, 16, 31, 26, 4, 16, 9, 18, 25, 32, 37, 2, 4, 16, 16, 32, 42, 16, 23, 8, 1, 2, 4, 16, 31, 16, 43, 56, 15, 8, 12, 4, 16, 0, 1, 2, 4, 16, 55, 58, 29, 32, 32, 44, 16, 24, 71, 20, 9, 32, 49, 20, 37 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

All positive integers seem to occur somewhere in this sequence (a proof would be nice!).

The first occurrence of 6 is at a(59474).

The first occurrence of 33 is at a(2514233).

a(A192362(n)) = n and a(m) <> n for m < A192362(n). - Reinhard Zumkeller, Jun 30 2011

The first occurrence of 75 is at a(8654593). - Reinhard Zumkeller, Jan 30 2015

LINKS

N. J. A. Sloane and T. D. Noe, Table of n, a(n) for n = 1..60000 (the first 1000 terms from T. D. Noe)

FORMULA

a(n) = 2^(a(n-1)) mod n, a(1) = 0

EXAMPLE

a(11) = 4, so a(12) = 2^a(11) mod 12 = 16 mod 12 = 4.

MATHEMATICA

Transpose[NestList[{Mod[2^First[#], Last[#]+1], Last[#]+1}&, {0, 1}, 95]][[1]]  (* Harvey P. Dale, Apr 17 2011 *)

Join[{s=0}, Table[s = PowerMod[2, s, n], {n, 2, 100}]] (* T. D. Noe, Apr 17 2011 *)

PROG

(Haskell)

import Math.NumberTheory.Moduli (powerMod)

a131644 n = a131644_list !! (n-1)

a131644_list = map fst $ iterate f (0, 2) where

   f (v, w) = (powerMod 2 v w, w + 1)

-- Reinhard Zumkeller, Jan 30 2015

CROSSREFS

For records see A241582, A241583, also A192362.

Sequence in context: A023858 A011118 A304784 * A115346 A140531 A117316

Adjacent sequences:  A131641 A131642 A131643 * A131645 A131646 A131647

KEYWORD

easy,nonn,nice

AUTHOR

Jon Ayres (jonathan.ayres(AT)ntlworld.com), Sep 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 September 16 18:24 EDT 2019. Contains 327116 sequences. (Running on oeis4.)