OFFSET
1,2
COMMENTS
Zeros correspond to A216994.
EXAMPLE
a(8) corresponds to the digit sum of 56, which is 11, mod 7, so a(8)=4.
MATHEMATICA
Table[Mod[Total[IntegerDigits[7*n]], 7], {n, 100}] (* T. D. Noe, Sep 24 2012 *)
PROG
(JavaScript)
function sumarray(arr) {
t=0;
for (i=0; i<arr.length; i++) t+=arr[i];
return t;
}
k=7;
for(s=1; s<100; s++) {
a=new Array();
x=(s*k).toString();
for (j=0; j<x.length; j++) a[j]=Number(x.charAt(j));
document.write(sumarray(a)%k+", ");
}
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Jon Perry, Sep 22 2012
STATUS
approved