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.

A256115 Zeroless numbers n whose digit product squared is equal to the digit product of n^2.

Original entry on oeis.org

1, 2, 3, 661, 983, 2631, 2893, 9254, 9628, 9642, 11892, 12385, 12893, 13836, 14642, 14661, 16472, 18615, 27519, 29474, 35383, 36213, 36914, 38691, 43386, 46215, 49231, 49342, 56176, 72576, 75384, 76256, 83631, 87291, 92843, 94482, 99146, 99482, 99842, 113865
Offset: 1

Views

Author

Reiner Moewald, Mar 15 2015

Keywords

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Block[{d = Times @@ IntegerDigits@ n}, And[d != 0, d^2 == Times @@ IntegerDigits[n^2]]]; Select[Range@ 120000, fQ] (* Michael De Vlieger, Apr 22 2015 *)
  • PARI
    is(n)=vecmin(digits(n))&&A007954(n)^2==A007954(n^2) \\ M. F. Hasler, Apr 22 2015
  • Python
    def product_digits(n):
        results = 1
        while n > 0:
            remainder = n % 10
            results *= remainder
            n = (n-remainder)/10
        return results
    L = []
    for a in range(1, 100000):
        if product_digits(a*a) == (product_digits(a))*(product_digits(a)) and (product_digits(a) > 0):
            L.append(a)
    print(L)
    
  • Sage
    [x for x in [1..50000] if (0 not in x.digits()) and prod(x.digits())^2==prod((x^2).digits())] # Tom Edgar, Apr 03 2015