cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A064367 a(n) = 2^n mod prime(n).

Original entry on oeis.org

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

Views

Author

Labos Elemer, Sep 27 2001

Keywords

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

Crossrefs

Programs

  • 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 *)
  • PARI
    a(n) = { lift(Mod(2,prime(n))^n) } \\ Harry J. Smith, Sep 12 2009

Formula

a(n) = A000079(n) mod A000040(n).

Extensions

Definition corrected by Harry J. Smith, Sep 12 2009