login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
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
Sequence in context: A216147 A334774 A257627 * A122961 A165421 A227432
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 9 18:10 EDT 2024. Contains 372354 sequences. (Running on oeis4.)