A125792
Column 2 of table A125790; also equals row sums of matrix power A078121^2.
Original entry on oeis.org
1, 3, 9, 35, 201, 1827, 27337, 692003, 30251721, 2320518947, 316359580361, 77477180493603, 34394869942983369, 27893897106768940835, 41603705003444309596873, 114788185359199234852802339, 588880400923055731115178072777, 5642645813427132737155703265972003
Offset: 0
G.f.: 1 + 3*x + 9*x^2 + 35*x^3 + 201*x^4 + 1827*x^5 + 27337*x^6 + 692003*x^7 + ...
To obtain t_2(5,1) we use the table T, defined as T[i,j]= t_2(i,j), for i=1,2,...,5(=n), and j= 0,1,2,...,16(= k*m^{n-1}). It is 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 1,3,5,7,9,11,13,15,17 1,9,25,49,81 1,35,165 1,201 Column 1 contains the first 5 members of A125792. [_Valentin Bakoev_, Feb 15 2009]
-
g:= proc(b, n, k) option remember; local t; if b<0 then 0 elif b=0 or n=0 or k<=1 then 1 elif b>=n then add(g(b-t, n, k) *binomial(n+1, t) *(-1)^(t+1), t=1..n+1); else g(b-1, n, k) +g(b*k, n-1, k) fi end: a:= n-> g(1, n+1,2)-1: seq(a(n), n=0..25); # Alois P. Heinz, Feb 27 2009
-
T[n_, k_] := T[n, k] = T[n, k-1] + T[n-1, 2*k]; T[0, ] = T[, 0] = 1; Table[T[n, 2], {n, 0, 20} ] (* Jean-François Alcover, Jun 15 2015 *)
-
{a(n)=local(p=2,q=2,A=Mat(1), B); for(m=1, n+1, B=matrix(m, m); for(i=1, m, for(j=1, i, if(j==i||j==1, B[i, j]=1, B[i, j]=(A^q)[i-1, j-1]); )); A=B); return(sum(c=0,n,(A^p)[n+1,c+1]))}
for(n=0,25,print1(a(n),", "))
-
{a(n, k=3) = if(n<1, n==0, sum(i=1, k, a(n-1, 2*i-1)))}; /* Michael Somos, Nov 24 2016 */
A125794
Column 4 of table A125790; also equals row sums of matrix power A078121^4.
Original entry on oeis.org
1, 5, 25, 165, 1625, 25509, 664665, 29559717, 2290267225, 314039061413, 77160820913241, 34317392762489765, 27859502236825957465, 41575811106337540656037, 114746581654195790543205465, 588765612737696531880325270437, 5642056933026209681424588087899225
Offset: 0
-
a(n)=local(p=4,q=2,A=Mat(1), B); for(m=1, n+1, B=matrix(m, m); for(i=1, m, for(j=1, i, if(j==i || j==1, B[i, j]=1, B[i, j]=(A^q)[i-1, j-1]); )); A=B); return(sum(c=0,n,(A^p)[n+1,c+1]))
A125793
Column 3 of table A125790; also equals row sums of matrix power A078121^3.
Original entry on oeis.org
1, 4, 16, 84, 656, 8148, 167568, 5866452, 356855440, 38315189204, 7352635371152, 2547660633170900, 1607532367023451792, 1860491404939092059092, 3974085151281967171382928, 15751822048486986712162264020
Offset: 0
-
a(n)=local(p=3,q=2,A=Mat(1), B); for(m=1, n+1, B=matrix(m, m); for(i=1, m, for(j=1, i, if(j==i || j==1, B[i, j]=1, B[i, j]=(A^q)[i-1, j-1]); )); A=B); return(sum(c=0,n,(A^p)[n+1,c+1]))
A125795
Column 5 of table A125790; also equals row sums of matrix power A078121^5.
Original entry on oeis.org
1, 6, 36, 286, 3396, 64350, 2026564, 109082974, 10243585092, 1704787839326, 509106367263812, 275575947307878750, 272638898948894782532, 496470192421055920965982, 1674003944602430578138969156, 10505662319550964196499807897950, 123269344114733507237294056110191684
Offset: 0
-
a(n)=local(p=5,q=2,A=Mat(1), B); for(m=1, n+1, B=matrix(m, m); for(i=1, m, for(j=1, i, if(j==i || j==1, B[i, j]=1, B[i, j]=(A^q)[i-1, j-1]); )); A=B); return(sum(c=0,n,(A^p)[n+1,c+1]))
A125796
Column 6 of table A125790; also equals row sums of matrix power A078121^6.
Original entry on oeis.org
1, 7, 49, 455, 6321, 140231, 5174449, 326603719, 35994670257, 7036275790791, 2470183452677297, 1573137497080468423, 1832597507832323118257, 3932481446278522861786055, 15637033863127787477309461681, 115814953429924513361085880079303, 1604893891765170672173387008222303409
Offset: 0
-
a(n)=local(p=6,q=2,A=Mat(1), B); for(m=1, n+1, B=matrix(m, m); for(i=1, m, for(j=1, i, if(j==i || j==1, B[i, j]=1, B[i, j]=(A^q)[i-1, j-1]); )); A=B); return(sum(c=0,n,(A^p)[n+1,c+1]))
Original entry on oeis.org
1, 2, 9, 84, 1625, 64350, 5174449, 841185704, 275723872209, 181906966455026, 241258554545388985, 642662865556736504700, 3436011253857466940820073, 36852501476559726217536067974, 792571351187806816558255494473185
Offset: 0
-
a(n)=local(q=2,A=Mat(1), B); for(m=1, n+1, B=matrix(m, m); for(i=1, m, for(j=1, i, if(j==i || j==1, B[i, j]=1, B[i, j]=(A^q)[i-1, j-1]); )); A=B); return(sum(c=0,n,(A^n)[n+1,c+1]))
Original entry on oeis.org
1, 4, 35, 656, 25509, 2026564, 326603719, 106355219008, 69808185542089, 92203545302072964, 244779396712068825067, 1305009502037405316440848, 13963029918525356899170492525, 299675759834305402824238609624548
Offset: 0
-
a(n)=local(q=2,A=Mat(1), B); for(m=1, n+2, B=matrix(m, m); for(i=1, m, for(j=1, i, if(j==i || j==1, B[i, j]=1, B[i, j]=(A^q)[i-1, j-1]); )); A=B); return(sum(c=0,n+1,(A^n)[n+2,c+1]))
A125799
Antidiagonal sums of table A125790.
Original entry on oeis.org
1, 2, 4, 9, 25, 94, 520, 4521, 64793, 1581010, 67106004, 5029631745, 673439168257, 162631617757086, 71416302988324776, 57430160224301687377, 85096038984339418975505, 233592305902515392375925762, 1193627868786115606927913952196, 11402285904243733254203516140245465
Offset: 0
-
a(n)=local(q=2,A=Mat(1), B); for(m=1, n+1, B=matrix(m, m); for(i=1, m, for(j=1, i, if(j==i || j==1, B[i, j]=1, B[i, j]=(A^q)[i-1, j-1]); )); A=B); return(sum(c=0,n,(A^(c+1))[n-c+1,1]))
A381810
Array read by downward antidiagonals: A(n,k) is a generalization of odd columns of A125790 defined in Comments for n > 0, k >= 0.
Original entry on oeis.org
2, 4, 4, 6, 16, 6, 8, 36, 20, 10, 10, 64, 42, 84, 14, 12, 100, 72, 286, 100, 20, 14, 144, 110, 680, 322, 120, 26, 16, 196, 156, 1330, 744, 364, 140, 36, 18, 256, 210, 2300, 1430, 816, 406, 656, 46, 20, 324, 272, 3654, 2444, 1540, 888, 3396, 740, 60, 22, 400, 342, 5456, 3850, 2600, 1650, 10816, 3682, 840, 74
Offset: 1
Array begins:
===========================================================
n\k| 0 1 2 3 4 5 6 7 ...
---+-------------------------------------------------------
1 | 2, 4, 6, 8, 10, 12, 14, 16 ...
2 | 4, 16, 36, 64, 100, 144, 196, 256 ...
3 | 6, 20, 42, 72, 110, 156, 210, 272 ...
4 | 10, 84, 286, 680, 1330, 2300, 3654, 5456 ...
5 | 14, 100, 322, 744, 1430, 2444, 3850, 5712 ...
6 | 20, 120, 364, 816, 1540, 2600, 4060, 5984 ...
7 | 26, 140, 406, 888, 1650, 2756, 4270, 6256 ...
8 | 36, 656, 3396, 10816, 26500, 55056, 102116, 174336 ...
...
Cf.
A000123,
A001511,
A007814,
A053645,
A062383,
A070939,
A078121,
A106400,
A119387,
A125790,
A236206.
-
upto1(n) = my(v1); v1 = vector(n+1, i, vector(i, j, j==1 || j==i)); for(i=2, n, for(j=1, i-1, v1[i+1][j+1] = sum(k=j-1, i-1, v1[i][k+1]*v1[k+1][j]))); v1
A(n,m) = my(L = logint(n,2), A = valuation(n,2), B = logint(n>>A,2), v1, v2, v3); v1 = upto1(L+2); v2 = vector(L+2, i, vecsum(v1[i])); for(i=1, 2*m, v2 = vector(L+2, i, sum(j=1, i, v1[i][j]*v2[j]))); for(i=1, B, v3 = v2; for(j=1, L-i+1, v2[j+1] = sum(k=1, j+1, v1[j+1][k]*v3[k+1]*if(!bittest(n,L-i+1), (-1)^(j+k+1), 1)))); v2[A+2]
-
upto1(n) = my(v1); v1 = vector(n+1, i, vector(i, j, j==1 || j==i)); for(i=2, n, for(j=1, i-1, v1[i+1][j+1] = sum(k=j-1, i-1, v1[i][k+1]*v1[k+1][j]))); v1
upto2(n,m) = my(L = logint(n,2), A = valuation(n,2), B = logint(n>>A,2), v1, v2, v3, v4, v5); v1 = upto1(L+2); v2 = vector(L+2, i, 1); v3 = vector(m+1, i, 0); for(s=0, m, for(i=1, min(s+1,2), v2 = vector(L+2, i, sum(j=1, i, v1[i][j]*v2[j]))); v4 = v2; for(i=1, B, v5 = v4; for(j=1, L-i+1, v4[j+1] = sum(k=1, j+1, v1[j+1][k]*v5[k+1]*if(!bittest(n,L-i+1), (-1)^(j+k+1), 1)))); v3[s+1] = v4[A+2]); v3 \\ slightly modified version of the first program, some kind of memoization; generates A(n,k) for k=0..m
A000123
Number of binary partitions: number of partitions of 2n into powers of 2.
Original entry on oeis.org
1, 2, 4, 6, 10, 14, 20, 26, 36, 46, 60, 74, 94, 114, 140, 166, 202, 238, 284, 330, 390, 450, 524, 598, 692, 786, 900, 1014, 1154, 1294, 1460, 1626, 1828, 2030, 2268, 2506, 2790, 3074, 3404, 3734, 4124, 4514, 4964, 5414, 5938, 6462, 7060, 7658, 8350, 9042, 9828
Offset: 0
For non-squashing partitions and binary partitions see the example in A018819.
For n=3, the a(3)=6 admitted partitions of 2n=6 are 1+1+1+1+1+1, 1+1+1+1+2, 1+1+2+2, 2+2+2, 1+1+4 and 2+4. - _R. J. Mathar_, Aug 11 2021
- G. E. Andrews, The Theory of Partitions, Addison-Wesley, 1976.
- R. F. Churchhouse, Binary partitions, pp. 397-400 of A. O. L. Atkin and B. J. Birch, editors, Computers in Number Theory. Academic Press, NY, 1971.
- N. G. de Bruijn, On Mahler's partition problem, Indagationes Mathematicae, vol. X (1948), 210-220.
- G. Everest, A. van der Poorten, I. Shparlinski and T. Ward, Recurrence Sequences, Amer. Math. Soc., 2003; see esp. p. 255.
- H. Gupta, A simple proof of the Churchhouse conjecture concerning binary partitions, Indian J. Pure Appl. Math. 3 (1972), 791-794.
- H. Gupta, A direct proof of the Churchhouse conjecture concerning binary partitions, Indian J. Math. 18 (1976), 1-5.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- Alois P. Heinz, Table of n, a(n) for n = 0..65536 (first 10001 terms from T. D. Noe)
- Joerg Arndt, Matters Computational (The Fxtbook), p. 728
- C. Banderier, H.-K. Hwang, V. Ravelomanana and V. Zacharovas, Analysis of an exhaustive search algorithm in random graphs and the n^{c logn}-asymptotics, 2012. - From _N. J. A. Sloane_, Dec 23 2012
- Sara Billey, Matjaž Konvalinka and Frederick A. Matsen IV, On trees, tanglegrams, and tangled chains, hal-02173394 [math.CO], 2020.
- Henry Bottomley, Illustration of initial terms
- N. G. de Bruijn, On Mahler's partition problem, 1948.
- R. F. Churchhouse, Congruence properties of the binary partition function, Proc. Cambridge Philos. Soc. 66 1969 371-376.
- Philippe Deléham, Letter to N. J. A. Sloane, Apr 20 1998
- P. Dumas and P. Flajolet, Asymptotique des recurrences mahleriennes: le cas cyclotomique, Journal de Théorie des Nombres de Bordeaux 8 (1996), pp. 1-30.
- Amanda Folsom et al, On a general class of non-squashing partitions, Discrete Mathematics 339.5 (2016): 1482-1506.
- C.-E. Froberg, Accurate estimation of the number of binary partitions, Nordisk Tidskr. Informationsbehandling (BIT) 17 (1977), 386-391.
- C.-E. Froberg, Accurate estimation of the number of binary partitions [Annotated scanned copy]
- Maciej Gawron, Piotr Miska and Maciej Ulas, Arithmetic properties of coefficients of power series expansion of Prod_{n>=0} (1-x^(2^n))^t, arXiv:1703.01955 [math.NT], 2017.
- H. Gupta, Proof of the Churchhouse conjecture concerning binary partitions, Proc. Camb. Phil. Soc. 70 (1971), 53-56.
- R. K. Guy, Letters to N. J. A. Sloane and J. W. Moon, 1988
- M. D. Hirschhorn and J. A. Sellers, A different view of m-ary partitions, Australasian J. Combin., 30 (2004), 193-196.
- M. D. Hirschhorn and J. A. Sellers, A different view of m-ary partitions
- Youkow Homma, Jun Hwan Ryu and Benjamin Tong, Sequence non-squashing partitions, Slides from a talk, Jul 24 2014.
- K. Ji and H. S. Wilf, Extreme palindromes, Amer. Math. Monthly, 115, no. 5 (2008), 447-451.
- Y. Kachi and P. Tzermias, On the m-ary partition numbers, Algebra and Discrete Mathematics, Volume 19 (2015). Number 1, pp. 67-76.
- Martin Klazar, What is an answer? — remarks, results and problems on PIO formulas in combinatorial enumeration, part I, arXiv:1808.08449 [math.CO], 2018.
- D. E. Knuth, An almost linear recurrence, Fib. Quart., 4 (1966), 117-128.
- M. Konvalinka and I. Pak, Cayley compositions, partitions, polytopes, and geometric bijections - _N. J. A. Sloane_, Dec 22 2012
- M. Konvalinka and I. Pak, Cayley compositions, partitions, polytopes, and geometric bijections, Journal of Combinatorial Theory, Series A, Volume 123, Issue 1, April 2014, Pages 86-91.
- Vaclav Kotesovec, Graph - the asymptotic ratio (10^8 terms)
- M. Latapy, Partitions of an integer into powers, DMTCS Proceedings AA (DM-CCG), 2001, 215-228.
- M. Latapy, Partitions of an integer into powers, DMTCS Proceedings AA (DM-CCG), 2001, 215-228. [Cached copy, with permission]
- K. Mahler, On a special functional equation, Journ. London Math. Soc. 15 (1940), 115-123.
- Mathematics Stack Exchange, Efficient computation of number of partitions into powers of 2, Jul 10 2024.
- E. O'Shea, M-partitions: optimal partitions of weight for one scale pan, Discrete Math. 289 (2004), 81-93. See Lemma 29.
- Igor Pak, Complexity problems in enumerative combinatorics, arXiv:1803.06636 [math.CO], 2018.
- John L. Pfaltz, Evaluating the binary partition function when N = 2^n, Congr. Numer, 109:3-12, 1995. [Broken link]
- B. Reznick, Some binary partition functions, in "Analytic number theory" (Conf. in honor P. T. Bateman, Allerton Park, IL, 1989), 451-477, Progr. Math., 85, Birkhäuser Boston, Boston, MA, 1990.
- O. J. Rodseth, Enumeration of M-partitions, Discrete Math., 306 (2006), 694-698.
- O. J. Rodseth and J. A. Sellers, Binary partitions revisited, J. Combinatorial Theory, Series A 98 (2002), 33-45.
- O. J. Rodseth and J. A. Sellers, On a Restricted m-Non-Squashing Partition Function, Journal of Integer Sequences, Vol. 8 (2005), Article 05.5.4.
- D. Ruelle, Dynamical zeta functions and transfer operators, Notices Amer. Math. Soc., 49 (No. 8, 2002), 887-895; see p. 888.
- Frank Ruskey, Info on binary partitions
- N. J. A. Sloane and J. A. Sellers, On non-squashing partitions, arXiv:math/0312418 [math.CO], 2003.
- N. J. A. Sloane and J. A. Sellers, On non-squashing partitions, Discrete Math., 294 (2005), 259-274.
- Daniel G. Zhu, An improved lower bound on the Shannon capacities of complements of odd cycles, arXiv:2402.10025 [math.CO], 2024.
- Index entries for "core" sequences
-
import Data.List (transpose)
a000123 n = a000123_list !! n
a000123_list = 1 : zipWith (+)
a000123_list (tail $ concat $ transpose [a000123_list, a000123_list])
-- Reinhard Zumkeller, Nov 15 2012, Aug 01 2011
-
[1] cat [n eq 1 select n+1 else Self(n-1) + Self(n div 2): n in [1..70]]; // Vincenzo Librandi, Dec 17 2016
-
A000123 := proc(n) option remember; if n=0 then 1 else A000123(n-1)+A000123(floor(n/2)); fi; end; [ seq(A000123(i),i=0..50) ];
# second Maple program: more efficient for large n; try: a( 10^25 );
g:= proc(b, n) option remember; `if`(b<0, 0, `if`(b=0 or
n=0, 1, `if`(b>=n, add((-1)^(t+1)*binomial(n+1, t)
*g(b-t, n), t=1..n+1), g(b-1, n)+g(2*b, n-1))))
end:
a:= n-> (t-> g(n/2^(t-1), t))(max(ilog2(2*n), 1)):
seq(a(n), n=0..60); # Alois P. Heinz, Apr 16 2009, revised Apr 14 2016
-
a[0] = 1; a[n_] := a[n] = a[Floor[n/2]] + a[n-1]; Array[a,49,0] (* Jean-François Alcover, Apr 11 2011, after M. F. Hasler *)
Fold[Append[#1, Total[Take[Flatten[Transpose[{#1, #1}]], #2]]] &, {1}, Range[2, 49]] (* Birkas Gyorgy, Apr 18 2011 *)
-
{a(n) = my(A, m); if( n<1, n==0, m=1; A = 1 + O(x); while(m<=n, m*=2; A = subst(A, x, x^2) * (1+x) / (1-x)); polcoeff(A, n))}; /* Michael Somos, Aug 25 2003 */
-
{a(n) = if( n<1, n==0, a(n\2) + a(n-1))}; /* Michael Somos, Aug 25 2003 */
-
A123=[];A000123(n)={ n<3 && return(2^n); if( n<=#A123, A123[n] && return(A123[n]); A123[n-1] && return( A123[n] = A123[n-1]+A000123(n\2) ), n>2*#A123 && A123=concat(A123,vector((n-#A123)\2))); A123[if(n>#A123,1,n)]=2*sum(k=1,n\2-1,A000123(k),1)+(n%2+1)*A000123(n\2)} \\ Stores results in global vector A123 dynamically resized to at most 3n/4 when size is less than n/2. Gives a(n*10^6) in ~ n sec. - M. F. Hasler, Apr 30 2009
-
{a(n)=polcoeff(exp(sum(m=1,n,2^valuation(2*m,2)*x^m/m)+x*O(x^n)),n)} \\ Paul D. Hanna, Oct 30 2012
-
from functools import lru_cache
@lru_cache(maxsize=None)
def A000123(n): return 1 if n == 0 else A000123(n-1) + A000123(n//2) # Chai Wah Wu, Jan 18 2022
More terms from Robin Trew (trew(AT)hcs.harvard.edu)
Values up to a(10^4) checked with given PARI code by
M. F. Hasler, Apr 30 2009
Showing 1-10 of 14 results.
Comments