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.

A063983 Least k such that k*2^n +/- 1 are twin primes.

Original entry on oeis.org

4, 2, 1, 9, 12, 6, 3, 9, 57, 30, 15, 99, 165, 90, 45, 24, 12, 6, 3, 69, 132, 66, 33, 486, 243, 324, 162, 81, 90, 45, 345, 681, 585, 375, 267, 426, 213, 429, 288, 144, 72, 36, 18, 9, 147, 810, 405, 354, 177, 1854, 927, 1125, 1197, 666, 333, 519, 1032, 516, 258, 129, 72
Offset: 0

Views

Author

Robert G. Wilson v, Sep 06 2001

Keywords

Comments

Excluding the first three terms, all remaining terms have digital root 3, 6, or 9. - J. W. Helkenberg, Jul 24 2013

Examples

			a(3) = 9 because 9*2^3 = 72 and 71 and 73 are twin primes.
a(6) = 3 because 3*2^6 = 192 and {191, 193} are twin primes.
a(71) = 630 because 630*2^71 = 1487545442103938242314240 and {1487545442103938242314239, 1487545442103938242314241} are twin primes.
		

References

  • Richard Crandall and Carl Pomerance, 'Prime Numbers: A Computational Perspective,' Springer-Verlag, NY, 2001, page 12.

Crossrefs

Cf. A071256, A060210, A060256. For records see A125848, A125019.
Cf. A076806 (requires odd k).

Programs

  • Mathematica
    Table[Do[s=(2^j)*k; If[PrimeQ[s-1]&&PrimeQ[s+1],Print[{j,k}]], {k,1,2*j^2}],{j,0,100}]; (* outprint of a[j]=k *)
    Do[ k = 1; While[ ! PrimeQ[ k*2^n + 1 ] || ! PrimeQ[ k*2^n - 1 ], k++ ]; Print[ k ], {n, 0, 50} ]
    f[n_] := Block[{k = 1},While[Nand @@ PrimeQ[{-1, 1} + 2^n*k], k++ ];k];Table[f[n], {n, 0, 60}] (* Ray Chandler, Jan 09 2009 *)

Extensions

More terms from Labos Elemer, May 24 2002
Edited by N. J. A. Sloane, Jul 03 2008 at the suggestion of R. J. Mathar

A179658 Minimal odd k such that k*2^n-1 and k*2^(n+1)-1 are Sophie Germain primes.

Original entry on oeis.org

3, 1, 3, 15, 45, 3, 99, 45, 51, 141, 153, 177, 411, 45, 45, 267, 237, 75, 75, 207, 111, 111, 123, 159, 57, 375, 1419, 45, 291, 321, 489, 585, 525, 1623, 579, 45, 27, 1293, 1059, 255, 2265, 33, 465, 165, 405, 315, 315, 117, 411, 1725, 2343, 2397, 465, 315, 1443
Offset: 1

Views

Author

Karsten Bonath, Jul 23 2010

Keywords

Comments

In the b-file up to n=10000, only a(2) is not a multiple of 3 and all entries are odd, so heuristically a(n) = A176248(n) for n>2. - R. J. Mathar, Aug 28 2025

Examples

			Example for n=7: a(7)=99 because 99*2^7-1 and 99*2^8-1 is the first occurrence for n=7 as a Sophie Germain prime pair.
		

Crossrefs

Cf. A005384, A076806 (minimal odd k such that k*2^n-1 and k*2^n+1 are twin primes).

Programs

  • Magma
    a:=[]; for n in [1..55] do k:=1; while not (IsPrime(k*2^n-1) and IsPrime(k*2^(n+1)-1)) do k:=k+2; end while; Append(~a,k); end for; a; // Marius A. Burtea, Jan 16 2020
  • Mathematica
    a[n_] := Module[{k = 1}, While[!And @@ PrimeQ[k * 2^{n, n+1} - 1], k += 2]; k]; Array[a, 30] (* Amiram Eldar, Jan 16 2020 *)

Extensions

More terms from Bonath's link added by Amiram Eldar, Jan 16 2020
Showing 1-2 of 2 results.