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.

A343682 Zuckerman numbers which when divided by the product of their digits, give a quotient which is a Niven (Harshad) number.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 15, 24, 36, 111, 128, 135, 144, 175, 216, 315, 384, 432, 672, 735, 1296, 1575, 2916, 11115, 11232, 11664, 12132, 12288, 12312, 13212, 13824, 14112, 16416, 22176, 23112, 23328, 26112, 27216, 31212, 32832, 34272, 34992, 42624, 72128, 77175
Offset: 1

Views

Author

Bernard Schott, Apr 26 2021

Keywords

Comments

Repunit R(k) is a term iff k divides R(k) (A014950).

Examples

			36 is a Zuckerman number as 36/(3*6) = 2, 2/2 = 1 that is a Niven number, and 36 is a term.
315 is a Zuckerman number as 315/(3*1*5) = 21, 21/(2+1) = 7 that is a Niven number, and 315 is a term.
		

Crossrefs

Programs

  • Mathematica
    nivenQ[n_] := IntegerQ[n] && (sum = Plus @@ IntegerDigits[n]) > 0 && Divisible[n, sum]; Select[Range[10^5], (prod = Times @@ IntegerDigits[#]) > 0 && nivenQ[# / prod] &] (* Amiram Eldar, Apr 26 2021 *)
  • PARI
    isn(n) = !(n%sumdigits(n)); \\ A005349
    isz(n) = my(p=vecprod(digits(n))); p && !(n % p); \\ A007602
    isok(n) = isz(n) && isn(n/vecprod(digits(n))); \\ Michel Marcus, Apr 26 2021

Extensions

More terms from Michel Marcus, Apr 26 2021

A343744 Zuckerman numbers which divided by the product of their digits give integers which are also divisible by the product of their digits, and so on, until result is 1.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 15, 24, 36, 128, 135, 144, 175, 384, 672, 735, 1296, 1575, 82944, 139968, 1492992, 27869184
Offset: 1

Views

Author

Bernard Schott, Apr 27 2021

Keywords

Comments

Repunits >= 11 (A002275) are not in the sequence because, as they are fixed points of this map, they don't fit the definition.
Question: is this sequence finite as the similar sequence with Niven numbers (A114440) that has 15095 terms?
No other terms up to 2*10^9. - Michel Marcus, Apr 27 2021
From David A. Corneth, Apr 27 2021: (Start)
Terms are 7-smooth. Any prime factor > 7 will not be divided away by dividing by product of digits.
Any number k > a(26)*10^163 with product of digits vp > 0 has k/vp > a(26) so it suffices to check all candidates <= a(26)*10^163. Doing so gives no more terms so this sequence is finite and full. (End)
The number of steps needed to reach 1, has a maximum of 3, which occurs for n = 21, 23..26. - A.H.M. Smeets, Apr 29 2021

Examples

			The integer 1296 is divisible by the product of its digits as 1296/(1*2*9*6) = 12, then 12/(1*2) = 6 and 6/6 = 1; hence, 1296 is a term of this sequence.
		

Crossrefs

Cf. A114440 (similar for Harshad numbers).
Subsequence of A002473 and of A343681.

Programs

  • Mathematica
    f[n_] := If[(prod = Times @@ IntegerDigits[n]) > 0 && Divisible[n, prod], n/prod, 0]; Select[Range[10^5], FixedPointList[f, #][[-1]] == 1 &] (* Amiram Eldar, Apr 27 2021 *)
  • PARI
    isz(n) = my(p=vecprod(digits(n))); p && !(n % p); \\ A007602
    isok(n) = if (n==1, return(1)); my(m=n); until(m==1, if (isz(m), my(nm = m/vecprod(digits(m))); if (nm==m, return (0), m = nm), return(0))); return(1); \\ Michel Marcus, Apr 27 2021
    
  • Python
    def proddigit(n):
        p = 1
        while n > 0:
            n, p = n//10, p*(n%10)
        return p
    n, a = 1, 1
    while n > 0:
        aa, pa = a, proddigit(a)
        while pa > 1 and aa%pa == 0 and aa > 1:
            aa = aa//pa
            pa = proddigit(aa)
        if aa == 1:
            print(n,a)
            n = n+1
        a = a+1 # A.H.M. Smeets, Apr 29 2021

Extensions

a(26) from Michel Marcus, Apr 27 2021
Showing 1-2 of 2 results.