[go: up one dir, main page]

login
A374897
a(n) is the least semiprime that ends with n, or -1 if there is no such semiprime.
2
10, 21, 22, 33, 4, 15, 6, 57, 38, 9, 10, 111, -1, 213, 14, 15, -1, 217, 118, 119, -1, 21, 22, 123, -1, 25, 26, 327, -1, 129, -1, 731, -1, 33, 34, 35, -1, 237, 38, 39, -1, 141, 142, 143, -1, 145, 46, 247, -1, 49, -1, 51, -1, 253, 254, 55, -1, 57, 58, 159, -1, 161, 62, 763, -1, 65, 166, 267, -1, 69
OFFSET
0,1
COMMENTS
a(n) = -1 if n > 10 and n is divisible by 4 or 10, or n > 25 and n is divisible by 25. Otherwise a(n) > 0 (which can be proven using Dirichlet's theorem on primes in arithmetic progressions).
LINKS
EXAMPLE
a(5) = 15 because 15 = 3*5 is a semiprime and ends in 5.
MAPLE
f:= proc(n) local x, d;
if (n mod 4 = 0 and n > 10) or (n mod 10 = 0) or (n mod 25 = 0) then return -1 fi;
d:= 10^(1+ilog10(n));
for x from n by d do
if numtheory:-bigomega(x) = 2 then return x fi
od
end proc:
f(0):= 10:
f(10):= 10:
f(25):= 25:
map(f, [$1..100]);
CROSSREFS
KEYWORD
sign,base,look
AUTHOR
Zak Seidov and Robert Israel, Jul 22 2024
STATUS
approved