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.

Showing 1-2 of 2 results.

A327750 Numbers without zero digits such that after adding the product of its digits to it, a number with the same product of digits is obtained.

Original entry on oeis.org

28, 128, 214, 239, 266, 318, 326, 364, 494, 497, 563, 598, 613, 637, 695, 819, 1128, 1214, 1239, 1266, 1318, 1326, 1364, 1494, 1497, 1563, 1598, 1613, 1637, 1695, 1819, 2114, 2139, 2168, 2285, 2313, 2356, 2369, 2419, 2594, 2639, 2791, 3118, 3126, 3148, 3213, 3235
Offset: 1

Views

Author

Bernard Schott, Sep 24 2019

Keywords

Comments

The idea of this sequence comes from a problem in the annual Moscow Mathematical Olympiad (MMO) in 2003: Level A, problem 2. The problem only asks to find a ten-digit number that has the property of the name.
When an integer k belongs to this sequence, the integer 111..11//k obtained by concatenation // of 111..11 and k is also a term; hence, there are primitive terms as 28, 214, 239, 266, 318, 326, ... (A340908).
A subset of it is formed by the numbers 239, 326, 364, 497, 563, 598, 613, 637, 695, 819, 1239, 1326, 1364, 1497, 1563, 1598, 1613, 1637, 1695, 1819, 2139, 2313, 2356, 2369, ... for which the number obtained after adding the product of the digits has exactly the same digits (they are obtained by permuting the digits of the initial number). So, 239 + 2*3*9 = 239 + 54 = 293, 326 + 3*2*6 = 326 + 36 = 362, 3235 + 3*2*3*5 = 3235 + 90 = 3325, 23286 + 2*3*2*8*6 = 23286 + 576 = 23862. - Marius A. Burtea, Sep 24 2019
This subset is A247888. - Bernard Schott, Jul 22 2020

Examples

			28 + 2*8 = 44 and 2*8 = 4*4 hence 28 is a term.
326 + 3*2*6 = 362 and 3*2*6 = 3*6*2 hence 326 is another term.
		

Crossrefs

Subsequences: A247888, A340907, A340908 (primitives).

Programs

  • Magma
    [k:k in [1..3500]| not 0 in Intseq(k) and &*Intseq(k) eq &*(Intseq(k+&*Intseq(k)))]; // Marius A. Burtea, Sep 24 2019
    
  • Mathematica
    pd[n_] := Times @@ IntegerDigits[n]; aQ[n_] := (p = pd[n]) > 0 && pd[n + p] == p; Select[Range[5000], aQ] (* Amiram Eldar, Sep 24 2019 *)
  • PARI
    isok(n) = my(d = digits(n), p); vecmin(d) && (p=vecprod(d)) && (vecprod(digits(n+p)) == p); \\ Michel Marcus, Sep 24 2019
    
  • Python
    def test(n):
        m, p = n, 1
        while m > 0:
            m, p = m//10, p*(m%10)
        if p == 0:
            return 0
        m, q = n+p, 1
        while m > 0:
            m, q = m//10, q*(m%10)
        return p == q
    n, a = 0, 0
    while n < 100:
        a = a+1
        if test(a):
            n = n+1
        print(n,a) # A.H.M. Smeets, Sep 25 2019

Extensions

More terms from Amiram Eldar, Sep 24 2019

A340908 Primitive numbers m without zero digits such that pod(m + pod(m)) = pod(m) where pod is the product of digits, A007954.

Original entry on oeis.org

28, 214, 239, 266, 318, 326, 364, 494, 497, 563, 598, 613, 637, 695, 819, 2114, 2139, 2168, 2285, 2313, 2356, 2369, 2419, 2594, 2639, 2791, 3118, 3126, 3148, 3213, 3235, 3238, 3259, 3354, 3365, 3561, 3698, 3786, 4138, 4145, 4188, 4219, 4338, 4346, 4353, 4368, 4395
Offset: 1

Views

Author

Bernard Schott, Jan 31 2021

Keywords

Comments

When a number k belongs to A327750, the integer 111..11//k obtained by concatenation of 111..11 and k is another term; hence, there exist primitive terms as 28, 214, 239, ... that are listed in this sequence.
Equivalently, terms of A327750 that do not begin with 1.

Examples

			pod(28 + pod(28)) = pod(28 + 2*8) = pod(28 + 16) = pod(44) = 4*4 = 16 = pod(28), hence 28 that does not begin with 1 is a term.
		

References

  • Roman Fedorov, Alexei Belov, Alexander Kovaldzhi, and Ivan Yashchenko, Moscow-Mathematical Olympiads, 2000-2005, Level A, Problem 2, 2003; MSRI, 2011, pp. 15 and 97.

Crossrefs

Subsequence of A327750.

Programs

  • Mathematica
    pod[n_] := Times @@ IntegerDigits[n]; q[n_] := First[IntegerDigits[n]] > 1 && (p = pod[n]) > 0 && pod[n + p] == p; Select[Range[5000], q] (* Amiram Eldar, Jan 31 2021 *)
  • PARI
    isok(n) = my(d = digits(n), p); vecmin(d) && ((d[1]!=1) && p=vecprod(d)) && (vecprod(digits(n+p)) == p); \\ Michel Marcus, Feb 01 2021
Showing 1-2 of 2 results.