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.

Showing 1-2 of 2 results.

A282428 Numbers k such that A264097(k) = A264098(k), so : A264097(k)*2^k-1 and A264098(k)*2^k+1 are twin primes.

Original entry on oeis.org

1, 2, 6, 10, 18, 29, 63, 155, 211, 264, 546, 1032, 1156, 1321, 1553, 3460, 4901, 5907, 8335, 8529, 11455, 13153
Offset: 1

Views

Author

Pierre CAMI, Feb 15 2017

Keywords

Comments

a(23) is > 31000.
The A264097(k) are : 3, 3, 3, 15, 3, 45, 9, 105, 9, 165, 297, 177, 1035, 1065, 291, 2403, 2565, 5775, 3975, 459, 915, 3981

Crossrefs

Programs

  • Mathematica
    With[{nn = 600}, Flatten@ Position[Transpose@ {Table[k = 3; While[! PrimeQ[k 2^n - 1], k += 6]; k, {n, nn}], Table[k = 3; While[! PrimeQ[k 2^n + 1], k += 6]; k, {n, nn}]}, w_ /; SameQ @@ w]] (* Michael De Vlieger, Feb 16 2017 *)

A264098 Smallest odd number k divisible by 3 such that k*2^n + 1 is prime.

Original entry on oeis.org

3, 3, 9, 15, 3, 3, 9, 3, 15, 15, 9, 3, 33, 9, 81, 21, 9, 3, 27, 27, 33, 27, 45, 45, 33, 27, 15, 33, 45, 3, 39, 81, 9, 75, 81, 3, 15, 15, 81, 27, 3, 9, 9, 15, 189, 27, 27, 15, 105, 27, 75, 93, 51, 177, 57, 27, 75, 99, 27, 45, 105, 105, 9, 27, 9, 3, 9, 237
Offset: 1

Views

Author

Pierre CAMI, Nov 03 2015

Keywords

Comments

As N increases, (Sum_{n=1..N} a(n))/(Sum_{n=1..N} n) appears to approach 2*log(2), as can be seen by plotting the first 31000 terms.
This observation is consistent with the prime number theorem as the probability that k*2^n+1 is prime is 1/(n*log(2)+log(k))/2 for k multiple of 3 so ~ 1/(2*n*log(2)) as n increases, if k ~ 2*n*log(2) then k/(2*n*log(2)) ~ 1.

Examples

			3*2^1 + 1 = 7 is prime so a(1) = 3.
3*2^2 + 1 = 13 is prime so a(2) = 3.
3*2^3 + 1 = 25 is composite; 9*2^3 + 1 = 73 is prime so a(3) = 9.
		

Crossrefs

Programs

  • Maple
    for n from 1 to 100 do
      for k from 3 by 6 do
        if isprime(k*2^n+1) then
          A[n]:= k; break
       fi
     od
    od:
    seq(A[n],n=1..100); # Robert Israel, Jan 22 2016
  • Mathematica
    Table[k = 3; While[! PrimeQ[k 2^n + 1], k += 6]; k, {n, 68}] (* Michael De Vlieger, Nov 03 2015 *)
  • PARI
    a(n) = {k = 3; while (!isprime(k*2^n+1), k += 6); k;} \\ Michel Marcus, Nov 03 2015
Showing 1-2 of 2 results.