A370676
Number of unordered pairs of natural numbers k1, k2 such that their product is an n-digit number and has the same multiset of digits as in both k1 and k2.
Original entry on oeis.org
0, 0, 3, 15, 98, 596, 3626, 22704, 146834, 983476, 6846451, 49364315, 367660050
Offset: 1
For n=3 the a(3)=3 solutions are:
3 * 51 = 153
6 * 21 = 126
8 * 86 = 688
For n=4 the a(4)=15 solutions are:
3 * 501 = 1503
3 * 510 = 1530
5 * 251 = 1255
6 * 201 = 1206
6 * 210 = 1260
8 * 473 = 3784
8 * 860 = 6880
9 * 351 = 3159
15 * 93 = 1395
21 * 60 = 1260
21 * 87 = 1827
27 * 81 = 2187
30 * 51 = 1530
35 * 41 = 1435
80 * 86 = 6880
-
def a(n):
count = 0
for i in range(1, 10**(n-1)):
for j in range(i, 10**n//i+1):
if len(str(i*j)) == n and sorted(str(i)+str(j)) == sorted(str(i*j)):
count += 1
print(n, count)
A370678
a(n) is the number of pairs x <= y of n-digit numbers such that the number of distinct digits in their product is less than in their concatenation.
Original entry on oeis.org
10, 1395, 147718, 15187437, 1530456465, 152653821364
Offset: 1
a(1) = 10: 8 products 1*2, ..., 1*9, 2*3, 2*4 with 1 digit in x*y and 2 digits in x|y.
-
\\ returns [number of products, [a(n), A370679(n), A370680(n)]]
a370678_80(n) = {my (m=0, c=vector(3), n1=10^(n-1), n2=10*n1-1); for (k1=n1, n2, my (s1=digits(k1)); for (k2=k1, n2, my (s2=digits(k2), cs=#Set(digits(k1*k2)), d=cs-#Set(concat(s1,s2))); c[sign(d)+2]++; m++)); [m,c]}
-
def A370678(n):
a = 10**(n-1)
b, c = 10*a, 0
for x in range(a,b):
s = set(str(x))
for y in range(x,b):
if len(s|set(str(y))) > len(set(str(x*y))):
c += 1
return c # Chai Wah Wu, Feb 28 2024
A370679
a(n) is the number of pairs x <= y of n-digit numbers such that the number of distinct digits in their product is the same as in their concatenation.
Original entry on oeis.org
29, 1674, 136854, 12082393, 1136370471, 111392993465
Offset: 1
-
See A370678.
-
def A370679(n):
a = 10**(n-1)
b, c = 10*a, 0
for x in range(a,b):
s = set(str(x))
for y in range(x,b):
if len(s|set(str(y))) == len(set(str(x*y))):
c += 1
return c # Chai Wah Wu, Feb 28 2024
A370680
a(n) is the number of pairs x <= y of n-digit numbers such that the number of distinct digits in their product is greater than in their concatenation.
Original entry on oeis.org
6, 1026, 120878, 13234670, 1383218064, 140953635171
Offset: 1
a(1) = 6: 6 squares 4*4, ..., 9*9 with 2 distinct digits in x*y = 16, 25, ..., and 1 digit in their concatenation.
-
See A370678.
-
def A370680(n):
a = 10**(n-1)
b, c = 10*a, 0
for x in range(a,b):
s = set(str(x))
for y in range(x,b):
if len(s|set(str(y))) < len(set(str(x*y))):
c += 1
return c # Chai Wah Wu, Feb 28 2024
Showing 1-4 of 4 results.
Comments