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.

Previous Showing 11-13 of 13 results.

A113213 Smallest number m such that 2^n - m and 2^n + m are primes.

Original entry on oeis.org

0, 1, 3, 3, 9, 3, 21, 15, 9, 15, 21, 3, 45, 135, 75, 15, 99, 93, 99, 315, 105, 105, 15, 75, 339, 117, 261, 183, 351, 453, 1281, 267, 675, 867, 819, 117, 69, 2343, 1995, 1005, 2949, 165, 741, 603, 315, 1287, 1629, 243, 519, 765, 165, 1233, 741, 1797, 339, 177
Offset: 1

Views

Author

Zak Seidov, Jan 07 2006

Keywords

Comments

For n>=3 all terms are multiples of 3.
Conjecture: a(n) = O(n^3). - Thomas Ordowski, Apr 20 2015

Examples

			a(1)=0 because 2^1 +/- 0 are primes; a(2)=1 because 2^2 -/+ 1 are primes;
a(33)=675 because 2^33 +/- 675 are closest (to each other) primes.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=Module[{a=2^n,i=1},While[!PrimeQ[a+i]||!PrimeQ[a-i],i++];i]; Join[{0},Rest[Array[f,80]]]  (* Harvey P. Dale, Apr 25 2011 *)
  • PARI
    a(n) = my(m=0); while(!(isprime(2^n+m) && isprime(2^n-m)), m++); m; \\ Michel Marcus, Apr 20 2015

A373124 Sum of indices of primes between powers of 2.

Original entry on oeis.org

1, 2, 7, 11, 45, 105, 325, 989, 3268, 10125, 33017, 111435, 369576, 1277044, 4362878, 15233325, 53647473, 189461874, 676856245, 2422723580, 8743378141, 31684991912, 115347765988, 421763257890, 1548503690949, 5702720842940, 21074884894536, 78123777847065
Offset: 0

Views

Author

Gus Wiseman, May 31 2024

Keywords

Comments

Sum of k such that 2^n+1 <= prime(k) <= 2^(n+1).

Examples

			Row-sums of the sequence of all positive integers as a triangle with row-lengths A036378:
   1
   2
   3  4
   5  6
   7  8  9 10 11
  12 13 14 15 16 17 18
  19 20 21 22 23 24 25 26 27 28 29 30 31
  32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
		

Crossrefs

For indices of primes between powers of 2:
- sum A373124 (this sequence)
- length A036378
- min A372684 (except initial terms), delta A092131
- max A007053
For primes between powers of 2:
- sum A293697
- length A036378
- min A104080 or A014210
- max A014234, delta A013603
For squarefree numbers between powers of 2:
- sum A373123
- length A077643, run-lengths of A372475
- min A372683, delta A373125, indices A372540
- max A372889, delta A373126, indices A143658

Programs

  • Mathematica
    Table[Total[PrimePi/@Select[Range[2^(n-1)+1,2^n],PrimeQ]],{n,10}]
  • PARI
    ip(n) = primepi(1<A007053
    t(n) = n*(n+1)/2; \\ A000217
    a(n) = t(ip(n+1)) - t(ip(n)); \\ Michel Marcus, May 31 2024

A373210 Least k such that the smallest prime >= 2^k is 2^k + 2*n + 1, or -1 if no such k exists.

Original entry on oeis.org

0, 3, 5, 10, 9, 29, 64, 22, 13, 162, 19, 39, 34, 14, 17, 36, 60, 25, 74, 87, 121, 24, 151, 209, 170, 111, 35, 50, 188, 45, 96, 247, 193, 124, 49, 115, 258, 83, 173, 254, 56, 167, 136, 138, 279, 148, 314, 153, 158, 106, 199, 434, 93, 161, 6954, 104, 719, 240, 164
Offset: 0

Views

Author

Jianing Song, May 28 2024

Keywords

Comments

a(n) = -1 if 2*n + 1 is a Sierpiński number (for example when 2*n + 1 = 78557); cf. A076336. See also A067760.
Conjecture: a(n) != -1 if 2*n + 1 is not a Sierpiński number. In other words, if 2*n + 1 is not a Sierpiński number, then there exists some k >= 1 such that 2^k + 1, 2^k + 3, ..., 2^k + 2*n - 1 are all composite while 2^k + 2*n + 1 is prime.
a(54), a(75), a(83), a(128), a(159), a(176), ... > 5000 (if not equal to -1), which means that 109, 151, 167, 257, 319, 353, ... do not present among the first 5000 terms of A092131.
a(75) = 5880, a(83) = 5513. - Michael S. Branicky, May 28 2024
a(128) > 7000. - Michael S. Branicky, May 30 2024

Examples

			a(6) = 64, because the smallest prime >= 2^k is not 2^k + 13 for 0 <= k <= 63, while the smallest prime >= 2^64 is 2^64 + 13.
		

Crossrefs

Programs

  • PARI
    A373210_first_N_terms(N) = my(v = vector(N+1, i, -1), dist); v[1] = 0; for(i=2, oo, dist = nextprime(2^i) - 2^i; if(dist <= 2*N+1 && v[(dist+1)/2] == -1, v[(dist+1)/2] = i); if(vecmin(v) > -1, return(v))) \\ Warning: ignoring Sierpinski numbers

Extensions

a(54) and beyond from Michael S. Branicky, May 29 2024
Previous Showing 11-13 of 13 results.