OFFSET
1,1
COMMENTS
Comments from N. J. A. Sloane, Dec 18 2022 (Start)
A more precise definition is the following.
Start with k=1; let N=10^k, let i run from 10^(k-1)-1 to N-1, let j = N-i, if i and j are both primes, append j to the sequence; increment k.
This is derived from A068811 via a(n) = 10^d - A068811(n) where d is the number of digits in A068811(n). A068811 is more fundamental, for there the primes appear in order and there are no duplicates. (End)
Primes may appear more than once.
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 1..20000 [First 1000 terms from Harvey P. Dale]
N. J. A. Sloane, Table of n, a(n) for n = 1..80338
EXAMPLE
887 is a term because 1000-887 = 113 and both 887 and 113 are prime.
MAPLE
a:=[];
for k from 1 to 6 do
N := 10^k;
for i from 10^(k-1)+1 to N-1 do
j:=N-i;
if isprime(i) and isprime(j) then a:=[op(a), j]; fi;
od:
od;
a; # N. J. A. Sloane, Dec 16 2022
MATHEMATICA
Select[Table[10^IntegerLength[p]-p, {p, Prime[Range[200]]}], PrimeQ] (* Harvey P. Dale, Dec 16 2022 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Enoch Haga, Oct 27 2008
EXTENSIONS
Corrected and edited by Harvey P. Dale and N. J. A. Sloane, Dec 16 2022
STATUS
approved