[go: up one dir, main page]

login
A198298
Pandigital numbers (A050278) with each product of adjacent digits visible as a substring of the digits.
14
3205486917, 3207154869, 4063297185, 4063792185, 4230567819, 4230915678, 4297630518, 4297631805, 5042976318, 5063297184, 5079246318, 5093271486, 5094236718, 5148609327, 5180429763, 5180792463, 5180942367, 5184063297, 5420796318
OFFSET
1,1
COMMENTS
There are 58 terms.
LINKS
Jason Kimberley, Table of n, a(n) for n = 1..58 (complete sequence)
Eric Angelini, 10 different digits, 9 products [Cached copy, with permission]
Eric Angelini, 10 different digits, 9 products, Posting to Seqfan List, Jan 03 2012
EXAMPLE
5x4 ("20") is a substring of 5420976318, as are 4x2 ("8"), 2x0 ("0"), 0x9 ("0"), 9x7 ("63"), 7x6 ("42"), 6x3 ("18"), 3x1 ("3") and 1x8 ("8").
4297631805 is also a member (4*2="8"; 2*9="18"; 9*7="63"; 7*6="42"; 6*3="18"; 3*1="3"; 1*8="8"; 8*0="0"; 0*5="0").
PROG
(Python)
from itertools import combinations, permutations
def agen():
c = 0
digits = list("0123456789")
for f in digits[1:]:
rest = digits[:]
rest.remove(f)
for p in permutations(rest):
t = (f, ) + p
s = "".join(t)
if all(str(int(t[i])*int(t[i+1])) in s for i in range(9)):
yield int(s)
afull = list(agen())
print(afull) # Michael S. Branicky, Oct 03 2024
CROSSREFS
KEYWORD
nonn,base,easy,fini,full
AUTHOR
Eric Angelini and Jason Kimberley, Jan 03 2012
STATUS
approved