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.

A216996 Numbers n such that the digit sum of n*7 is a multiple of 7.

This page as a plain text file.
%I A216996 #16 Mar 08 2018 21:14:12
%S A216996 1,10,11,19,38,46,47,56,57,65,73,74,83,84,92,100,101,110,111,119,138,
%T A216996 145,155,163,164,172,182,190,191,209,218,228,236,237,245,255,263,264,
%U A216996 272,282,289,299,308,316,317,326,327,335,343,344,353,354,362,380,381
%N A216996 Numbers n such that the digit sum of n*7 is a multiple of 7.
%C A216996 If n is in the sequence, so are 10*n and 10*n+1. - _Robert Israel_, Mar 08 2018
%H A216996 Robert Israel, <a href="/A216996/b216996.txt">Table of n, a(n) for n = 1..10000</a>
%e A216996 7*19 = 133 and 1+3+3=7.
%p A216996 filter:= n -> convert(convert(7*n,base,10),`+`) mod 7 = 0:
%p A216996 select(filter, [$1..1000]); # _Robert Israel_, Mar 08 2018
%t A216996 Select[Range[500], Mod[Total[IntegerDigits[7*#]], 7] == 0 &] (* _T. D. Noe_, Sep 24 2012 *)
%o A216996 (JavaScript)
%o A216996 function sumarray(arr) {
%o A216996 t=0;
%o A216996 for (i=0;i<arr.length;i++) t+=arr[i];
%o A216996 return t;
%o A216996 }
%o A216996 k=7;
%o A216996 for(s=1;s<1000;s++) {
%o A216996 a=new Array();
%o A216996 x=(s*k).toString();
%o A216996 for (j=0;j<x.length;j++) a[j]=Number(x.charAt(j));
%o A216996 if (sumarray(a)%k==0) document.write(s+",");
%o A216996 }
%Y A216996 Cf. A216994, A216995, A216997, A216998, A217009.
%K A216996 nonn,base
%O A216996 1,2
%A A216996 _Jon Perry_, Sep 22 2012