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.

A038186 Numbers divisible by the sum and product of their digits.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 111, 112, 132, 135, 144, 216, 224, 312, 315, 432, 612, 624, 735, 1116, 1212, 1296, 1332, 1344, 1416, 2112, 2232, 2916, 3132, 3168, 3276, 3312, 4112, 4224, 6624, 6912, 8112, 9612, 11112, 11115, 11133, 11172, 11232
Offset: 1

Views

Author

Keywords

Comments

The property "numbers divisible by the sum and product of their digits" leads to the Diophantine equation t*x1*x2*...*xr=s*(x1+x2+...+xr), where t and s are divisors of n; xi is from [1...9]. This corresponds to some arithmetic problems in geometry, see Sándor, 2002. - Ctibor O. Zizka, Mar 04 2008

Crossrefs

Intersection of A005349 and A007602. - Reinhard Zumkeller, Apr 07 2011

Programs

  • Haskell
    import Data.List (elemIndices)
    a038186 n = a038186_list !! (n-1)
    a038186_list = map succ $ elemIndices 1
                   $ zipWith (*) (map a188641 [1..]) (map a188642 [1..])
    -- Reinhard Zumkeller, Apr 07 2011
    
  • Mathematica
    dspQ[n_]:=Module[{idn=IntegerDigits[n],t},t=Times@@idn;t!=0 && Divisible[n,Total[idn]] && Divisible[n,t]]; Select[Range[11500],dspQ] (* Harvey P. Dale, Jul 11 2011 *)
  • PARI
    for(n=1,10^4,d=digits(n);s=sumdigits(n);p=prod(i=1,#d,d[i]);if(p&&!(n%s+n%p),print1(n,", "))) \\ Derek Orr, Apr 29 2015
    
  • Python
    from math import prod
    def sd(n): return sum(map(int, str(n)))
    def pd(n): return prod(map(int, str(n)))
    def ok(n): return n%sd(n) == 0 and pd(n) and n%pd(n) == 0
    def aupto(limit): return [m for m in range(1, limit+1) if ok(m)]
    print(aupto(11233)) # Michael S. Branicky, Jan 28 2021

Formula

A188641(a(n)) * A188642(a(n)) = 1. - Reinhard Zumkeller, Apr 07 2011

Extensions

More terms from Patrick De Geest, Jun 15 1999