login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


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

%I #9 Dec 01 2020 21:02:58

%S 1,8177,8178,8179,8180,8181,8182,8183,8184,8192,8193,49137,49138,

%T 49139,49140,49141,49142,49143,49144,90112,90113,322096,1048576,

%U 1048577,1056753,1056754,1056755,1056756,1056757,1056758,1056759,1056760,1056768,1056769,1097713,1097714,1097715,1097716,1097717,1097718,1097719,1097720,1138688,1138689,2396744

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

%p T:= 0: R:= NULL:

%p for n from 1 to (8^8-1)/(8-1) do

%p T:= T + numboccur(1,convert(n,base,8));

%p if T = n then R:= R, n; count:= count+1;

%p fi od:

%p R; # _Robert Israel_, Dec 01 2020

%t 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 Cf. A014778.

%K nonn,base,fini,full

%O 1,2

%A _Olivier GĂ©rard_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 22 17:35 EDT 2024. Contains 376119 sequences. (Running on oeis4.)