login
A331116
Inserting a digit '1' between the first two adjacent digits of k, then inserting a digit '2' between the two following adjacent digits of k, ..., then inserting the integer '10' between the tenth and the eleventh digits of k, ... produces a prime number.
1
13, 21, 31, 33, 37, 49, 63, 67, 69, 79, 81, 91, 99, 107, 131, 139, 143, 157, 161, 181, 187, 193, 197, 203, 211, 221, 227, 233, 251, 253, 259, 277, 281, 299, 311, 313, 323, 331, 337, 367, 371, 373, 377, 379, 403, 421, 427, 451, 461, 467, 479
OFFSET
1,1
COMMENTS
Inspired by the sequences A050711 to A050719, so the first 13 terms are the first 13 terms of A050711, then a(14) = 107 because 1(1)0(2)7 gives 11027 which is a prime.
LINKS
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
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Jan 10 2020
STATUS
approved