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”).
%I #21 Feb 25 2024 05:59:18
%S 1,0,1,0,0,0,1,0,7,0,3,0,1,0,0,0,3,0,7,0,13,0,11,0,0,0,1,0,27,0,1,0,7,
%T 0,0,0,3,0,7,0,9,0,39,0,0,0,9,0,1,0,19,0,51,0,0,0,1,0,3,0,7,0,1,0,0,0,
%U 3,0,49,0,9,0,3,0,0,0,17,0,19,0,1,0,9,0,0,0,7,0,23
%N Least number k such that n//k and k//n are both prime where // is the concatenation function, or 0 if no such k exists.
%C If n ends in a 2, 4, 5, 6, 8, or 0, then a(n) = 0. It is conjectured that the converse is true.
%C If a(n) = 1, then n is in A068673.
%C a(n) is odd or 0 for all n.
%H Paolo P. Lava, <a href="/A243374/b243374.txt">Table of n, a(n) for n = 1..1000</a> (first 88 terms from Derek Orr)
%e 91 and 19 are not both prime, 92 and 29 are not both prime, 93 and 39 are not both prime, 94 and 49 are not both prime, 95 and 59 are not both prime, 96 and 69 are not both prime, but 97 and 79 are both prime. Thus a(9) = 7.
%o (PARI) a(n)=for(k=1,10^4,if(ispseudoprime(eval(concat(Str(n),Str(k)))) && ispseudoprime(eval(concat(Str(k),Str(n)))),return(k)))
%o n=1;while(n<100,print1(a(n),", ");n++)
%o (Python)
%o import sympy
%o from sympy import isprime
%o def a(n):
%o ..for k in range(1,10**5):
%o ....if isprime(int(str(k)+str(n))) and isprime(int(str(n)+str(k))):
%o ......return k
%o n = 1
%o while n < 100:
%o ..print(a(n),end=', ')
%o ..n += 1
%Y Cf. A068673.
%K nonn,base
%O 1,9
%A _Derek Orr_, Jun 06 2014
%E Inserted a(38)=0 by _Paolo P. Lava_, Jun 16 2014