%I #46 Sep 08 2022 08:46:05
%S 0,5,14,19,23,28,32,37,41,46,50,55,64,69,73,78,82,87,91,96,104,109,
%T 113,118,122,127,131,136,140,145,154,159,163,168,172,177,181,186,190,
%U 195,203,208,212,217,221,226,230,235,244,249,253,258,262,267,271,276
%N Numbers whose digital sum is a multiple of 5.
%C 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
%C a(10000) = 49999 is the smallest term that is congruent to 4 modulo 9. - _Bruno Berselli_, Feb 09 2016
%t Select[Range[0, 280], IntegerQ[Total[IntegerDigits[#]]/5] &] (* _Bruno Berselli_, Feb 09 2016 *)
%o (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
%o (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
%o (Magma) [n: n in [0..300] | IsZero(&+Intseq(n) mod 5)]; // _Bruno Berselli_, Sep 23 2013
%o (Magma) [n: n in [0..300] | IsIntegral(&+Intseq(n)/5)]; // _Bruno Berselli_, Feb 09 2016
%Y Cf. A007953.
%Y Subsequences: A052219, A052224.
%K nonn,base
%O 1,2
%A _Michel Marcus_, Sep 23 2013