login
A274319
Numbers whose digit sum is divisible by 6.
0
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,2
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
PROG
(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
CROSSREFS
Cf. A007953.
Sequence in context: A187918 A190747 A227229 * A043477 A055040 A017233
KEYWORD
base,nonn,easy
AUTHOR
Elana Lessing, Jun 17 2016
STATUS
approved