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.

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

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, 111, 112, 126, 132, 135, 144, 162, 216, 222, 224, 264, 288, 312, 315, 324, 333, 336, 396, 432, 444, 448, 555, 612, 624, 648, 666, 735, 777, 864, 888, 936, 999, 1116, 1122, 1128, 1164, 1212, 1224, 1236, 1296, 1332
Offset: 1

Views

Author

Keywords

Comments

No zero digits permitted. [Harvey P. Dale, Dec 18 2011]

Crossrefs

Intersection of A005349 and A034838.

Programs

  • Haskell
    a051004 n = a051004_list !! (n-1)
    a051004_list =  [x | x <- a005349_list,
                         x == head (dropWhile (< x) a034838_list)]
    -- Reinhard Zumkeller, Mar 03 2012
  • Mathematica
    ddQ[n_]:=Module[{idn=IntegerDigits[n]},!MemberQ[idn,0] && Divisible[ n,Total[idn]]&& And @@ Divisible[n,idn]]; Select[Range[1400],ddQ] (* Harvey P. Dale, Dec 18 2011 *)

Extensions

Offset corrected by Reinhard Zumkeller, Mar 03 2012

A087141 Numbers divisible by the sum of their digits, but not by all their individual digits.

Original entry on oeis.org

10, 18, 20, 21, 27, 30, 40, 42, 45, 50, 54, 60, 63, 70, 72, 80, 81, 84, 90, 100, 102, 108, 110, 114, 117, 120, 133, 140, 150, 152, 153, 156, 171, 180, 190, 192, 195, 198, 200, 201, 204, 207, 209, 210, 220, 225, 228, 230, 234, 240, 243, 247, 252, 261, 266, 270
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 18 2003

Keywords

Examples

			225 is in the sequence as 225 is divisible by 2 + 2 + 5 = 9 but not by 2 while 2 is a digit of 225. - _David A. Corneth_, Jan 28 2021
		

Crossrefs

Intersection of A087140 and A005349.
Cf. A087142.

Programs

  • PARI
    is(n) = { my(d = digits(n), sd = vecsum(d), s = Set(d)); if(sd != 0 && n % sd == 0, if(s[1] == 0, return(1) ); for(i = 1, #s, if(n % s[i] != 0, return(1) ) ); 0 ); 0 } \\ David A. Corneth, Jan 28 2021
    
  • Python
    def ok(n):
        d = list(map(int, str(n)))
        if n == 0 or n%sum(d): return False
        return 0 in d or any(n%di for di in set(d))
    print([k for k in range(271) if ok(k)]) # Michael S. Branicky, Oct 18 2021

A337163 Numbers divisible by their individual digits, but not by the product of their digits.

Original entry on oeis.org

22, 33, 44, 48, 55, 66, 77, 88, 99, 122, 124, 126, 155, 162, 168, 184, 222, 244, 248, 264, 288, 324, 333, 336, 366, 396, 412, 424, 444, 448, 488, 515, 555, 636, 648, 666, 728, 777, 784, 824, 848, 864, 888, 936, 999, 1122, 1124, 1128, 1144, 1155, 1164, 1222
Offset: 1

Views

Author

Bernard Schott, Jan 28 2021

Keywords

Comments

The sequence is infinite. For example, all numbers of the form ((10^n-1)/9)*(10^2)+24 are terms for n > 0. The numbers of this form will never be divisible by 8 but they will always be divisible by 1, 2 and 4. Also there are infinitely many terms any three of whose consecutive digits are distinct, for example, concatenations of 124. Are there infinitely many terms which don't consist of periodically repeating substrings? - Metin Sariyar, Jan 28 2021
Every repdigit non-repunit with at least 2 digits is a term. - Bernard Schott, Jan 28 2021

Examples

			48 is divisible by 4 and 8, but 48 is not divisible by 4*8 = 32, so 48 is a term.
128 is divisible by 1, 2 and 8, and 128 is divisible by 1*2*8 = 16 with 128 = 16*8, so 128 is not a term.
		

Crossrefs

Intersection of A034838 and A188643.
Cf. A087142 (similar, with sum).

Programs

  • Mathematica
    q[n_] := AllTrue[(digits = IntegerDigits[n]), # > 0 && Divisible[n, #] &] && !Divisible[n, Times @@ digits]; Select[Range[1000], q] (* Amiram Eldar, Jan 28 2021 *)
  • PARI
    isok(n) = my(d=digits(n)); if (vecmin(d), for (i=1, #d, if (n % d[i], return(0))); (n % vecprod(d))); \\ Michel Marcus, Jan 28 2021

Extensions

More terms from Michel Marcus, Jan 28 2021
Showing 1-3 of 3 results.