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.

A265917 a(n) = floor(A070939(n)/A000120(n)) where A070939(n) is the binary length of n and A000120(n) is the binary weight of n.

This page as a plain text file.
%I A265917 #23 May 05 2021 16:54:29
%S A265917 1,2,1,3,1,1,1,4,2,2,1,2,1,1,1,5,2,2,1,2,1,1,1,2,1,1,1,1,1,1,1,6,3,3,
%T A265917 2,3,2,2,1,3,2,2,1,2,1,1,1,3,2,2,1,2,1,1,1,2,1,1,1,1,1,1,1,7,3,3,2,3,
%U A265917 2,2,1,3,2,2,1,2,1,1,1,3,2,2,1,2,1,1
%N A265917 a(n) = floor(A070939(n)/A000120(n)) where A070939(n) is the binary length of n and A000120(n) is the binary weight of n.
%C A265917 1/a(n) gives a very rough approximation of the density of 1-bits in the binary representation (A007088) of n. This is 1 if more than half of the bits of n are 1. - _Antti Karttunen_, Dec 19 2015
%H A265917 Michael De Vlieger, <a href="/A265917/b265917.txt">Table of n, a(n) for n = 1..10000</a>
%t A265917 Table[Floor[IntegerLength[n, 2]/Total@ IntegerDigits[n, 2]], {n, 120}] (* _Michael De Vlieger_, Dec 21 2015 *)
%o A265917 (Python)
%o A265917 for n in range(1, 88):
%o A265917     print(str((len(bin(n))-2) // bin(n).count('1')), end=',')
%o A265917 (PARI) a(n) = #binary(n)\hammingweight(n); \\ _Michel Marcus_, Dec 19 2015
%Y A265917 Cf. A000120, A007088, A070939, A135941, A199238, A265918.
%K A265917 nonn,base
%O A265917 1,2
%A A265917 _Alex Ratushnyak_, Dec 18 2015