OFFSET
1,1
COMMENTS
These are the Harshad numbers which are missing from A234474.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Harshad number.
EXAMPLE
195 is a term as it is divisible by its digital sum i.e. 15 but not by its digital root i.e. 6.
MATHEMATICA
Select[Range@1905, Mod[#, 1 + Mod[#-1, 9]] > 0 && Mod[#, Plus@@ IntegerDigits@ #] == 0 &] (* Giovanni Resta, Jan 03 2014 *)
PROG
(C++)
#include<iostream.h>
int digitalsum(int n){int sum=0; while(n>0){sum+=n%10; n/=10; }return(sum); }
int digitalroot(int a){return(1+(a-1)%9); }
int main(){for(int i=1; i<=2000; i++){
if(i%(digitalroot(i))!=0 && i%(digitalsum(i))==0) cout<<i<<", "; }}
(Haskell)
a234814 n = a234814_list !! (n-1)
a234814_list = filter (\x -> x `mod` a007953 x == 0 &&
x `mod` a010888 x /= 0) [1..]
-- Reinhard Zumkeller, Mar 04 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Mihir Mathur, Dec 31 2013
STATUS
approved