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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A265918 a(n) = A070939(n) mod A000120(n), where A070939(n) is the binary length of n and A000120(n) is the binary weight of n. 2

%I #10 Dec 23 2015 14:14:57

%S 0,0,0,0,1,1,0,0,0,0,1,0,1,1,0,0,1,1,2,1,2,2,1,1,2,2,1,2,1,1,0,0,0,0,

%T 0,0,0,0,2,0,0,0,2,0,2,2,1,0,0,0,2,0,2,2,1,0,2,2,1,2,1,1,0,0,1,1,1,1,

%U 1,1,3,1,1,1,3,1,3,3,2,1,1,1,3,1,3,3

%N a(n) = A070939(n) mod A000120(n), where A070939(n) is the binary length of n and A000120(n) is the binary weight of n.

%H Michael De Vlieger, <a href="/A265918/b265918.txt">Table of n, a(n) for n = 1..10000</a>

%t Table[Mod[IntegerLength[n, 2], Total@ IntegerDigits[n, 2]], {n, 120}] (* _Michael De Vlieger_, Dec 21 2015 *)

%o (Python)

%o for n in range(1, 88): print str((len(bin(n))-2) % bin(n).count('1'))+',',

%o (PARI) a(n) = #binary(n) % hammingweight(n); \\ _Michel Marcus_, Dec 19 2015

%Y Cf. A000120, A070939, A135941, A199238, A265917.

%K nonn,base

%O 1,19

%A _Alex Ratushnyak_, Dec 18 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | 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 April 18 20:26 EDT 2024. Contains 371781 sequences. (Running on oeis4.)