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.

A216997 Multiples of 8 that have a digit sum which is a multiple of 8.

This page as a plain text file.
%I A216997 #13 Dec 27 2012 14:24:18
%S A216997 8,80,88,152,224,376,440,448,512,592,664,736,800,808,880,888,952,1016,
%T A216997 1096,1160,1168,1232,1304,1384,1456,1520,1528,1672,1744,1816,1896,
%U A216997 1960,1968,2024,2176,2240,2248,2312,2392,2464,2536,2600,2608,2680,2688,2752,2824
%N A216997 Multiples of 8 that have a digit sum which is a multiple of 8.
%C A216997 Between a(5) and a(6) there are 151 terms that does not satisfy the property. [_Bruno Berselli_, Oct 26 2012]
%e A216997 376 = 8*47 and 3+7+6 = 16 = 8*2.
%t A216997 Select[8*Range[400], Mod[Total[IntegerDigits[#]], 8] == 0 &] (* _T. D. Noe_, Sep 24 2012 *)
%o A216997 (JavaScript)
%o A216997 function sumarray(arr) {
%o A216997 t=0;
%o A216997 for (i=0;i<arr.length;i++) t+=arr[i];
%o A216997 return t;
%o A216997 }
%o A216997 k=8;
%o A216997 for(s=1;s<1000;s++) {
%o A216997 a=new Array();
%o A216997 x=(s*k).toString();
%o A216997 for (j=0;j<x.length;j++) a[j]=Number(x.charAt(j));
%o A216997 if (sumarray(a)%k==0) document.write(s*k+",");
%o A216997 }
%Y A216997 Cf. A216994, A216995, A216996, A216998, A217009.
%K A216997 nonn,base
%O A216997 1,1
%A A216997 _Jon Perry_, Sep 22 2012