OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(3) = 27 is a term because the concatenation of 27 + 1 = 28 and 27^2 = 729 is 28729, which is prime.
MAPLE
tcat:= (a, b) -> a*10^(ilog10(b)+1)+b:
select(t -> isprime(tcat(t+1, t^2)), [seq(i, i=1..1000, 2)]);
MATHEMATICA
Select[Range[1000], PrimeQ[FromDigits[Join[IntegerDigits[#+1], IntegerDigits[#^2]]]] &] (* Stefano Spezia, Sep 06 2024 *)
PROG
(Python)
from sympy import isprime
def ok(n): return isprime(int(str(n+1)+str(n**2)))
print([k for k in range(10**3) if ok(k)]) # Michael S. Branicky, Sep 15 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert Israel, Sep 06 2024
STATUS
approved
