

A006046


Total number of odd entries in first n rows of Pascal's triangle: a(0) = 0, a(1) = 1, a(2k) = 3*a(k), a(2k+1) = 2*a(k) + a(k+1).
(Formerly M2445)


54



0, 1, 3, 5, 9, 11, 15, 19, 27, 29, 33, 37, 45, 49, 57, 65, 81, 83, 87, 91, 99, 103, 111, 119, 135, 139, 147, 155, 171, 179, 195, 211, 243, 245, 249, 253, 261, 265, 273, 281, 297, 301, 309, 317, 333, 341, 357, 373, 405, 409, 417, 425, 441, 449, 465, 481, 513, 521
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,3


COMMENTS

The following alternative construction of this sequence is due to Thomas Nordhaus, Oct 31 2000: For each n >= 0 let f_n be the piecewise linear function given by the points (k /(2^n), a(k) / 3^n), k =0, 1, ..., 2^n. f_n is a monotonic map from the interval [0,1] into itself, f_n(0) = 0, f_n(1) = 1. This sequence of functions converges uniformly. But the limiting function is not differentiable on a dense subset of this interval.
I submitted a problem to the Amer. Math. Monthly about an infinite family of nonconvex sequences that solve a recurrence that involves minimization: a(1) = 1; a(n) = max { ua(k)+a(nk)  1 <= k <= n/2 }, for n>1; here u is any realvalued constant >= 1. The case u=2 gives the present sequence. Cf. A130665  A130667.  Don Knuth, Jun 18 2007
a(n) = sum of (n1)th row terms of triangle A166556.  Gary W. Adamson, Oct 17 2009
From Gary W. Adamson, Dec 06 2009: (Start)
Let M = an infinite lower triangular matrix with (1, 3, 2, 0, 0, 0,...) in every column shifted down twice:
1;
3;
2; 1;
0, 3;
0, 2, 1;
0, 0, 3;
0, 0, 2, 1;
0, 0, 0, 3;
0, 0, 0, 2, 1;
...
This sequence starting with "1" = Lim:_{n..inf.} M^n, the leftshifted vector considered as a sequence. (End)
a(n) is also the sum of all entries in rows 0 to n of Sierpiński's triangle A047999.  Reinhard Zumkeller, Apr 09 2012
The production matrix of Dec 06 2009 is equivalent to the following: Let p(x) = (1 + 3x + 2x^2). The sequence = P(x) * p(x^2) * p(x^4) * p(x^8) *.... The sequence divided by its aerated variant = (1, 3, 2, 0, 0, 0...).  Gary W. Adamson, Aug 26 2016


REFERENCES

S. R. Finch, Mathematical Constants, Cambridge, 2003, Section 2.16.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).


LINKS

T. D. Noe and N. J. A. Sloane, Table of n, a(n) for n = 0..16383 [First 1000 terms from T. D. Noe]
L. Carlitz, The number of binomial coefficients divisible by a fixed power of a prime, Rend. Circ. Mat. Palermo (2) 16 (1967), pp. 299320.
K.N. Chang and S.C. Tsai, Exact solution of a minimal recurrence, Inform. Process. Lett. 75 (2000), 6164.
S. R. Finch, P. Sebah and Z.Q. Bai, Odd Entries in Pascal's Trinomial Triangle, arXiv:0802.2654 [math.NT], 2008.
N. J. Fine, Binomial coefficients modulo a prime, Amer. Math. Monthly 54:10 (1947), pp. 8992.
P. Flajolet et al., Mellin Transforms And Asymptotics: Digital Sums, Theoret. Computer Sci. 23 (1994), 291314.
P. J. Grabner and H.K. Hwang, Digital sums and divideandconquer recurrences: Fourier expansions and absolute convergence, Constructive Approximation, Jan. 2005, Volume 21, Issue 2, pp 149179.
H. Harborth, Number of Odd Binomial Coefficients, Proc. Amer. Math. Soc. 62, 1922, 1977.
F. T. Howard, The number of binomial coefficients divisible by a fixed power of 2, Proceedings of the American Mathematical Society, Vol. 29:2 (Jul 1971), pp. 236242.
Akhlesh Lakhtakia and Russell Messier, Selfsimilar sequences and chaos from Gauss sums, Computers & graphics 13.1 (1989): 5962.
A. Lakhtakia et al., Fractal sequences derived from the selfsimilar extensions of the Sierpinski gasket, J. Phys. A 21 (1988), 19251928.
N. J. A. Sloane, On the Number of ON Cells in Cellular Automata, arXiv:1503.01168 [math.CO], 2015.
R. Stephan, Divideandconquer generating functions. I. Elementary sequences, arXiv:math/0307027 [math.CO], 2003.
K. B. Stolarsky, Power and exponential sums of digital sums related to binomial coefficient parity, SIAM J. Appl. Math., 32 (1977), 717730. See B(n).  N. J. A. Sloane, Apr 05 2014
Eric Weisstein's World of Mathematics, Pascal's Triangle
Eric Weisstein's World of Mathematics, StolarskyHarborth Constant
Index entries for triangles and arrays related to Pascal's triangle


FORMULA

a(n) = Sum_{k=0..n1} 2^A000120(k).  Paul Barry, Jan 05 2005; simplified by N. J. A. Sloane, Apr 05 2014
For asymptotics see Stolarsky {1977).  N. J. A. Sloane, Apr 05 2014
a(n) = a(n1)+A001316(n1). a(2^n) = 3^n.  Henry Bottomley, Apr 05 2001
a(n) = n^(log2(3))*G(log2(n)) where G(x) is a function of period 1 defined by its Fourier series.  Benoit Cloitre, Aug 16 2002; formula modified by S. R. Finch, Dec 31 2007
G.f.: (x/(1x))prod(k>=0, 1+2x^2^k)  Ralf Stephan, Jun 01 2003; corrected by Herbert S. Wilf, Jun 16 2005
a(1) = 1, a(n) = 2a([n/2]) + a(ceil(n/2)).
a(n) = 3 a([n/2]) + (n%2)*2^A000120(n1), where n%2 = parity of n (= 1 if odd, 0 else).  M. F. Hasler, May 03 2009


MAPLE

f:=proc(n) option remember;
if n <= 1 then n elif n mod 2 = 0 then 3*f(n/2)
else 2*f((n1)/2)+f((n+1)/2); fi; end;
[seq(f(n), n=0..130)]; # N. J. A. Sloane, Jul 29 2014


MATHEMATICA

f[n_] := Sum[ Mod[ Binomial[n, k], 2], {k, 0, n} ]; Table[ Sum[ f[k], {k, 0, n} ], {n, 0, 100} ]
Join[{0}, Accumulate[Count[#, _?OddQ]&/@Table[Binomial[n, k], {n, 0, 60}, {k, 0, n}]]] (* Harvey P. Dale, Dec 10 2014 *)


PROG

(PARI) A006046(n)={ n<2 & return(n); A006046(n\2)*3+if(n%2, 1<<norml2(binary(n\2))) } \\ M. F. Hasler, May 03 2009
(Haskell)
a006046 = sum . concat . (`take` a047999_tabl)
 Reinhard Zumkeller, Apr 09 2012
(MAGMA) [0] cat [n le 1 select 1 else 2*Self(Floor(n/2)) + Self(Floor(Ceiling(n/2))): n in [1..60]]; // Vincenzo Librandi, Aug 30 2016


CROSSREFS

Partial sums of A001316.
a(n) = A074330(n1)+1 for n>=2. A080978(n) = 2*a(n)+1. Cf. A080263.
Cf. A159912.  M. F. Hasler, May 03 2009
Cf. A166556.  Gary W. Adamson, Oct 17 2009
Cf. A048896.
Sequences of form a(n)=r*a(ceil(n/2))+s*a(floor(n/2)), a(1)=1, for (r,s) = (1,1), (1,2), (2,1), (1,3), (2,2), (3,1), (1,4), (2,3), (3,2), (4,1): A000027, A006046, A064194, A130665, A073121, A268524, A116520, A268525, A268526, A268527.
Sequence in context: A075991 A216091 A002731 * A161830 A151922 A233762
Adjacent sequences: A006043 A006044 A006045 * A006047 A006048 A006049


KEYWORD

nonn,nice,easy,look


AUTHOR

Jeffrey Shallit


EXTENSIONS

More terms from James A. Sellers, Aug 21 2000
Definition expanded by N. J. A. Sloane, Feb 16 2016


STATUS

approved



