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.

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

This page as a plain text file.
%I A063983 #31 Jun 02 2025 05:30:49
%S A063983 4,2,1,9,12,6,3,9,57,30,15,99,165,90,45,24,12,6,3,69,132,66,33,486,
%T A063983 243,324,162,81,90,45,345,681,585,375,267,426,213,429,288,144,72,36,
%U A063983 18,9,147,810,405,354,177,1854,927,1125,1197,666,333,519,1032,516,258,129,72
%N A063983 Least k such that k*2^n +/- 1 are twin primes.
%C A063983 Excluding the first three terms, all remaining terms have digital root 3, 6, or 9. - _J. W. Helkenberg_, Jul 24 2013
%D A063983 Richard Crandall and Carl Pomerance, 'Prime Numbers: A Computational Perspective,' Springer-Verlag, NY, 2001, page 12.
%H A063983 Pierre CAMI, <a href="/A063983/b063983.txt">Table of n, a(n) for n = 0..2300</a>
%e A063983 a(3) = 9 because 9*2^3 = 72 and 71 and 73 are twin primes.
%e A063983 a(6) = 3 because 3*2^6 = 192 and {191, 193} are twin primes.
%e A063983 a(71) = 630 because 630*2^71 = 1487545442103938242314240 and {1487545442103938242314239, 1487545442103938242314241} are twin primes.
%t A063983 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 *)
%t A063983 Do[ k = 1; While[ ! PrimeQ[ k*2^n + 1 ] || ! PrimeQ[ k*2^n - 1 ], k++ ]; Print[ k ], {n, 0, 50} ]
%t A063983 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 *)
%Y A063983 Cf. A040040, A045753, A002822, A124065, A124518-A124522.
%Y A063983 Cf. A071256, A060210, A060256. For records see A125848, A125019.
%Y A063983 Cf. A076806 (requires odd k).
%K A063983 nonn
%O A063983 0,1
%A A063983 _Robert G. Wilson v_, Sep 06 2001
%E A063983 More terms from _Labos Elemer_, May 24 2002
%E A063983 Edited by _N. J. A. Sloane_, Jul 03 2008 at the suggestion of _R. J. Mathar_