A251860 Numbers n = concat(s,t) such that n = prime(s) + prime(t).
254, 64581, 64582, 64611, 64612, 64626, 64676, 64698, 64706, 64711, 64712, 64724, 2159962, 3232398, 1998135468, 11520892878, 17788754556
Offset: 1
Examples
254 = concat(2,54) and prime(2) + prime(54) = 3 + 251 = 254. 64581 = concat(6458,1) and prime(6458) + prime(1) = 64579 + 2 = 64581. 64582 = concat(6458,2) and prime(6458) + prime(2) = 64579 + 3 = 64582. Etc.
Programs
-
Maple
with(numtheory):P:=proc(q) local s,t,k,n; for n from 1 to q do for k from 1 to ilog10(n) do s:=n mod 10^k; t:=trunc(n/10^k); if s*t>0 then if ithprime(s)+ithprime(t)=n then print(n); break; fi; fi; od; od; end: P(10^6); # program from R. J. Mathar, Jan 22 2015: isA251860 := proc(n) local ti,i1,i2; if n >= 10 then for ti from 1 to A055642(n)-1 do i1 := modp(n,10^ti) ; i2 := floor(n/10^ti) ; if i1 > 0 and i2 > 0 then if ithprime(i1)+ithprime(i2) = n then return true; end if; end if; end do: false; else false; end if; end proc: for n from 1 do if isA251860(n) then print(n); end if; end do:
-
PARI
isok(n) = {my(nb = #Str(n)); for (k=1, nb-1, s = n\10^k; t = n % 10^k; if (s && t && prime(s)+ prime(t) == n, return (1));); return (0);} \\ Michel Marcus, Dec 10 2014
Extensions
a(13)-a(17) from Giovanni Resta, May 26 2015
Comments