A325454 a(n) is the digit sum of the n-th Niven number (or Harshad number).
1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 3, 9, 2, 3, 6, 9, 3, 9, 4, 6, 9, 12, 5, 9, 6, 9, 7, 9, 8, 9, 12, 9, 1, 3, 9, 2, 3, 4, 6, 9, 3, 9, 6, 7, 9, 5, 9, 6, 8, 9, 12, 9, 9, 9, 10, 12, 15, 18, 2, 3, 6, 9, 11, 3, 9, 4, 6, 8, 9, 12, 5, 9, 6, 9, 13, 9, 9, 12, 14, 9, 10, 15
Offset: 1
Programs
-
PARI
is_a005349(n) = n%sumdigits(n)==0 terms(n) = my(i=0); for(k=1, oo, if(i>=n, break); if(is_a005349(k), print1(sumdigits(k), ", "); i++)) terms(80) \\ Print initial 80 terms