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.

A014885 n is equal to the number of 1's in all numbers <= n written in base 8.

This page as a plain text file.
%I A014885 #9 Dec 01 2020 21:02:58
%S A014885 1,8177,8178,8179,8180,8181,8182,8183,8184,8192,8193,49137,49138,
%T A014885 49139,49140,49141,49142,49143,49144,90112,90113,322096,1048576,
%U A014885 1048577,1056753,1056754,1056755,1056756,1056757,1056758,1056759,1056760,1056768,1056769,1097713,1097714,1097715,1097716,1097717,1097718,1097719,1097720,1138688,1138689,2396744
%N A014885 n is equal to the number of 1's in all numbers <= n written in base 8.
%p A014885 T:= 0: R:= NULL:
%p A014885 for n from 1 to (8^8-1)/(8-1) do
%p A014885   T:= T + numboccur(1,convert(n,base,8));
%p A014885   if T = n then R:= R, n; count:= count+1;
%p A014885 fi od:
%p A014885 R; # _Robert Israel_, Dec 01 2020
%t A014885 Module[{nn=106*10^4,n1s},n1s=Accumulate[Table[DigitCount[n,8,1],{n,nn}]];Position[Thread[{n1s,Range[nn]}],_?(#[[1]]==#[[2]]&),1,Heads-> False]]// Flatten (* _Harvey P. Dale_, Feb 28 2020 *)
%Y A014885 Cf. A014778.
%K A014885 nonn,base,fini,full
%O A014885 1,2
%A A014885 _Olivier Gérard_