OFFSET
1,1
COMMENTS
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..10000
EXAMPLE
281 gives 2(1)8(2)1 = 21821 that is prime, hence 281 is a term.
1027 gives 1(1)0(2)2(3)7 = 1102237 that is prime, hence 1027 is another term.
MATHEMATICA
seqQ[n_] := PrimeQ @ FromDigits @ Flatten @ IntegerDigits @ Riffle[(d = IntegerDigits[n]), Range[Length[d] - 1]]; Select[Range[10, 480], seqQ] (* Amiram Eldar, Jan 10 2020 *)
PROG
(Python)
from sympy import isprime
def ok(n):
if n < 10: return False
s = str(n)
shuffle = list(map(str, ((i+1)//2 for i in range(2*len(s)-1))))
shuffle[0::2] = [s[i] for i in range(len(s))]
return isprime(int("".join(shuffle)))
print(list(filter(ok, range(480)))) # Michael S. Branicky, Jul 18 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Jan 10 2020
STATUS
approved