cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A227793 Numbers whose digital sum is a multiple of 5.

Original entry on oeis.org

0, 5, 14, 19, 23, 28, 32, 37, 41, 46, 50, 55, 64, 69, 73, 78, 82, 87, 91, 96, 104, 109, 113, 118, 122, 127, 131, 136, 140, 145, 154, 159, 163, 168, 172, 177, 181, 186, 190, 195, 203, 208, 212, 217, 221, 226, 230, 235, 244, 249, 253, 258, 262, 267, 271, 276
Offset: 1

Views

Author

Michel Marcus, Sep 23 2013

Keywords

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

Crossrefs

Cf. A007953.
Subsequences: A052219, A052224.

Programs

  • 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
  • Mathematica
    Select[Range[0, 280], IntegerQ[Total[IntegerDigits[#]]/5] &] (* Bruno Berselli, Feb 09 2016 *)
  • 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