OFFSET
1,2
COMMENTS
Most first differences are 5, 9 and 4. First differences are strictly less than 10. First occurrences d of first difference a(i+1) - a(i) are for (d, i, a(i)) in {(5,1,0), (9,2,5), (4,4,19), (8,20,96), (3,60,299), (7,100, 997), (2,800,3999), (6, 2000, 9998), (1,10000,49999)}. - William Hitt, Apr 21 2014; comments modified by David A. Corneth, Jun 08 2016
a(10000) = 49999 is the smallest term that is congruent to 4 modulo 9. - Bruno Berselli, Feb 09 2016
MATHEMATICA
Select[Range[0, 280], IntegerQ[Total[IntegerDigits[#]]/5] &] (* Bruno Berselli, Feb 09 2016 *)
PROG
(PARI) isok(n) = {if (n == 0, return (1)); digs = digits(n); return (sum(i=1, #digs, digs[i]) % 5 == 0); } \\ Michel Marcus, Sep 23 2013
(PARI) a(n) = n--; m=10*(n\2); s=sumdigits(m); m+(4-(s-1)%5)+5*(n%2==1) \\ David A. Corneth, Jun 05 2016
(Magma) [n: n in [0..300] | IsZero(&+Intseq(n) mod 5)]; // Bruno Berselli, Sep 23 2013
(Magma) [n: n in [0..300] | IsIntegral(&+Intseq(n)/5)]; // Bruno Berselli, Feb 09 2016
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Marcus, Sep 23 2013
STATUS
approved