A374897 a(n) is the least semiprime that ends with n, or -1 if there is no such semiprime.
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
Examples
a(5) = 15 because 15 = 3*5 is a semiprime and ends in 5.
Links
- Robert Israel, Table of n, a(n) for n = 0..10000
Programs
-
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]);
Comments