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.

A172424 Numbers k > 9 with digits different from 0 and 1 such that both the sum of digits and the product of digits divide k.

Original entry on oeis.org

24, 36, 224, 432, 624, 735, 2232, 3276, 4224, 6624, 23328, 32832, 33264, 34272, 34992, 42336, 42624, 43632, 73332, 82944, 83232, 92232, 93744, 229392, 234432, 244224, 248832, 272832, 282624, 344736, 442368, 622272, 628224, 772632, 843264, 929232, 964224, 973728
Offset: 1

Views

Author

Michel Lagneau, Feb 02 2010

Keywords

Comments

From David A. Corneth, Aug 14 2025: (Start):
When searching terms it is convenient to look for terms t via their smallest number having the same digits (with same multiplicities) as t.
For example the term 432 can be found by permution digits of 234.
It enables to skip a lot of candidates via the following properties:
- If the product of digits of m is a multiple of 3 but the sum of digits of m is not a multiple of 3 then m is not a term.
- If the product of digits of m is a multiple of 9 but the sum of digits of m is not a multiple of 9 then m is not a term.
- The product of digits of a term m cannot be a multiple of 10.
- If the sum of digits of number m is a multiple of 2 but the product of digits of m is not then m cannot be a term.
- If the sum of digits of number m is a multiple of 5 but the product of digits of m is not then m cannot be a term.
It then also helps to reduce the number of permutations to check by looking for possible last digits.
For example when looking for terms with the same digits as 2333466778 we could find there are 151200 permutations. However we must have that such number is divisible by the product of digits i.e. by 3048192 and also by the sum of digits i.e. by 49.
The lcm of 3048192 and 49 is 3048192 so such term must be divisible by 3048192. That number has 8 factors 2.
It turns out there are only 319 possibilities for last 8 digits such that that number is divisible by 2^8 = 256.
One such possibility is ending in 36786432 and so {3, 7} come before that in some permutation.
That leaves at most 2*319 numbers to check instead of 151200. (End)

Examples

			24 is a term since 4+2 = 6 and 2*4 = 8 divides 24.
36 is a term since 3+6 = 9 and 3*6 = 18 divides 36.
224 is a term since 2+2+4 = 8 and 2*2*4 = 32 divides 224.
23328 is a term since 2+3+3+2+8 = 18 and 2*3*3*2*8 = 288 divides 23328.
		

References

  • Charles Ashbacher, Journal of Recreational Mathematics, Vol. 33 (2005), pp. 227.
  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 166, p. 53, Ellipses, Paris 2008.
  • J.-M. De Koning & A. Mercier, Introduction à la théorie des nombres, Modulo, 2e édition, 1997
  • J.-M. De Koning & A. Mercier, 1001 problèmes en théorie classique des nombres, Ellipses, Paris,2004

Crossrefs

Programs

  • PARI
    \\ See Corneth link
  • Python
    from math import prod
    def ok(n): return n > 9 and {0,1}&set(d:=list(map(int, str(n)))) == set() and n%sum(d) == 0 and n%prod(d) == 0
    print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Aug 13 2025
    

Extensions

Name edited and more terms from Michael S. Branicky, Aug 13 2025