login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A152102
Numbers of the form (2^p - 1)(2^q + 1) where p and q are twin primes.
0
231, 3999, 16771071, 68719083519, 1152921502996234239, 19342813113827469725532159, 1329227995784915871174424803370074111, 22300745198530623141528634722924057038159871, 25711008708143844408671393477450995736753878524115705145589759
OFFSET
1,1
COMMENTS
Idea resulted from seqfan posts by Artur Jasinski.
MATHEMATICA
a[n_] := If[PrimeQ[(2*n - 1)] && PrimeQ[(2*n + 1)], (2^(2*n - 1) - 1)*(2^(2*n + 1) + 1), {}]; Flatten[Table[a[n], {n, 1, 100}]]
(2^#[[1]]-1)(2^#[[2]]+1)&/@Select[Partition[Prime[Range[100]], 2, 1], #[[2]]- #[[1]]==2&] (* Harvey P. Dale, Dec 03 2012 *)
PROG
(PARI) forprime(p=2, 1e3, if(isprime(q=p+2), print1((2^p-1)*(2^q+1)", "))) \\ Charles R Greathouse IV, Nov 07 2011
CROSSREFS
Sequence in context: A260302 A211717 A029569 * A183663 A362429 A201957
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Nov 24 2008
EXTENSIONS
a(9) added by Harvey P. Dale, Dec 03 2012
STATUS
approved