The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A105055 a(n) = bitwise AND operation applied between every term of the n-th row of Pascal's triangle, with the stipulation that all bits left of the last significant bit in each element are turned "on" until all elements of a row contain the same number of bits (see example). Results represented in decimal notation. 0

%I #15 Nov 25 2016 05:29:05

%S 1,1,2,3,4,8,20,33,64,64,192,256,768,1024,2304,4353,8192,16384,32768,

%T 65536,131072,262144,524288,1048576,2097152,4194034,8388608,16777216,

%U 33554432,67108864,134217728,268435457,536870912,1073741824,2147483648

%N a(n) = bitwise AND operation applied between every term of the n-th row of Pascal's triangle, with the stipulation that all bits left of the last significant bit in each element are turned "on" until all elements of a row contain the same number of bits (see example). Results represented in decimal notation.

%C For many n, a(n) = 2^k, where k = floor(log_2(A001405(n))). For n from 9 through 40, k = n-3, but it is smaller thereafter; no formula of the form k = n-c will work for sufficiently large n. There are infinitely many exceptions to this formula, since a(2^m-1) is always odd, hence not equal to 2^k for m > 1. - _Franklin T. Adams-Watters_, Mar 29 2014, replacing assertions by the author.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PascalsTriangle.html">Pascal's Triangle</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/AND.html">Bitwise AND</a>

%e Consider the n = 7 row of Pascal's Triangle:

%e in decimal notation: 1-7-21-35-35-21-7-1;

%e in binary notation: 1-111-10101-100011-...

%e Note: only distinct digits are of any importance.

%e Now add 1's to the left of the most significant digit and "AND" all terms:

%e 111111 AND 111111 AND 110101 AND 100011 = 100001

%e which is 33 in decimal, thus a(7)=33.

%o (PARI) nexttwo(n)=local(r=1);while(r<=n,r*=2);r

%o a(n)={local(v=vector(ceil(n/2),i,binomial(n,i)),r);

%o r=nexttwo(v[#v])-1;

%o for(i=1,#v,r=bitand(r,nexttwo(v[#v])-nexttwo(v[i])+v[i]));

%o r} \\ _Franklin T. Adams-Watters_, Mar 29 2014

%Y Cf. A001405.

%K nonn,base

%O 0,3

%A Andrew G. West (WestA(AT)wlu.edu), Apr 04 2005

%E Edited by _Franklin T. Adams-Watters_, Mar 29 2014

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 June 8 07:10 EDT 2024. Contains 373207 sequences. (Running on oeis4.)