cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A370675 Number of unordered pairs of n-digit numbers k1, k2 such that their product has the same multiset of digits as in both k1 and k2 together.

Original entry on oeis.org

0, 7, 156, 3399, 112025, 4505706, 213002162
Offset: 1

Views

Author

Danila Potapov, Feb 26 2024

Keywords

Comments

Since multiplication and multiset union are commutative operations, we count unordered pairs, i.e. we can assume that k1 <= k2.
The sequence is nondecreasing, since for any x,y,p such that x*y=p, x0*y0=p00.
The numbers up to n=7 were verified by at least two independent implementations.
The property of possible residues mod 3 and mod 9 for A370676 also holds for this sequence.

Examples

			For n=2 the a(2)=7 solutions are:
  15 * 93 = 1395
  21 * 60 = 1260
  21 * 87 = 1827
  27 * 81 = 2187
  30 * 51 = 1530
  35 * 41 = 1435
  80 * 86 = 6880
		

Crossrefs

Cf. A114258, A370676 (number of such pairs with possibly unequal number of digits).

Programs

  • PARI
    a370675(n) = {my (np=0, n1=10^(n-1), n2=10*n1-1); for (k1=n1, n2, my(s1=digits(k1)); for (k2=k1, n2, my (s2=digits(k2)); my(sp=digits(k1*k2)); if (#s1+#s2==#sp && vecsort(concat(s1,s2)) == vecsort(sp), np++))); np} \\ Hugo Pfoertner, Feb 26 2024