login
A182271
Starting with 1, smallest integer not yet in the sequence such that two neighboring digits of the sequence multiply to a prime.
1
1, 2, 12, 13, 15, 17, 121, 3, 131, 5, 151, 7, 171, 21, 31, 51, 71, 212, 1212, 1213, 1215, 1217, 1312, 1313, 1315, 1317, 1512, 1513, 1515, 1517, 1712, 1713, 1715, 1717, 12121, 213, 12131, 215, 12151, 217, 12171, 312, 13121, 313, 13131, 315, 13151, 317, 13171
OFFSET
1,2
LINKS
PROG
(Python)
a = []
while len(a) < 49:
a.append(1)
while (s := "".join(map(str, a))) and a[-1] in a[:-1] or any(s[i] != "1" for i in range(0, len(s), 2)) or any(int(s[i]) not in [2, 3, 5, 7] for i in range(1, len(s), 2)): a[-1] += 1
print(a) # Dominic McCarty, Jun 14 2025
CROSSREFS
Sequence in context: A028424 A037311 A031257 * A178362 A299961 A339139
KEYWORD
nonn,base
AUTHOR
Eric Angelini and Jim Nastos, Apr 22 2012
STATUS
approved