login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A064367
a(n) = 2^n mod prime(n).
6
0, 1, 3, 2, 10, 12, 9, 9, 6, 9, 2, 26, 33, 1, 9, 28, 33, 27, 13, 48, 8, 36, 47, 4, 95, 20, 76, 62, 23, 4, 8, 117, 68, 25, 138, 64, 150, 43, 61, 10, 72, 156, 40, 12, 73, 51, 48, 41, 24, 26, 71, 48, 32, 16, 128, 173, 74, 110, 118, 59, 30, 247, 202, 208, 284, 53, 128, 32, 139
OFFSET
1,3
COMMENTS
Below the exponent n=10000, some integers (like 5,7,14,17,19,22,...,44, etc.) are not yet present among residues. Will they appear later?
For a(n) with n <= 10^6, the following residues have not yet appeared: {19, 22, 46, 52, 57, 65, 70, 77, 81, 85, 88, 90, 91, 103, 104, 106, 108, 115, 120, 122, 123, 125, ..., 15472319} (14537148 terms). - Michael De Vlieger, Jul 16 2017
Heuristically, the probability of 2^n mod prime(n) taking a given value is approximately 1/prime(n) for large n. Since the sum of 1/prime(n) diverges, we should expect each positive integer to appear infinitely many times in the sequence. However, since the sum diverges very slowly, the first n where it appears may be very large. - Robert Israel, Jul 17 2017
LINKS
FORMULA
a(n) = A000079(n) mod A000040(n).
MAPLE
seq(2 &^ n mod ithprime(n), n=1..100); # Robert Israel, Jul 17 2017
MATHEMATICA
Array[PowerMod[2, #, Prime@ #] &, 69] (* Michael De Vlieger, Jul 16 2017 *)
PROG
(PARI) a(n) = { lift(Mod(2, prime(n))^n) } \\ Harry J. Smith, Sep 12 2009
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Labos Elemer, Sep 27 2001
EXTENSIONS
Definition corrected by Harry J. Smith, Sep 12 2009
STATUS
approved