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”).

A115564
Least number d such that 10^n -/+ d form a prime pair.
4
3, 3, 9, 69, 129, 39, 261, 213, 459, 33, 57, 39, 267, 657, 357, 1377, 3, 387, 1899, 393, 213, 651, 3273, 2733, 3423, 1533, 429, 603, 1131, 1137, 1113, 1131, 249, 603, 2979, 159, 429, 921, 1269, 2757, 777, 789, 2277, 11799, 9, 5343, 1821, 6981, 23049, 1623
OFFSET
1,1
COMMENTS
a(n)== 0 (mod 3). - Robert G. Wilson v, Mar 13 2006
LINKS
FORMULA
a(n) = 3*A117738(n) = A082467(10^n). - Robert Israel, May 25 2018
EXAMPLE
a(1)=3 because 10-3=7 and 10+3=13 both of which are primes.
a(3)=9 because 1000-9=991 and 1000+9=1009 both of which are primes.
MAPLE
f:= proc(n) local k;
for k from 3 by 6 do
if isprime(10^n+k) and isprime(10^n-k) then return k fi
od
end proc:
map(f, [$1..100]); # Robert Israel, May 25 2018
MATHEMATICA
f[n_] := Block[{k = 1}, While[ ! PrimeQ[10^n - 3k] || ! PrimeQ[10^n + 3k], k++ ]; 3k]; Array[f, 50]
dpp[n_]:=Module[{n10=10^n, np=NextPrime[10^n], diff}, diff=np-n10; While[ !PrimeQ[n10-diff], np=NextPrime[np]; diff=np-n10]; np-n10]; Array[dpp, 80] (* Harvey P. Dale, Mar 28 2012 *)
PROG
(PARI) { for (n = 1, 80, tenp = 10^n ; p = nextprime(tenp) ; while ( p-tenp < tenp, diff=p-tenp ; if ( isprime(tenp-diff), print1(diff", ") ; break ; ) ; p=nextprime(p+1) ; ) ; ) } - R. J. Mathar, Mar 15 2006
CROSSREFS
KEYWORD
nonn
AUTHOR
Lekraj Beedassy, Mar 11 2006
EXTENSIONS
More terms from Craig Baribault (csb166(AT)psu.edu) and Robert G. Wilson v, Mar 13 2006
More terms from R. J. Mathar, Mar 15 2006
Corrected by Harvey P. Dale, Mar 28 2012
STATUS
approved