login
A375938
Numbers k not divisible by 3 such that no prime is the concatenation of two numbers whose sum is n.
2
4477, 5698, 110297, 116809, 183557, 216931, 220594, 233618, 417175, 483923, 567358, 634106, 684167, 717541, 772079, 834350, 867724, 984533, 19940965, 43870123, 51846509, 52721966, 67799281, 91728439, 103693018, 105443932, 115657597, 131804915, 139586755, 151551334, 171492299, 183456878, 195421457, 207386036
OFFSET
1,1
COMMENTS
Numbers k not divisible by 3 such that A087555(k) = 0.
If x has d digits, the concatenation of k - x and x is divisible by GCD(k, 10^d-1). Thus if k has m digits and GCD(k, 10^d-1) > 1 for all d from 2 to m, the only possibility for the concatenation of k - x and x to be prime is when x has a single digit.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..136
EXAMPLE
a(3) = 110297 is a term: 110297 = 11 * 37 * 271 so GCD(110297, 10^d-1) > 1 for d = 2,3,4,5,6. The only possible x for which the concatenation of 110297 - x and x might be prime are the single digits 1, 3, 7 and 9, but none of 1102961, 1102943, 1102907 and 1102889 are prime.
MAPLE
tcat:= (a, b) -> a*10^(1+ilog10(b))+b:
filter:= proc(n) local d, x;
if n mod 3 = 0 then return false fi;
for d from 1 to 1+ilog10(n) do
if igcd(n, 10^d-1) > 1 then next fi;
for x from `if`(d=1, 1, 10^(d-1)+1) to 10^d-1 by 2 do
if isprime(tcat(n-x, x)) then return false fi;
od
od;
true
end proc:
select(filter, [$2 .. 2 * 10^8]);
PROG
(Python)
from gmpy2 import is_prime, mpz, digits
def ok(n): return n%3!=0 and not any(is_prime(mpz(digits(n-j)+digits(j))) for j in range(1, n, 2))
print([k for k in range(2, 10**6) if ok(k)]) # Michael S. Branicky, Sep 03 2024
CROSSREFS
Cf. A087555.
Sequence in context: A221007 A203938 A345181 * A235890 A237775 A179161
KEYWORD
nonn,base
AUTHOR
Robert Israel, Sep 03 2024
STATUS
approved