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.

User: Danila Potapov

Danila Potapov's wiki page.

Danila Potapov has authored 3 sequences.

A381976 a(n) is the number of distinct solutions to the Partridge Puzzle of size n.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 2332, 216285
Offset: 1

Author

Danila Potapov, Mar 11 2025

Keywords

Comments

a(n) is the number of packings of squares of side 1..n to fill the square of side n(n+1)/2 under the condition that there are: 1 square of size 1 X 1, 2 squares of size 2 X 2, 3 squares of size 3 X 3, ..., n squares of size n X n.
The sequence comes from the formula 1^3 + 2^3 + ... + n^3 = (1+2+...+n)^2 = (n(n+1)/2)^2 (Nicomachus's theorem), so that the areas of the squares sum up to the area of the big square.
Rotations and mirrorings of the packings are not counted as distinct (there are in total 8 distinct variations of each packing).
Interestingly, for n = 9 the area of the big square is equal to 45*45 = 2025 making this problem a problem of the year 2025.

Crossrefs

Cf. A369891.

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

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

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

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 could be redefined in terms of the number of distinct n-digit numbers that could be factorized into such pairs.
From David A. Corneth, Feb 27 2024: (Start)
a(n) >= 2*a(n-1).
As we need k1 + k2 == k1 * k2 (mod 9) there are two possible pairs of residues (k1, k2) mod 3, namely, (0, 0) and (2, 2), and six possible residues mod 9, namely, (0, 0), (2, 2), (3, 6), (5, 8), (6, 3), (8, 5). (End)

Examples

			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
		

Crossrefs

Cf. A370675 (number of such n-digit pairs), A020342.

Programs

  • Python
    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)

Extensions

a(9)-a(10) from Michael S. Branicky, Feb 26 2024
a(11) from Chai Wah Wu, Feb 27 2024
a(12)-a(13) from Martin Ehrenstein, Mar 02 2024