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.

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

Views

Author

Hugo Pfoertner, Feb 26 2024

Keywords

Examples

			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.
		

Crossrefs

Programs

  • PARI
    \\ 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]}
    
  • Python
    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

Formula

a(n) = 9 * 2^(n-3) * 5^(n-2) * (10 + 9*10^n) - A370679(n) - A370680(n).

Extensions

a(6) from Martin Ehrenstein, Feb 29 2024