login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A295508 Triangle read by rows, related to binary partitions of n. 2

%I

%S 0,1,0,2,1,0,3,2,1,4,3,2,0,5,4,3,1,6,5,4,2,7,6,5,3,8,7,6,4,0,9,8,7,5,

%T 1,10,9,8,6,2,11,10,9,7,3,12,11,10,8,4,13,12,11,9,5,14,13,12,10,6,15,

%U 14,13,11,7,16,15,14,12,8,0,17,16,15,13,9,1

%N Triangle read by rows, related to binary partitions of n.

%F Let L(n) = (length of binary representation of n) - 0^n then

%F T(n, k) = n if k=0 else n - 2^(k-1) for n >= 0 and 0 <= k <= L(n).

%F Sum_{k=0..L(n)} T(n,k) = A123753(n-1) for n>=1.

%e 0;

%e 1, 0;

%e 2, 1, 0;

%e 3, 2, 1;

%e 4, 3, 2, 0;

%e 5, 4, 3, 1;

%e 6, 5, 4, 2;

%e 7, 6, 5, 3;

%e 8, 7, 6, 4, 0;

%e 9, 8, 7, 5, 1;

%e 10, 9, 8, 6, 2;

%e 11, 10, 9, 7, 3;

%e 12, 11, 10, 8, 4;

%e 13, 12, 11, 9, 5;

%e 14, 13, 12, 10, 6;

%e 15, 14, 13, 11, 7;

%p A295508_row := proc(n) local i, s, z; s := n; i := n-1; z := 1;

%p while 0 <= i do s := s,i; i := i-z; z := z+z od; s end:

%p seq(A295508_row(n), n=0..17);

%p # Alternatively after formula:

%p T := (n, k) -> `if`(k=0, n, n - 2^(k-1)):

%p L := n -> nops(convert(n, base, 2)) - 0^n:

%p T_row := n -> seq(T(n,k), k=0..L(n)):

%p seq(T_row(n), n=0..17);

%Y Cf. A123753.

%K nonn,tabf

%O 0,4

%A _Peter Luschny_, Nov 30 2017

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 18 13:38 EDT 2021. Contains 343995 sequences. (Running on oeis4.)