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-3 of 3 results.

A342262 Numbers divisible both by the product of their nonzero digits (A055471) and by the sum of their digits (A005349).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 20, 24, 30, 36, 40, 50, 60, 70, 80, 90, 100, 102, 110, 111, 112, 120, 132, 135, 140, 144, 150, 200, 210, 216, 220, 224, 240, 300, 306, 312, 315, 360, 400, 432, 480, 500, 510, 540, 550, 600, 612, 624, 630, 700, 735, 800, 900, 1000, 1002, 1008
Offset: 1

Views

Author

Bernard Schott, Mar 27 2021

Keywords

Comments

Equivalently, Niven numbers that are divisible by the product of their nonzero digits. A Niven number (A005349) is a number that is divisible by the sum of its digits.
Niven numbers without zero digit that are divisible by the product of their digits are in A038186.
Differs from super Niven numbers, the first 16 terms are the same, then A328273(17) = 48 while a(17) = 50.
This sequence is infinite since if m is a term, then 10*m is another term.

Examples

			The product of the nonzero digits of 306 =  3*6 = 18, and 306 divided by 18 = 17. The sum of the digits of 306 = 3 + 0 + 6 = 9, and 306 divided by 9 = 34. Thus 306 is a term.
		

Crossrefs

Intersection of A005349 and A055471.
Supersequence of A038186.

Programs

  • Mathematica
    q[n_] := And @@ Divisible[n, {Times @@ (d = Select[IntegerDigits[n], # > 0 &]), Plus @@ d}]; Select[Range[1000], q] (* Amiram Eldar, Mar 27 2021 *)
    Select[Range[1200],Mod[#,Times@@(IntegerDigits[#]/.(0->1))]== Mod[#,Total[ IntegerDigits[#]]]==0&] (* Harvey P. Dale, Sep 26 2021 *)
  • PARI
    isok(m) = my(d=select(x->(x!=0), digits(m))); !(m % vecprod(d)) && !(m % vecsum(d)); \\ Michel Marcus, Mar 27 2021

Extensions

Example clarified by Harvey P. Dale, Sep 26 2021

A342650 Numbers divisible both by their nonzero individual digits and by the sum of their digits.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 20, 24, 30, 36, 40, 48, 50, 60, 70, 80, 90, 100, 102, 110, 111, 112, 120, 126, 132, 135, 140, 144, 150, 162, 200, 204, 210, 216, 220, 222, 224, 240, 264, 280, 288, 300, 306, 312, 315, 324, 330, 333, 336, 360, 396, 400, 408, 420, 432, 440, 444, 448, 480, 500
Offset: 1

Views

Author

Bernard Schott, Mar 18 2021

Keywords

Comments

Equivalently, Niven numbers that are divisible by their nonzero digits. A Niven number (A005349) is a number that is divisible by the sum of its digits.
Niven numbers without zero digit that are divisible by their individual digits are in A051004.
Differs from super Niven numbers, the first 25 terms are the same, then A328273(26) = 120 while a(26) = 111.
This sequence is infinite since if m is a term, then 10*m is another term.

Examples

			102 is divisible by its nonzero digits 1 and 2, and 102 is also divisible by the sum of its digits 1 + 0 + 2 = 3, then 102 is a term.
		

Crossrefs

Intersection of A002796 and A005349.
Supersequence of A051004.

Programs

  • Mathematica
    q[n_] := AllTrue[(d = IntegerDigits[n]), # == 0 || Divisible[n, #] &] && Divisible[n, Plus @@ d]; Select[Range[500], q] (* Amiram Eldar, Mar 18 2021 *)
  • PARI
    isok(m) = if (!(m % sumdigits(m)), my(d=select(x->(x>0), Set(digits(m)))); setintersect(d, divisors(m)) == d); \\ Michel Marcus, Mar 18 2021

A357769 Positive numbers with decimal expansion d_1, ..., d_w that are divisible by d_1 + ... + d_k for k = 1..w.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 18, 20, 24, 30, 36, 40, 48, 50, 60, 70, 80, 90, 100, 102, 108, 110, 112, 114, 120, 126, 132, 140, 150, 156, 180, 190, 200, 204, 210, 216, 220, 224, 228, 230, 240, 252, 264, 270, 280, 300, 306, 312, 330, 336, 360, 396, 400
Offset: 1

Views

Author

Rémy Sigrist, Oct 12 2022

Keywords

Comments

Leading zeros are ignored (d_1 > 0).
In other words, this sequence corresponds to numbers that are divisible by the sum of digits of all their prefixes.
All terms belong to A005349 (Niven numbers), A034837 and to A328273.
If t is a term, then 10*t is also a term (see A356350 for the primitive terms).
Contains no odd terms > 9. Else, d_1 and all d_1 + ... + d_k for k = 2..w-1 would have to be odd, but then d_1 + ... + d_w would be even. - Michael S. Branicky, Oct 15 2022

Examples

			180 is a term as it is divisible by 1, 1+8 and 1+8+0.
111 is not a term as it is divisible by 1 and 1+1+1 but not by 1+1.
		

Crossrefs

Programs

  • Mathematica
    Select[Range@400, And @@ IntegerQ /@ (#/Accumulate@ IntegerDigits@ #) &] (* Giovanni Resta, Oct 15 2022 *)
  • PARI
    is(n, base=10) = { my (d=digits(n, base), s=0); for (k=1, #d, if (n % (s+=d[k]), return (0));); return (1); }
    
  • Python
    def ok(n):
        s = str(n); sk = int(s[0])
        for k in range(len(s)-1):
            if n%sk != 0: return False
            sk += int(s[k+1])
        return n%sk == 0
    print([k for k in range(1, 401) if ok(k)]) # Michael S. Branicky, Oct 12 2022
Showing 1-3 of 3 results.