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.

A087142 Numbers divisible by their individual digits, but not by the sum of their digits (counted with multiplicity).

Original entry on oeis.org

11, 15, 22, 33, 44, 55, 66, 77, 88, 99, 115, 122, 124, 128, 155, 168, 175, 184, 212, 244, 248, 366, 384, 412, 424, 488, 515, 636, 672, 728, 784, 816, 824, 848, 1111, 1112, 1113, 1115, 1124, 1131, 1144, 1155, 1176, 1184, 1197, 1222, 1244, 1248, 1266, 1288, 1311
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 18 2003

Keywords

Comments

Intersection of A034838 and A065877.

Examples

			488 is in the sequence as its divisible by its individual digits but not by the sum of its digits counted with multiplicity. That is 488 is divisible by 4 and 8 but not by 4 + 8 + 8 = 20. - _David A. Corneth_, Jan 28 2021
		

Crossrefs

Cf. A337163 (similar, with product).

Programs

  • Mathematica
    didQ[n_]:=Module[{idn=IntegerDigits[n]},FreeQ[idn,0]&&AllTrue[n/idn, IntegerQ] && !Divisible[n,Total[idn]]]; Select[Range[1300], didQ] (* The program uses the AllTrue function from Mathematica version 10 *)  (* Harvey P. Dale, Apr 18 2016 *)
  • PARI
    is(n) = { my(d = digits(n), sd = vecsum(d), s = Set(d)); if(n == 0 || s[1] == 0, return(0)); if(n % sd != 0, for(i = 1, #s, if(n % s[i] != 0, return(0) ) ); return(1) ); 0 } \\ David A. Corneth, Jan 28 2021
    
  • Python
    def ok(n):
        d = list(map(int, str(n)))
        return 0 not in d and n%sum(d) and all(n%di == 0 for di in set(d))
    print([k for k in range(1312) if ok(k)]) # Michael S. Branicky, Nov 15 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

A087140 Numbers that are not divisible by all their digits in decimal representation.

Original entry on oeis.org

10, 13, 14, 16, 17, 18, 19, 20, 21, 23, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 89, 90, 91
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 18 2003

Keywords

Comments

Complement of A034838.

Crossrefs

Cf. A087141.
Showing 1-3 of 3 results.