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).

This page as a plain text file.
%I A064367 #31 Dec 18 2024 22:28:44
%S A064367 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,
%T A064367 62,23,4,8,117,68,25,138,64,150,43,61,10,72,156,40,12,73,51,48,41,24,
%U A064367 26,71,48,32,16,128,173,74,110,118,59,30,247,202,208,284,53,128,32,139
%N A064367 a(n) = 2^n mod prime(n).
%C A064367 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?
%C A064367 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
%C A064367 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
%H A064367 Harry J. Smith, <a href="/A064367/b064367.txt">Table of n, a(n) for n = 1..1000</a>
%F A064367 a(n) = A000079(n) mod A000040(n).
%p A064367 seq(2 &^ n mod ithprime(n), n=1..100); # _Robert Israel_, Jul 17 2017
%t A064367 Array[PowerMod[2, #, Prime@ #] &, 69] (* _Michael De Vlieger_, Jul 16 2017 *)
%o A064367 (PARI) a(n) = { lift(Mod(2,prime(n))^n) } \\ _Harry J. Smith_, Sep 12 2009
%Y A064367 Cf. A000040, A000079, A015910.
%K A064367 nonn
%O A064367 1,3
%A A064367 _Labos Elemer_, Sep 27 2001
%E A064367 Definition corrected by _Harry J. Smith_, Sep 12 2009