cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A243374 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.

This page as a plain text file.
%I A243374 #23 May 22 2025 10:21:38
%S A243374 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 A243374 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 A243374 3,0,49,0,9,0,3,0,0,0,17,0,19,0,1,0,9,0,0,0,7,0,23
%N A243374 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 A243374 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 A243374 If a(n) = 1, then n is in A068673.
%C A243374 a(n) is odd or 0 for all n.
%H A243374 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 A243374 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 A243374 (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 A243374 n=1;while(n<100,print1(a(n),", ");n++)
%o A243374 (Python)
%o A243374 import sympy
%o A243374 from sympy import isprime
%o A243374 def a(n):
%o A243374   for k in range(1,10**5):
%o A243374     if isprime(int(str(k)+str(n))) and isprime(int(str(n)+str(k))):
%o A243374       return k
%o A243374 n = 1
%o A243374 while n < 100:
%o A243374   print(a(n),end=', ')
%o A243374   n += 1
%Y A243374 Cf. A068673.
%K A243374 nonn,base
%O A243374 1,9
%A A243374 _Derek Orr_, Jun 06 2014
%E A243374 Inserted a(38)=0 by _Paolo P. Lava_, Jun 16 2014