OFFSET
1,1
COMMENTS
LINKS
Klaus Brockhaus, Table of n, a(n) for n=1..125
Eric Weisstein's World of Mathematics, Harshad Number
EXAMPLE
a(5) = 13 since 13, 14, 15, 16 and 17 are all non-Niven numbers and this is the first occurrence of exactly 5 non-Niven numbers.
PROG
(PARI) digitsum(n) = {local(s=0); while(n, s+=n%10; n\=10); s}
{m=120000; z=42; w=vector(z); n=1; while(n<=m, while(n%digitsum(n)==0, n++); a=n; c=0; while(n%digitsum(n)>0, n++; c++); if(c<=z&&w[c]==0, w[c]=a)); j=1; while(j<=z&&w[j]>0, print1(w[j], ", "); j++)} /* Klaus Brockhaus, Sep 24 2008 */
CROSSREFS
KEYWORD
base,hard,nonn
AUTHOR
Sergio Pimentel, Sep 18 2008
EXTENSIONS
a(2), a(22), a(42) corrected by Klaus Brockhaus, Sep 24 2008
STATUS
approved