OFFSET
1,12
COMMENTS
T(m,0) = 0 except for T(2,0) = 1 because 10 is the only semiprime ending in 0.
If n is even, all semiprimes ending in n are of the form 2*p where p is a prime ending in n/2 or n/2+5.
If n = 5, all semiprimes ending in 5 are of the form 5*p where p is an occ prime.
EXAMPLE
T(2,7) = 3 because there are 3 semiprimes with 2 digits ending in 7, namely 57 = 3 * 19, 77 = 7 * 11 and 87 = 3 * 29.
Array starts:
0, 0, 0, 0, 1, 0, 1, 0, 0, 1
1, 3, 3, 2, 4, 7, 3, 3, 2, 3
0, 39, 19, 38, 20, 38, 20, 29, 21, 41
0, 373, 141, 368, 145, 257, 148, 381, 140, 373
0, 3602, 1111, 3573, 1119, 1959, 1118, 3557, 1116, 3598
0, 33626, 9112, 33554, 9115, 15722, 9092, 33665, 9086, 33685
0, 314151, 76676, 314035, 76775, 130949, 76834, 313890, 76690, 314289
MAPLE
q:= proc(N, x) local i;
if x = 0 then if N = 2 then 1 else 0 fi
elif x::even then nops(select(isprime, [seq(i, i=10^(N-1)/2 + x/2 .. 10^N/2, 5)]))
elif x = 5 then nops(select(isprime, [seq(i, i=10^(N-1)/5 + x/5 .. 10^N/5, 2)]))
else nops(select(t -> numtheory:-bigomega(t)=2, [seq(i, i=10^(N-1)+x .. 10^N, 10)]));
fi
end proc:
for x from 0 to 9 do if numtheory:-bigomega(x)=2 then q(1, x):= 1 else q(1, x):= 0 fi od:
for m from 1 to 7 do
seq(q(m, n), n=0..9)
od;
CROSSREFS
KEYWORD
AUTHOR
Zak Seidov and Robert Israel, Jul 24 2024
STATUS
approved