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!)
A112987 a(n) = 2^(2^n mod n) for n > 0; a(0) = 2. 3
2, 1, 1, 4, 1, 4, 16, 4, 1, 256, 16, 4, 16, 4, 16, 256, 1, 4, 1024, 4, 65536, 256, 16, 4, 65536, 128, 16, 67108864, 65536, 4, 16, 4, 1, 256, 16, 262144, 268435456, 4, 16, 256, 65536, 4, 4194304, 4, 65536, 131072, 16, 4, 65536, 1073741824, 16777216, 256 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
The definition of a(0) is motivated by the idea that (anything)^n = 1 for n = 0. We also get this if "mod n" is replaced by "in Z/nZ", for n = 0. - M. F. Hasler, Nov 09 2018
LINKS
FORMULA
a(n) = 2^A015910(n) for n > 0. [Corrected by M. F. Hasler, Nov 09 2018]
MATHEMATICA
Join[{2}, 2^Table[PowerMod[2, n, n], {n, 85}]] (* Vincenzo Librandi, Nov 09 2018 *)
PROG
(PARI) apply( A112987(n)=2^lift(if(n, Mod(2, n))^n), [0..50]) \\ M. F. Hasler, Nov 09 2018
(Magma) [2] cat [2^Modexp(2, n, n): n in [1..60]]; // Vincenzo Librandi, Nov 09 2018
CROSSREFS
Cf. A015910.
Sequence in context: A344529 A144389 A136321 * A125138 A021477 A124939
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Oct 08 2005
EXTENSIONS
Name edited by M. F. Hasler, Nov 09 2018
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 29 06:57 EDT 2024. Contains 371265 sequences. (Running on oeis4.)