login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Least prime p such that p*n is a concatenation of two primes, -1 if it does not exist.
2

%I #7 Feb 17 2017 08:28:32

%S 23,11,11,13,5,317,5,29,3,-1,3,11,19,293,5,7,17,239,3,-1,11,241,5,3,3,

%T 227,5,19,7,-1,7,41,7,853,5,17,7,29,3,-1,5,31,11,3,3,37,5,29,7,-1,11,

%U 61,7,13,13,47,13,19,3,-1,5,821,5,3,3,47,11,29,3,-1,3,11

%N Least prime p such that p*n is a concatenation of two primes, -1 if it does not exist.

%C If p*n = concat(a,b), leading 0 in b are admitted.

%C a(n) = -1 if a(n) mod 10 = 0.

%H Paolo P. Lava, <a href="/A281924/b281924.txt">Table of n, a(n) for n = 1..2500</a>

%e a(1) = 23 because 23*1 = 23 = concat(2,3);

%e a(2) = 11 because 11*2 = 22 = concat(2,2);

%e a(6) = 317 because 317^6 = 1902 = concat(19,02).

%p with(numtheory): P:= proc(q) local a,k,n,ok;

%p for n from 1 to q do for a from 1 by 2 to q do if isprime(a) then ok:=0;

%p for k from 1 to ilog10(a*n) do if isprime(trunc(a*n/10^k)) and isprime(a*n mod 10^k) then ok:=1; break; fi; od; if ok=1 then print(a); break; fi; fi; od; od; end: P(10^9);

%Y Cf. A000040, A281923.

%K sign,base,easy

%O 1,1

%A _Paolo P. Lava_, Feb 16 2017