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.

A274319 Numbers whose digit sum is divisible by 6.

Original entry on oeis.org

0, 6, 15, 24, 33, 39, 42, 48, 51, 57, 60, 66, 75, 84, 93, 99, 105, 114, 123, 129, 132, 138, 141, 147, 150, 156, 165, 174, 183, 189, 192, 198, 204, 213, 219, 222, 228, 231, 237, 240, 246, 255, 264, 273, 279, 282, 288, 291, 297, 303, 309, 312, 318, 321, 327, 330, 336, 345, 354, 363, 369, 372, 378, 381
Offset: 1

Views

Author

Elana Lessing, Jun 17 2016

Keywords

Comments

Numbers n such that A007953(n) is a term of A008588. - Felix Fröhlich, Aug 18 2016
Any term of the sequence is also a term of A008585. - Felix Fröhlich, Aug 18 2016

Crossrefs

Cf. A007953.

Programs

  • C
    int i = 0;
    while(1){
       int sum = 0;
       int powerof10 = 10;
       int i2 = i;
       while(i2 != 0){
          sum += i2%powerof10;
          i2 /= 10;
          powerof10 *= 10;
       }
       if(sum%6 == 0) printf("%d\n", i);
       i++;
    }
    
  • PARI
    is(n)=my(d=digits(n));sum(k=1,#d,d[n])%6==0; \\ Joerg Arndt, Aug 18 2016
    
  • PARI
    is(n)=sumdigits(n)%6==0 \\ Charles R Greathouse IV, Aug 18 2016