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.

A216998 Digit sum of n*7 mod 7.

This page as a plain text file.
%I A216998 #16 Dec 09 2014 03:34:11
%S A216998 0,5,3,3,1,6,6,4,2,0,0,5,3,3,6,4,4,2,0,5,5,3,1,1,6,4,4,2,5,3,3,1,6,6,
%T A216998 4,2,2,0,5,3,3,1,4,4,2,0,0,5,3,1,1,6,4,4,2,0,0,3,1,6,6,4,2,2,0,5,5,3,
%U A216998 1,6,6,2,0,0,5,3,3,1,6,4,4,2,0,0,5,1,1,6
%N A216998 Digit sum of n*7 mod 7.
%C A216998 Zeros correspond to A216994.
%e A216998 a(8) corresponds to the digit sum of 56, which is 11, mod 7, so a(8)=4.
%t A216998 Table[Mod[Total[IntegerDigits[7*n]], 7], {n, 100}] (* _T. D. Noe_, Sep 24 2012 *)
%o A216998 (JavaScript)
%o A216998 function sumarray(arr) {
%o A216998 t=0;
%o A216998 for (i=0;i<arr.length;i++) t+=arr[i];
%o A216998 return t;
%o A216998 }
%o A216998 k=7;
%o A216998 for(s=1;s<100;s++) {
%o A216998 a=new Array();
%o A216998 x=(s*k).toString();
%o A216998 for (j=0;j<x.length;j++) a[j]=Number(x.charAt(j));
%o A216998 document.write(sumarray(a)%k+",");
%o A216998 }
%Y A216998 Cf. A216994, A216995, A216996, A216997, A217009.
%K A216998 nonn,base
%O A216998 1,2
%A A216998 _Jon Perry_, Sep 22 2012