login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Even Niven (or Harshad) numbers: even numbers that are divisible by the sum of their digits.
2

%I #15 Jan 19 2021 04:01:50

%S 2,4,6,8,10,12,18,20,24,30,36,40,42,48,50,54,60,70,72,80,84,90,100,

%T 102,108,110,112,114,120,126,132,140,144,150,152,156,162,180,190,192,

%U 198,200,204,210,216,220,222,224,228,230,234,240,252,264,266,270,280,288

%N Even Niven (or Harshad) numbers: even numbers that are divisible by the sum of their digits.

%D David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, p. 171.

%H Amiram Eldar, <a href="/A101814/b101814.txt">Table of n, a(n) for n = 1..10000</a>

%H Richard K. Guy, <a href="http://www.jstor.org/stable/2691503">The Second Strong Law of Small Numbers</a>, Math. Mag, Vol. 63, No. 1 (1990), pp. 3-20.

%e 216 is a term of the sequence because it is even and divisible by 9 (= 2+1+6).

%p s:=proc(n) local N:N:=convert(n,base,10):sum(N[j],j=1..nops(N)) end:p:=proc(n) if floor(n/s(n))=n/s(n) then n else fi end: seq(p(2*n),n=1..161);

%t Select[2*Range[200],Divisible[#,Total[IntegerDigits[#]]]&] (* _Harvey P. Dale_, May 08 2015 *)

%o (PARI) isok(n) = !(n%2) && !(n % sumdigits(n)); \\ _Michel Marcus_, Sep 19 2017

%Y Cf. A005349, A101813.

%K nonn,base

%O 1,1

%A _Emeric Deutsch_, Dec 16 2004

%E Edited by _Charles R Greathouse IV_, Aug 03 2010