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!)
A065413 Number of positive solutions to "numbers that are n times their number of binary 1's". 7
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 3, 1, 0, 0, 2, 1, 1, 1, 1, 1, 1, 1, 0, 1, 2, 0, 1, 1, 2, 1, 1, 1, 1, 3, 0, 1, 0, 0, 1, 0, 2, 2, 0, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 2, 0, 2, 1, 1, 2, 1, 0, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 1, 1, 2, 1, 2, 3, 1, 0, 0, 1, 0, 0, 1, 0, 2, 1, 0, 0, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,23
COMMENTS
Equivalently, this is the number of ways to write n as an arithmetic mean of distinct powers of 2. [Brian Kell, Mar 01 2009]
LINKS
EXAMPLE
a(23)=3 since 69, 92 and 115 are written in binary as 1000101, 1011100 and 1110011 and 69=23*3, 92=23*4 and 115=23*5.
MAPLE
N:= 1000: # to get a(1) to a(N)
A:= Vector(N):
for x from 1 while x/(1+ilog2(x)) <= N do
v:= x/convert(convert(x, base, 2), `+`);
if v::integer and v <= N then
A[v]:= A[v]+1
fi
od:
seq(A[i], i=1..N); # Robert Israel, May 06 2016
# alternative program
read("transforms") :
A065413 := proc(n)
local bdgs, a, x;
a := 0 ;
for bdgs from 1 do
x := n*bdgs ;
# x must have bdgs bits set, so x =bdgs*n >= 2^bdgs-1.
if n < (2^bdgs-1)/x then
break;
elif wt(x) = bdgs then
a := a+1 ;
end if;
end do:
a ;
end proc: # R. J. Mathar, May 11 2016
CROSSREFS
Cf. A000120, A037478, A058898, A272797 (greedy inverse).
Sequence in context: A229038 A229143 A330018 * A107131 A027200 A035654
KEYWORD
base,nonn
AUTHOR
Henry Bottomley, Nov 23 2001
STATUS
approved

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 25 12:33 EDT 2024. Contains 371969 sequences. (Running on oeis4.)