

A105055


a(n) = bitwise AND operation applied between every term of the nth 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



1, 1, 2, 3, 4, 8, 20, 33, 64, 64, 192, 256, 768, 1024, 2304, 4353, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194034, 8388608, 16777216, 33554432, 67108864, 134217728, 268435457, 536870912, 1073741824, 2147483648
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,3


COMMENTS

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


LINKS

Table of n, a(n) for n=0..34.
Eric Weisstein's World of Mathematics, Pascal's Triangle
Eric Weisstein's World of Mathematics, Bitwise AND


EXAMPLE

Consider the n = 7 row of Pascal's Triangle:
in decimal notation: 172135352171;
in binary notation: 111110101100011...
Note: only distinct digits are of any importance.
Now add 1's to the left of the most significant digit and "AND" all terms:
111111 AND 111111 AND 110101 AND 100011 = 100001
which is 33 in decimal, thus a(7)=33.


PROG

(PARI) nexttwo(n)=local(r=1); while(r<=n, r*=2); r
a(n)={local(v=vector(ceil(n/2), i, binomial(n, i)), r);
r=nexttwo(v[#v])1;
for(i=1, #v, r=bitand(r, nexttwo(v[#v])nexttwo(v[i])+v[i]));
r} \\ Franklin T. AdamsWatters, Mar 29 2014


CROSSREFS

Cf. A001405.
Sequence in context: A215897 A276673 A282815 * A108506 A129284 A214700
Adjacent sequences: A105052 A105053 A105054 * A105056 A105057 A105058


KEYWORD

nonn,base


AUTHOR

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


EXTENSIONS

Edited by Franklin T. AdamsWatters, Mar 29 2014


STATUS

approved



