OFFSET
1,3
COMMENTS
EXAMPLE
21=3*7 produces the prime 37 via the described concatenation, and it is the only 2-digit semiprime that does produce a 2-digit prime like this, making a(2)=1.
MATHEMATICA
f[n_] := Block[{g, s}, s = Select[Range[10^(n - 1), 10^n - 1], PrimeOmega@ # == 2 &]; g[x_] := FromDigits[IntegerDigits[First /@ FactorInteger[x]] // Flatten]; Select[s, And[IntegerLength[g@ #] == n, PrimeQ@ g@ #] &]]; Length@ f@ # & /@ Range@ 6 (* Michael De Vlieger, Jul 01 2015 *)
PROG
(PARI)
{
\\Variables: E changes with every other\\
\\change in n as bounding smaller prime\\
\\p, b and B are the bounding powers of\\
\\10, e represents the power of 10 just\\
\\above p, q is the larger prime, and c is\\
\\the count of those pq satisfying the\\
\\criterion.\\
print(0); n=2; E=10; b=10; B==100;
while(1,
p=2; e=10; c=0; while(p<E,
q=max(nextprime(p+1), nextprime(b/p));
while(q<B/e,
if(isprime(p*B/e+q), c++);
q=nextprime(q+1));
p=nextprime(p+1); if(p>e, e*=10));
print(c); n++; b*=10; B*=10; if(n%2==0, E*=10))
}
CROSSREFS
KEYWORD
nonn,base
AUTHOR
James G. Merickel, Jun 28 2015
EXTENSIONS
a(12) from Giovanni Resta, Jul 13 2015
STATUS
approved