OFFSET
1,1
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000 (first 1000 terms from Harvey P. Dale)
EXAMPLE
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
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Aug 18 2003
STATUS
approved