cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 41 results. Next

A000290 The squares: a(n) = n^2.

Original entry on oeis.org

0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1024, 1089, 1156, 1225, 1296, 1369, 1444, 1521, 1600, 1681, 1764, 1849, 1936, 2025, 2116, 2209, 2304, 2401, 2500
Offset: 0

Views

Author

Keywords

Comments

To test if a number is a square, see Cohen, p. 40. - N. J. A. Sloane, Jun 19 2011
Zero followed by partial sums of A005408 (odd numbers). - Jeremy Gardiner, Aug 13 2002
Begin with n, add the next number, subtract the previous number and so on ending with subtracting a 1: a(n) = n + (n+1) - (n-1) + (n+2) - (n-2) + (n+3) - (n-3) + ... + (2n-1) - 1 = n^2. - Amarnath Murthy, Mar 24 2004
Sum of two consecutive triangular numbers A000217. - Lekraj Beedassy, May 14 2004
Numbers with an odd number of divisors: {d(n^2) = A048691(n); for the first occurrence of 2n + 1 divisors, see A071571(n)}. - Lekraj Beedassy, Jun 30 2004
See also A000037.
First sequence ever computed by electronic computer, on EDSAC, May 06 1949 (see Renwick link). - Russ Cox, Apr 20 2006
Numbers k such that the imaginary quadratic field Q(sqrt(-k)) has four units. - Marc LeBrun, Apr 12 2006
For n > 0: number of divisors of (n-1)th power of any squarefree semiprime: a(n) = A000005(A006881(k)^(n-1)); a(n) = A000005(A000400(n-1)) = A000005(A011557(n-1)) = A000005(A001023(n-1)) = A000005(A001024(n-1)). - Reinhard Zumkeller, Mar 04 2007
If a 2-set Y and an (n-2)-set Z are disjoint subsets of an n-set X then a(n-2) is the number of 3-subsets of X intersecting both Y and Z. - Milan Janjic, Sep 19 2007
Numbers a such that a^1/2 + b^1/2 = c^1/2 and a^2 + b = c. - Cino Hilliard, Feb 07 2008 (this comment needs clarification, Joerg Arndt, Sep 12 2013)
Numbers k such that the geometric mean of the divisors of k is an integer. - Ctibor O. Zizka, Jun 26 2008
Equals row sums of triangle A143470. Example: 36 = sum of row 6 terms: (23 + 7 + 3 + 1 + 1 + 1). - Gary W. Adamson, Aug 17 2008
Equals row sums of triangles A143595 and A056944. - Gary W. Adamson, Aug 26 2008
Number of divisors of 6^(n-1) for n > 0. - J. Lowell, Aug 30 2008
Denominators of Lyman spectrum of hydrogen atom. Numerators are A005563. A000290-A005563 = A000012. - Paul Curtz, Nov 06 2008
a(n) is the number of all partitions of the sum 2^2 + 2^2 + ... + 2^2, (n-1) times, into powers of 2. - Valentin Bakoev, Mar 03 2009
a(n) is the maximal number of squares that can be 'on' in an n X n board so that all the squares turn 'off' after applying the operation: in any 2 X 2 sub-board, a square turns from 'on' to 'off' if the other three are off. - Srikanth K S, Jun 25 2009
Zero together with the numbers k such that 2 is the number of perfect partitions of k. - Juri-Stepan Gerasimov, Sep 26 2009
Totally multiplicative sequence with a(p) = p^2 for prime p. - Jaroslav Krizek, Nov 01 2009
Satisfies A(x)/A(x^2), A(x) = A173277: (1, 4, 13, 32, 74, ...). - Gary W. Adamson, Feb 14 2010
Positive members are the integers with an odd number of odd divisors and an even number of even divisors. See also A120349, A120359, A181792, A181793, A181795. - Matthew Vandermast, Nov 14 2010
Besides the first term, this sequence is the denominator of Pi^2/6 = 1 + 1/4 + 1/9 + 1/16 + 1/25 + 1/36 + ... . - Mohammad K. Azarian, Nov 01 2011
Partial sums give A000330. - Omar E. Pol, Jan 12 2013
Drmota, Mauduit, and Rivat proved that the Thue-Morse sequence along the squares is normal; see A228039. - Jonathan Sondow, Sep 03 2013
a(n) can be decomposed into the sum of the four numbers [binomial(n, 1) + binomial(n, 2) + binomial(n-1, 1) + binomial(n-1, 2)] which form a "square" in Pascal's Triangle A007318, or the sum of the two numbers [binomial(n, 2) + binomial(n+1, 2)], or the difference of the two numbers [binomial(n+2, 3) - binomial(n, 3)]. - John Molokach, Sep 26 2013
In terms of triangular tiling, the number of equilateral triangles with side length 1 inside an equilateral triangle with side length n. - K. G. Stier, Oct 30 2013
Number of positive roots in the root systems of type B_n and C_n (when n > 1). - Tom Edgar, Nov 05 2013
Squares of squares (fourth powers) are also called biquadratic numbers: A000583. - M. F. Hasler, Dec 29 2013
For n > 0, a(n) is the largest integer k such that k^2 + n is a multiple of k + n. More generally, for m > 0 and n > 0, the largest integer k such that k^(2*m) + n is a multiple of k + n is given by k = n^(2*m). - Derek Orr, Sep 03 2014
For n > 0, a(n) is the number of compositions of n + 5 into n parts avoiding the part 2. - Milan Janjic, Jan 07 2016
a(n), for n >= 3, is also the number of all connected subtrees of a cycle graph, having n vertices. - Viktar Karatchenia, Mar 02 2016
On every sequence of natural continuous numbers with an even number of elements, the summatory of the second half of the sequence minus the summatory of the first half of the sequence is always a square. Example: Sequence from 61 to 70 has an even number of elements (10). Then 61 + 62 + 63 + 64 + 65 = 315; 66 + 67 + 68 + 69 + 70 = 340; 340 - 315 = 25. (n/2)^2 for n = number of elements. - César Aguilera, Jun 20 2016
On every sequence of natural continuous numbers from n^2 to (n+1)^2, the sum of the differences of pairs of elements of the two halves in every combination possible is always (n+1)^2. - César Aguilera, Jun 24 2016
Suppose two circles with radius 1 are tangent to each other as well as to a line not passing through the point of tangency. Create a third circle tangent to both circles as well as the line. If this process is continued, a(n) for n > 0 is the reciprocals of the radii of the circles, beginning with the largest circle. - Melvin Peralta, Aug 18 2016
Does not satisfy Benford's law [Ross, 2012]. - N. J. A. Sloane, Feb 08 2017
Numerators of the solution to the generalization of the Feynman triangle problem, with an offset of 2. If each vertex of a triangle is joined to the point (1/p) along the opposite side (measured say clockwise), then the area of the inner triangle formed by these lines is equal to (p - 2)^2/(p^2 - p + 1) times the area of the original triangle, p > 2. For example, when p = 3, the ratio of the areas is 1/7. The denominators of the ratio of the areas is given by A002061. [Cook & Wood, 2004] - Joe Marasco, Feb 20 2017
Equals row sums of triangle A004737, n >= 1. - Martin Michael Musatov, Nov 07 2017
Right-hand side of the binomial coefficient identity Sum_{k = 0..n} (-1)^(n+k+1)*binomial(n,k)*binomial(n + k,k)*(n - k) = n^2. - Peter Bala, Jan 12 2022
Conjecture: For n>0, min{k such that there exist subsets A,B of {0,1,2,...,a(n)-1} such that |A|=|B|=k and A+B contains {0,1,2,...,a(n)-1}} = n. - Michael Chu, Mar 09 2022
Number of 3-permutations of n elements avoiding the patterns 132, 213, 321. See Bonichon and Sun. - Michel Marcus, Aug 20 2022
Number of intercalates in cyclic Latin squares of order 2n (cyclic Latin squares of odd order do not have intercalates). - Eduard I. Vatutin, Feb 15 2024
a(n) is the number of ternary strings of length n with at most one 0, exactly one 1, and no restriction on the number of 2's. For example, a(3)=9, consisting of the 6 permutations of the string 102 and the 3 permutations of the string 122. - Enrique Navarrete, Mar 12 2025

Examples

			For n = 8, a(8) = 8 * 15 - (1 + 3 + 5 + 7 + 9 + 11 + 13) - 7 = 8 * 15 - 49 - 7 = 64. - _Bruno Berselli_, May 04 2010
G.f. = x + 4*x^2 + 9*x^3 + 16*x^4 + 25*x^5 + 36*x^6 + 49*x^7 + 64*x^8 + 81*x^9 + ...
a(4) = 16. For n = 4 vertices, the cycle graph C4 is A-B-C-D-A. The subtrees are: 4 singles: A, B, C, D; 4 pairs: A-B, BC, C-D, A-D; 4 triples: A-B-C, B-C-D, C-D-A, D-A-B; 4 quads: A-B-C-D, B-C-D-A, C-D-A-B, D-A-B-C; 4 + 4 + 4 + 4 = 16. - _Viktar Karatchenia_, Mar 02 2016
		

References

  • G. L. Alexanderson et al., The William Lowell Putnam Mathematical Competition, Problems and Solutions: 1965-1984, "December 1967 Problem B4(a)", pp. 8(157) MAA Washington DC 1985.
  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 2.
  • Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See Chapter XV, pp. 135-167.
  • R. P. Burn & A. Chetwynd, A Cascade Of Numbers, "The prison door problem" Problem 4 pp. 5-7; 79-80 Arnold London 1996.
  • H. Cohen, A Course in Computational Algebraic Number Theory, Springer, 1996, p. 40.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 31, 36, 38, 63.
  • E. Deza and M. M. Deza, Figurate numbers, World Scientific Publishing (2012), p. 6.
  • M. Gardner, Time Travel and Other Mathematical Bewilderments, Chapter 6 pp. 71-2, W. H. Freeman NY 1988.
  • Granino A. Korn and Theresa M. Korn, Mathematical Handbook for Scientists and Engineers, McGraw-Hill Book Company, New York (1968), p. 982.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §8.1 Terminology and §8.6 Figurate Numbers, pp. 264, 290-291.
  • Alfred S. Posamentier, The Art of Problem Solving, Section 2.4 "The Long Cell Block" pp. 10-1; 12; 156-7 Corwin Press Thousand Oaks CA 1996.
  • Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, pages 35, 52-53, 129-132, 244.
  • Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2.
  • 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).
  • J. K. Strayer, Elementary Number Theory, Exercise Set 3.3 Problems 32, 33, p. 88, PWS Publishing Co. Boston MA 1996.
  • C. W. Trigg, Mathematical Quickies, "The Lucky Prisoners" Problem 141 pp. 40, 141, Dover NY 1985.
  • R. Vakil, A Mathematical Mosaic, "The Painted Lockers" pp. 127;134 Brendan Kelly Burlington Ontario 1996.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 123.

Crossrefs

Cf. A092205, A128200, A005408, A128201, A002522, A005563, A008865, A059100, A143051, A143470, A143595, A056944, A001157 (inverse Möbius transform), A001788 (binomial transform), A228039, A001105, A004159, A159918, A173277, A095794, A162395, A186646 (Pisano periods), A028338 (2nd diagonal).
A row or column of A132191.
This sequence is related to partitions of 2^n into powers of 2, as it is shown in A002577. So A002577 connects the squares and A000447. - Valentin Bakoev, Mar 03 2009
Boustrophedon transforms: A000697, A000745.
Cf. A342819.
Cf. A013661.

Programs

Formula

G.f.: x*(1 + x) / (1 - x)^3.
E.g.f.: exp(x)*(x + x^2).
Dirichlet g.f.: zeta(s-2).
a(n) = a(-n).
Multiplicative with a(p^e) = p^(2*e). - David W. Wilson, Aug 01 2001
Sum of all matrix elements M(i, j) = 2*i/(i+j) (i, j = 1..n). a(n) = Sum_{i = 1..n} Sum_{j = 1..n} 2*i/(i + j). - Alexander Adamchuk, Oct 24 2004
a(0) = 0, a(1) = 1, a(n) = 2*a(n-1) - a(n-2) + 2. - Miklos Kristof, Mar 09 2005
From Pierre CAMI, Oct 22 2006: (Start)
a(n) is the sum of the odd numbers from 1 to 2*n - 1.
a(0) = 0, a(1) = 1, then a(n) = a(n-1) + 2*n - 1. (End)
For n > 0: a(n) = A130064(n)*A130065(n). - Reinhard Zumkeller, May 05 2007
a(n) = Sum_{k = 1..n} A002024(n, k). - Reinhard Zumkeller, Jun 24 2007
Left edge of the triangle in A132111: a(n) = A132111(n, 0). - Reinhard Zumkeller, Aug 10 2007
Binomial transform of [1, 3, 2, 0, 0, 0, ...]. - Gary W. Adamson, Nov 21 2007
a(n) = binomial(n+1, 2) + binomial(n, 2).
This sequence could be derived from the following general formula (cf. A001286, A000330): n*(n+1)*...*(n+k)*(n + (n+1) + ... + (n+k))/((k+2)!*(k+1)/2) at k = 0. Indeed, using the formula for the sum of the arithmetic progression (n + (n+1) + ... + (n+k)) = (2*n + k)*(k + 1)/2 the general formula could be rewritten as: n*(n+1)*...*(n+k)*(2*n+k)/(k+2)! so for k = 0 above general formula degenerates to n*(2*n + 0)/(0 + 2) = n^2. - Alexander R. Povolotsky, May 18 2008
From a(4) recurrence formula a(n+3) = 3*a(n+2) - 3*a(n+1) + a(n) and a(1) = 1, a(2) = 4, a(3) = 9. - Artur Jasinski, Oct 21 2008
The recurrence a(n+3) = 3*a(n+2) - 3*a(n+1) + a(n) is satisfied by all k-gonal sequences from a(3), with a(0) = 0, a(1) = 1, a(2) = k. - Jaume Oliver Lafont, Nov 18 2008
a(n) = floor(n*(n+1)*(Sum_{i = 1..n} 1/(n*(n+1)))). - Ctibor O. Zizka, Mar 07 2009
Product_{i >= 2} 1 - 2/a(i) = -sin(A063448)/A063448. - R. J. Mathar, Mar 12 2009
a(n) = A002378(n-1) + n. - Jaroslav Krizek, Jun 14 2009
a(n) = n*A005408(n-1) - (Sum_{i = 1..n-2} A005408(i)) - (n-1) = n*A005408(n-1) - a(n-1) - (n-1). - Bruno Berselli, May 04 2010
a(n) == 1 (mod n+1). - Bruno Berselli, Jun 03 2010
a(n) = a(n-1) + a(n-2) - a(n-3) + 4, n > 2. - Gary Detlefs, Sep 07 2010
a(n+1) = Integral_{x >= 0} exp(-x)/( (Pn(x)*exp(-x)*Ei(x) - Qn(x))^2 +(Pi*exp(-x)*Pn(x))^2 ), with Pn the Laguerre polynomial of order n and Qn the secondary Laguerre polynomial defined by Qn(x) = Integral_{t >= 0} (Pn(x) - Pn(t))*exp(-t)/(x-t). - Groux Roland, Dec 08 2010
Euler transform of length-2 sequence [4, -1]. - Michael Somos, Feb 12 2011
A162395(n) = -(-1)^n * a(n). - Michael Somos, Mar 19 2011
a(n) = A004201(A000217(n)); A007606(a(n)) = A000384(n); A007607(a(n)) = A001105(n). - Reinhard Zumkeller, Feb 12 2011
Sum_{n >= 1} 1/a(n)^k = (2*Pi)^k*B_k/(2*k!) = zeta(2*k) with Bernoulli numbers B_k = -1, 1/6, 1/30, 1/42, ... for k >= 0. See A019673, A195055/10 etc. [Jolley eq 319].
Sum_{n>=1} (-1)^(n+1)/a(n)^k = 2^(k-1)*Pi^k*(1-1/2^(k-1))*B_k/k! [Jolley eq 320] with B_k as above.
A007968(a(n)) = 0. - Reinhard Zumkeller, Jun 18 2011
A071974(a(n)) = n; A071975(a(n)) = 1. - Reinhard Zumkeller, Jul 10 2011
a(n) = A199332(2*n - 1, n). - Reinhard Zumkeller, Nov 23 2011
For n >= 1, a(n) = Sum_{d|n} phi(d)*psi(d), where phi is A000010 and psi is A001615. - Enrique Pérez Herrero, Feb 29 2012
a(n) = A000217(n^2) - A000217(n^2 - 1), for n > 0. - Ivan N. Ianakiev, May 30 2012
a(n) = (A000217(n) + A000326(n))/2. - Omar E. Pol, Jan 11 2013
a(n) = A162610(n, n) = A209297(n, n) for n > 0. - Reinhard Zumkeller, Jan 19 2013
a(A000217(n)) = Sum_{i = 1..n} Sum_{j = 1..n} i*j, for n > 0. - Ivan N. Ianakiev, Apr 20 2013
a(n) = A133280(A000217(n)). - Ivan N. Ianakiev, Aug 13 2013
a(2*a(n)+2*n+1) = a(2*a(n)+2*n) + a(2*n+1). - Vladimir Shevelev, Jan 24 2014
a(n+1) = Sum_{t1+2*t2+...+n*tn = n} (-1)^(n+t1+t2+...+tn)*multinomial(t1+t2 +...+tn,t1,t2,...,tn)*4^(t1)*7^(t2)*8^(t3+...+tn). - Mircea Merca, Feb 27 2014
a(n) = floor(1/(1-cos(1/n)))/2 = floor(1/(1-n*sin(1/n)))/6, n > 0. - Clark Kimberling, Oct 08 2014
a(n) = ceiling(Sum_{k >= 1} log(k)/k^(1+1/n)) = -Zeta'[1+1/n]. Thus any exponent greater than 1 applied to k yields convergence. The fractional portion declines from A073002 = 0.93754... at n = 1 and converges slowly to 0.9271841545163232... for large n. - Richard R. Forberg, Dec 24 2014
a(n) = Sum_{j = 1..n} Sum_{i = 1..n} ceiling((i + j - n + 1)/3). - Wesley Ivan Hurt, Mar 12 2015
a(n) = Product_{j = 1..n-1} 2 - 2*cos(2*j*Pi/n). - Michel Marcus, Jul 24 2015
From Ilya Gutkovskiy, Jun 21 2016: (Start)
Product_{n >= 1} (1 + 1/a(n)) = sinh(Pi)/Pi = A156648.
Sum_{n >= 0} 1/a(n!) = BesselI(0, 2) = A070910. (End)
a(n) = A028338(n, n-1), n >= 1 (second diagonal). - Wolfdieter Lang, Jul 21 2017
For n >= 1, a(n) = Sum_{d|n} sigma_2(d)*mu(n/d) = Sum_{d|n} A001157(d)*A008683(n/d). - Ridouane Oudra, Apr 15 2021
a(n) = Sum_{i = 1..2*n-1} ceiling(n - i/2). - Stefano Spezia, Apr 16 2021
From Richard L. Ollerton, May 09 2021: (Start) For n >= 1,
a(n) = Sum_{k=1..n} psi(n/gcd(n,k)).
a(n) = Sum_{k=1..n} psi(gcd(n,k))*phi(gcd(n,k))/phi(n/gcd(n,k)).
a(n) = Sum_{k=1..n} sigma_2(n/gcd(n,k))*mu(gcd(n,k))/phi(n/gcd(n,k)).
a(n) = Sum_{k=1..n} sigma_2(gcd(n,k))*mu(n/gcd(n,k))/phi(n/gcd(n,k)). (End)
a(n) = (A005449(n) + A000326(n))/3. - Klaus Purath, May 13 2021
Let T(n) = A000217(n), then a(T(n)) + a(T(n+1)) = T(a(n+1)). - Charlie Marion, Jun 27 2022
a(n) = Sum_{k=1..n} sigma_1(k) + Sum_{i=1..n} (n mod i). - Vadim Kataev, Dec 07 2022
a(n^2) + a(n^2+1) + ... + a(n^2+n) + 4*A000537(n) = a(n^2+n+1) + ... + a(n^2+2n). In general, if P(k,n) = the n-th k-gonal number, then P(2k,n^2) + P(2k,n^2+1) + ... + P(2k,n^2+n) + 4*(k-1)*A000537(n) = P(2k,n^2+n+1) + ... + P(2k,n^2+2n). - Charlie Marion, Apr 26 2024
Sum_{n>=1} 1/a(n) = A013661. - Alois P. Heinz, Oct 19 2024
a(n) = 1 + 3^3*((n-1)/(n+1))^2 + 5^3*((n-1)*(n-2)/((n+1)*(n+2)))^2 + 7^3*((n-1)*(n-2)*(n-3)/((n+1)*(n+2)*(n+3)))^2 + ... for n >= 1. - Peter Bala, Dec 09 2024

Extensions

Incorrect comment and example removed by Joerg Arndt, Mar 11 2010

A018818 Number of partitions of n into divisors of n.

Original entry on oeis.org

1, 2, 2, 4, 2, 8, 2, 10, 5, 11, 2, 45, 2, 14, 14, 36, 2, 81, 2, 92, 18, 20, 2, 458, 7, 23, 23, 156, 2, 742, 2, 202, 26, 29, 26, 2234, 2, 32, 30, 1370, 2, 1654, 2, 337, 286, 38, 2, 9676, 9, 407, 38, 454, 2, 3132, 38, 3065, 42, 47, 2, 73155, 2, 50, 493, 1828, 44, 5257, 2, 740, 50, 5066
Offset: 1

Views

Author

Keywords

Comments

From Reinhard Zumkeller, Dec 11 2009: (Start)
For odd primes p: a(p^2) = p + 2; for n > 1: a(A001248(n)) = A052147(n);
For odd primes p > 3, a(3*p) = 2*p + 4; for n > 2: a(A001748(n)) = A100484(n) + 4. (End)
From Matthew Crawford, Jan 19 2021: (Start)
For a prime p, a(p^3) = (p^3 + p^2 + 2*p + 4)/2;
For distinct primes p and q, a(p*q) = (p+1)*(q+1)/2 + 2. (End)

Examples

			The a(6) = 8 representations of 6 are 6 = 3 + 3 = 3 + 2 + 1 = 3 + 1 + 1 + 1 = 2 + 2 + 2 = 2 + 2 + 1 + 1 = 2 + 1 + 1 + 1 + 1 = 1 + 1 + 1 + 1 + 1 + 1.
		

Crossrefs

Programs

  • Haskell
    a018818 n = p (init $ a027750_row n) n + 1 where
       p _      0 = 1
       p []     _ = 0
       p ks'@(k:ks) m | m < k     = 0
                      | otherwise = p ks' (m - k) + p ks m
    -- Reinhard Zumkeller, Apr 02 2012
    
  • Magma
    [#RestrictedPartitions(n,{d:d in Divisors(n)}): n in [1..100]]; // Marius A. Burtea, Jan 02 2019
  • Maple
    A018818 := proc(n)
        local a,p,w,el ;
        a := 0 ;
        for p in combinat[partition](n) do
            w := true ;
            for el in p do
                if modp(n,el) <> 0 then
                    w := false;
                    break;
                end if;
            end do:
            if w then
                a := a+1 ;
            end if;
        end do:
        a ;
    end proc: # R. J. Mathar, Mar 30 2017
  • Mathematica
    Table[d = Divisors[n]; Coefficient[Series[1/Product[1 - x^d[[i]], {i, Length[d]}], {x, 0, n}], x, n], {n, 100}] (* T. D. Noe, Jul 28 2011 *)
  • PARI
    a(n)=numbpartUsing(n, divisors(n));
    numbpartUsing(n, v, mx=#v)=if(n<1, return(n==0)); sum(i=1,mx, numbpartUsing(n-v[i],v,i)) \\ inefficient; Charles R Greathouse IV, Jun 21 2017
    
  • PARI
    A018818(n) = { my(p = Ser(1, 'x, 1+n)); fordiv(n, d, p /= (1 - 'x^d)); polcoef(p, n); }; \\ Antti Karttunen, Jan 23 2025, after Vladeta Jovovic
    

Formula

Coefficient of x^n in the expansion of 1/Product_{d|n} (1-x^d). - Vladeta Jovovic, Sep 28 2002
a(n) = 2 iff n is prime. - Juhani Heino, Aug 27 2009
a(n) = f(n,n,1), where f(n,m,k) = f(n,m,k+1) + f(n,m-k,k)*0^(n mod k) if k <= m, otherwise 0^m. - Reinhard Zumkeller, Dec 11 2009
Paul Erdős, Andrew M. Odlyzko, and the Editors of the AMM give bounds; see Bowman et al. - Charles R Greathouse IV, Dec 04 2012

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

Views

Author

Keywords

Comments

Also, a(n) = number of "non-squashing" partitions of 2n (or 2n+1), that is, partitions 2n = p_1 + p_2 + ... + p_k with 1 <= p_1 <= p_2 <= ... <= p_k and p_1 + p_2 + ... + p_i <= p_{i+1} for all 1 <= i < k [Hirschhorn and Sellers].
Row sums of A101566. - Paul Barry, Jan 03 2005
Equals infinite convolution product of [1,2,2,2,2,2,2,2,2] aerated A000079 - 1 times, i.e., [1,2,2,2,2,2,2,2,2] * [1,0,2,0,2,0,2,0,2] * [1,0,0,0,2,0,0,0,2]. - Mats Granvik and Gary W. Adamson, Aug 04 2009
Which can be further decomposed to the infinite convolution product of finally supported sequences, namely [1,1] aerated A000079 - 1 times with multiplicity A000027 + 1 times, i.e., [1,1] * [1,1] * [1,0,1] * [1,0,1] * [1,0,1] * ... (next terms are [1,0,0,0,1] 4 times, etc.). - Eitan Y. Levine, Jun 18 2023
Given A018819 = A000123 with repeats, polcoeff (1, 1, 2, 2, 4, 4, ...) * (1, 1, 1, ...) = (1, 2, 4, 6, 10, ...) = (1, 0, 2, 0, 4, 0, 6, ...) * (1, 2, 2, 2, ...). - Gary W. Adamson, Dec 16 2009
Let M = an infinite lower triangular matrix with (1, 2, 2, 2, ...) in every column shifted down twice. A000123 = lim_{n->infinity} M^n, the left-shifted vector considered as a sequence. Replacing (1, 2, 2, 2, ...) with (1, 3, 3, 3, ...) and following the same procedure, we obtain A171370: (1, 3, 6, 12, 18, 30, 42, 66, 84, 120, ...). - Gary W. Adamson, Dec 06 2009
First differences of the sequence are (1, 2, 2, 4, 4, 6, 6, 10, ...), A018819, i.e., the sequence itself with each term duplicated except for the first one (unless a 0 is prefixed before taking the first differences), as shown by the formula a(n) - a(n-1) = a(floor(n/2)), valid for all n including n = 0 if we let a(-1) = 0. - M. F. Hasler, Feb 19 2019
Sum over k <= n of number of partitions of k into powers of 2, A018819. - Peter Munn, Feb 21 2020

Examples

			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
		

References

  • 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).

Crossrefs

Cf. A000041, A002033, A002487, A002577, A005704-A005706, A023359, A040039, A100529. Partial sums and bisection of A018819.
A column of A072170. Row sums of A089177. Twice A033485.
Cf. A145515. - Alois P. Heinz, Apr 16 2009
Cf. A171370. - Gary W. Adamson, Dec 06 2009

Programs

  • Haskell
    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
    
  • Magma
    [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
    
  • Maple
    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
  • Mathematica
    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 *)
  • PARI
    {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 */
    
  • PARI
    {a(n) = if( n<1, n==0, a(n\2) + a(n-1))}; /* Michael Somos, Aug 25 2003 */
    
  • PARI
    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
    
  • PARI
    {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
    
  • Python
    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

Formula

a(n) = A018819(2*n).
a(n) = a(n-1) + a(floor(n/2)). For proof see A018819.
2 * a(n) = a(n+1) + a(n-1) if n is even. - Michael Somos, Jan 07 2011
G.f.: (1-x)^(-1) Product_{n>=0} (1 - x^(2^n))^(-1).
a(n) = Sum_{i=0..n} a(floor(i/2)) [O'Shea].
a(n) = (1/n)*Sum_{k=1..n} (A038712(k)+1)*a(n-k), n > 1, a(0)=1. - Vladeta Jovovic, Aug 22 2002
Conjecture: Limit_{n ->infinity} (log(n)*a(2n))/(n*a(n)) = c = 1.63... - Benoit Cloitre, Jan 26 2003 [The constant c is equal to 2*log(2) = 1.38629436... =A016627. - Vaclav Kotesovec, Aug 07 2019]
G.f. A(x) satisfies A(x^2) = ((1-x)/(1+x)) * A(x). - Michael Somos, Aug 25 2003
G.f.: Product_{k>=0} (1+x^(2^k))/(1-x^(2^k)) = (Product_{k>=0} (1+x^(2^k))^(k+1) )/(1-x) = Product_{k>=0} (1+x^(2^k))^(k+2). - Joerg Arndt, Apr 24 2005
From Philippe Flajolet, Sep 06 2008: (Start)
The asymptotic rate of growth is known precisely - see De Bruijn's paper. With p(n) the number of partitions of n into powers of two, the asymptotic formula of de Bruijn is: log(p(2*n)) = 1/(2*L2)*(log(n/log(n)))^2 + (1/2 + 1/L2 + LL2/L2)*log(n) - (1 + LL2/L2)*log(log(n)) + Phi(log(n/log(n))/L2), where L2=log(2), LL2=log(log(2)) and Phi(x) is a certain periodic function with period 1 and a tiny amplitude.
Numerically, Phi(x) appears to have a mean value around 0.66. An expansion up to O(1) term had been obtained earlier by Kurt Mahler. (End)
G.f.: exp( Sum_{n>=1} 2^A001511(n) * x^n/n ), where 2^A001511(n) is the highest power of 2 that divides 2*n. - Paul D. Hanna, Oct 30 2012
(n/2)*a(n) = Sum_{k = 0..n-1} (n-k)/A000265(n-k)*a(k). - Peter Bala, Mar 03 2019
Conjectures from Mikhail Kurkov, May 04 2025: (Start)
Sum_{k=0..n} a(2^m*k)*A106400(n-k) = A125790(m,2*n) for m >= 0, n >= 0.
Sum_{k=0..n} a(2^m*(2*k+1))*A106400(n-k) = A125790(m+1,2*n+1) for m >= 0, n >= 0.
More generally, if we define b(n,m,p,q) = Sum_{k=0..n} a(2^m*(2*p*k+2*q+1))*A106400(n-k) for m >= 0, p > 0, q >= 0, n >= 0, then it also looks like that we have b(n,m,p,q) = Sum_{k=0..m+1} A078121(m+1,k)*b(n,k,p/2,(q-1)/2), b(n,m,p,q) = Sum_{k=0..m+1} A078121(m+1,k)*b(n,k,p/2,q/2)*(-1)^(m+k+1) for m >= 0, p > 0, q >= 0, n >= 0. (End)
Conjecture: Sum_{i>=0} a(2^m*i + k)*x^i = f(k,x) / Product_{q>=0} (1 - x^(2^q)) for m > 0, 2^(m-1) <= k < 2^m where f(k,x) is g.f. for k-th row of A381810. - Mikhail Kurkov, May 17 2025

Extensions

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

A275870 Number of collapsible integer partitions of n.

Original entry on oeis.org

1, 2, 2, 4, 2, 7, 2, 10, 5, 9, 2, 34, 2, 11, 10, 36, 2, 64, 2, 60, 12, 15, 2, 320, 7, 17, 23, 94, 2, 297, 2, 202, 16, 21, 14, 1488, 2, 23, 18, 776, 2, 610, 2, 186, 148, 27, 2, 6978, 9, 319
Offset: 1

Views

Author

Gus Wiseman, Aug 11 2016

Keywords

Comments

If a collapse is a joining of some number of equal parts of an integer partition p, we say p is collapsible if by some sequence of collapses it can be reduced to a single part. An example of such a sequence of collapses is (32211111)->(332211)->(33222)->(6222)->(66)->(n) which shows that (32211111) is a collapsible partition of n=twelve.
One can show that if n is a power of a prime, then a partition of n is collapsible iff its parts are all divisors of n; so this sequence shares many terms with A145515 (number of partitions of k^n into powers of k) and A018818 (number of partitions of n into divisors of n).

Crossrefs

Programs

  • Mathematica
    repcaps[q_List]:=repcaps[q]=Union[{q},If[UnsameQ@@q,{},Union@@repcaps/@Union[Sort[Append[Drop[q,#],Plus@@Take[q,#]],Greater]&/@Select[Tuples[Range[Length[q]],2],And[Less@@#,SameQ@@Take[q,#]]&]]]];
    repenum[n_]:=Length[Select[IntegerPartitions[n],MemberQ[repcaps[#],{n}]&]];
    Table[repenum[n],{n,1,32}](* Gus Wiseman, Aug 11 2016 *)

Formula

a(2^n)=A002577(n+1).

A000447 a(n) = 1^2 + 3^2 + 5^2 + 7^2 + ... + (2*n-1)^2 = n*(4*n^2 - 1)/3.

Original entry on oeis.org

0, 1, 10, 35, 84, 165, 286, 455, 680, 969, 1330, 1771, 2300, 2925, 3654, 4495, 5456, 6545, 7770, 9139, 10660, 12341, 14190, 16215, 18424, 20825, 23426, 26235, 29260, 32509, 35990, 39711, 43680, 47905, 52394, 57155, 62196, 67525, 73150, 79079, 85320, 91881, 98770, 105995, 113564, 121485
Offset: 0

Views

Author

Keywords

Comments

4 times the variance of the area under an n-step random walk: e.g., with three steps, the area can be 9/2, 7/2, 3/2, 1/2, -1/2, -3/2, -7/2, or -9/2 each with probability 1/8, giving a variance of 35/4 or a(3)/4. - Henry Bottomley, Jul 14 2003
Number of standard tableaux of shape (2n-1,1,1,1) (n>=1). - Emeric Deutsch, May 30 2004
Also a(n) = (1/6)*(8*n^3-2*n), n>0: structured octagonal diamond numbers (vertex structure 9). Cf. A059722 = alternate vertex; A000447 = structured diamonds; and structured tetragonal anti-diamond numbers (vertex structure 9). Cf. A096000 = alternate vertex; A100188 = structured anti-diamonds. Cf. A100145 for more on structured numbers. - James A. Record (james.record(AT)gmail.com), Nov 07 2004
The n-th tetrahedral (or pyramidal) number is n(n+1)(n+2)/6. This sequence contains the tetrahedral numbers of A000292 obtained for n= 1,3,5,7,... (see A015219). - Valentin Bakoev, Mar 03 2009
Using three consecutive numbers u, v, w, (u+v+w)^3-(u^3+v^3+w^3) equals 18 times the numbers in this sequence. - J. M. Bergot, Aug 24 2011
This sequence is related to A070893 by A070893(2*n-1) = n*a(n)-sum(i=0..n-1, a(i)). - Bruno Berselli, Aug 26 2011
Number of integer solutions to 1-n <= x <= y <= z <= n-1. - Michael Somos, Dec 27 2011
Partial sums of A016754. - Reinhard Zumkeller, Apr 02 2012
Also the number of cubes in the n-th Haüy square pyramid. - Eric W. Weisstein, Sep 27 2017

Examples

			G.f. = x + 10*x^2 + 35*x^3 + 84*x^4 + 165*x^5 + 286*x^6 + 455*x^7 + 680*x^8 + ...
a(2) = 10 since (-1, -1, -1), (-1, -1, 0), (-1, -1, 1), (-1, 0, 0), (-1, 0, 1), (-1, 1, 1), (0, 0, 0), (0, 0, 1), (0, 1, 1), (1, 1, 1) are the 10 solutions (x, y, z) of -1 <= x <= y <= z <= 1.
a(0) = 0, which corresponds to the empty sum.
		

References

  • G. Chrystal, Textbook of Algebra, Vol. 1, A. & C. Black, 1886, Chap. XX, Sect. 10, Example 2.
  • F. E. Croxton and D. J. Cowden, Applied General Statistics. 2nd ed., Prentice-Hall, Englewood Cliffs, NJ, 1955, p. 742.
  • E. Deza and M. M. Deza, Figurate numbers, World Scientific Publishing (2012), page 140.
  • C. V. Durell, Advanced Algebra, Volume 1, G. Bell & Son, 1932, Exercise IIIe, No. 4.
  • L. B. W. Jolley, Summation of Series. 2nd ed., Dover, NY, 1961, p. 7.
  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 217.
  • 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).

Crossrefs

(1/12)*t*(n^3-n)+n for t = 2, 4, 6, ... gives A004006, A006527, A006003, A005900, A004068, A000578, A004126, A000447, A004188, A004466, A004467, A007588, A062025, A063521, A063522, A063523.
Column 1 in triangles A008956 and A008958.
A000447 is related to partitions of 2^n into powers of 2, as it is shown in the formula, example and cross-references of A002577. - Valentin Bakoev, Mar 03 2009

Programs

Formula

a(n) = binomial(2*n+1, 3) = A000292(2*n-1).
G.f.: x*(1+6*x+x^2)/(1-x)^4.
a(n) = -a(-n) for all n in Z.
a(n) = A000330(2*n)-4*A000330(n) = A000466(n)*n/3 = A000578(n)+A007290(n-2) = A000583(n)-2*A024196(n-1) = A035328(n)/3. - Henry Bottomley, Jul 14 2003
a(n+1) = (2*n+1)*(2*n+2)(2*n+3)/6. - Valentin Bakoev, Mar 03 2009
a(0)=0, a(1)=1, a(2)=10, a(3)=35, a(n)=4*a(n-1)-6*a(n-2)+4*a(n-3)-a(n-4). - Harvey P. Dale, May 25 2012
a(n) = v(n,n-1), where v(n,k) is the central factorial numbers of the first kind with odd indices. - Mircea Merca, Jan 25 2014
a(n) = A005917(n+1) - A100157(n+1), where A005917 are the rhombic dodecahedral numbers and A100157 are the structured rhombic dodecahedral numbers (vertex structure 9). - Peter M. Chema, Jan 09 2016
For any nonnegative integers m and n, 8*(n^3)*a(m) + 2*m*a(n) = a(2*m*n). - Ivan N. Ianakiev, Mar 04 2017
E.g.f.: exp(x)*x*(1 + 4*x + (4/3)*x^2). - Wolfdieter Lang, Mar 11 2017
a(n) = A002412(n) + A016061(n-1), for n>0. - Bruce J. Nicholson, Nov 12 2017
From Amiram Eldar, Jan 04 2022: (Start)
Sum_{n>=1} 1/a(n) = 6*log(2) - 3.
Sum_{n>=1} (-1)^(n+1)/a(n) = 3 - 3*log(2). (End)

Extensions

Chrystal and Durell references from R. K. Guy, Apr 02 2004

A300273 Sorted list of Heinz numbers of collapsible integer partitions.

Original entry on oeis.org

2, 3, 4, 5, 7, 8, 9, 11, 12, 13, 16, 17, 19, 23, 25, 27, 29, 31, 32, 36, 37, 40, 41, 43, 47, 48, 49, 53, 59, 61, 63, 64, 67, 71, 73, 79, 81, 83, 84, 89, 97, 101, 103, 107, 108, 109, 112, 113, 121, 125, 127, 128, 131, 137, 139, 144, 149, 151, 157, 163, 167, 169
Offset: 1

Views

Author

Gus Wiseman, Mar 01 2018

Keywords

Comments

A positive integer is in this sequence iff it can be reduced to a prime number by a sequence of collapses, where a collapse is a replacement of prime(n)^k with prime(n*k) in a number's prime factorization (k > 1).

Examples

			A sequence of collapses is 84 -> 63 -> 49 -> 19 corresponding to the sequence of partitions (4211) -> (422) -> (44) -> (8). Hence 84 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    repcaps[q_]:=Union[{q},If[SquareFreeQ[q],{},Union@@repcaps/@Union[Times[q/#,Prime[Plus@@primeMS[#]]]&/@Select[Rest[Divisors[q]],!PrimeQ[#]&&PrimePowerQ[#]&]]]];
    Select[Range[200],MemberQ[repcaps[#],_?PrimeQ]&]

A078121 Infinite lower triangular matrix, M, that satisfies [M^2](i,j) = M(i+1,j+1) for all i,j>=0 where [M^n](i,j) denotes the element at row i, column j, of the n-th power of matrix M, with M(0,k)=1 and M(k,k)=1 for all k>=0.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 4, 4, 1, 1, 10, 16, 8, 1, 1, 36, 84, 64, 16, 1, 1, 202, 656, 680, 256, 32, 1, 1, 1828, 8148, 10816, 5456, 1024, 64, 1, 1, 27338, 167568, 274856, 174336, 43680, 4096, 128, 1, 1, 692004, 5866452, 11622976, 8909648, 2794496, 349504, 16384, 256, 1
Offset: 0

Views

Author

Paul D. Hanna, Nov 18 2002

Keywords

Comments

M also satisfies: [M^(2k)](i,j) = [M^k](i+1,j+1) for all i,j,k>=0; thus [M^(2^n)](i,j) = M(i+n,j+n) for all n>=0.

Examples

			The square of the matrix is the same matrix excluding the first row and column:
  [1, 0, 0, 0, 0]^2 = [ 1, 0, 0, 0, 0]
  [1, 1, 0, 0, 0]     [ 2, 1, 0, 0, 0]
  [1, 2, 1, 0, 0]     [ 4, 4, 1, 0, 0]
  [1, 4, 4, 1, 0]     [10,16, 8, 1, 0]
  [1,10,16, 8, 1]     [36,84,64,16, 1]
		

Crossrefs

Programs

  • Maple
    M:= proc(i, j) option remember; `if`(j=0 or i=j, 1,
           add(M(i-1, k)*M(k, j-1), k=0..i-1))
        end:
    seq(seq(M(n,k), k=0..n), n=0..10);  # Alois P. Heinz, Feb 27 2015
  • Mathematica
    rows = 10; M[k_] := Table[ Which[j == 1, 1, i == j, 1, 1 < j < i, m[i, j], True, 0], {i, 1, k}, {j, 1, k}]; m2[i_, j_] := m[i+1, j+1]; M2[k_] := Table[ Which[jJean-François Alcover, Feb 27 2015 *)
    M[i_, j_] := M[i, j] = If[j == 0 || i == j, 1, Sum[M[i-1, k]*M[k, j-1], {k, 0, i-1}]]; Table[Table[M[n, k], {k, 0, n}], {n, 0, 10}] // Flatten (* Jean-François Alcover, Feb 27 2015, after Alois P. Heinz *)
  • PARI
    rows_upto(n) = my(A, v1); v1 = vector(n+1, i, vector(i, j, 0)); v1[1][1] = 1; for(i=1, n, v1[i+1][1] = 1; v1[i+1][i+1] = 1); for(i=2, n, for(j=1, i-1, A = (i+j+1)%2; v1[i+1][j+1] = 2*sum(k=0, (i-j-1)\2, v1[i-j+1][2*k+A+1]*v1[j+2*k+A+1][j]))); v1 \\ Mikhail Kurkov, Aug 27 2025

Formula

M(1,j) = A002577(j) (partitions of 2^j into powers of 2), M(j+1,j) = 2^j, M(j+2,j) = 4^j, M(j+3,j) = A016131(j).
M(n,k) = the coefficient of x^(2^n - 2^(n-k)) in the power series expansion of 1/Product_{j=0..n-k} (1-x^(2^j)) whenever 0<=k0 (conjecture).
M(n,k) = Sum_{j=0..n-k-1} M(n-k,j)*M(k+j,k-1)*(1+(-1)^(n+k+j+1)) for 0 < k < n with M(n,0) = M(n,n) = 1. - Mikhail Kurkov, Jun 01 2025
From Mikhail Kurkov, Jul 01 2025: (Start)
Conjecture 1: let R(n,x) be the n-th row polynomial, then R(n,x) = x*R(n-1,x) + Sum_{k=1..n-1} M(n-1,k-1)*R(k,x)*(-1)^(n+k+1) = R(n-1,x) + x*Sum_{k=1..n-1} (M(n-1,k) - M(n-2,k))*R(k,x) for n > 1 with R(0,x) = 1, R(1,x) = x + 1.
Conjecture 2: M(n+m,n) ~ 2^(m*(2*n+m-1)/2)/m! as n -> oo. More generally, it also looks like that M(n+m,n) for m > 0 can be represented as (Sum_{j=0..flooor((m-1)/2)} 2^((m-2*j)*(2*(n-j)+m-1)/2)*P(m,j)*(-1)^j)/m! where P(m,j) are some positive integer coefficients. (End)

A381453 Number of multisets that can be obtained by choosing a constant integer partition of each prime index of n and taking the multiset union.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 3, 1, 3, 2, 2, 2, 4, 3, 4, 1, 2, 3, 4, 2, 6, 2, 3, 2, 3, 4, 4, 3, 4, 4, 2, 1, 4, 2, 6, 3, 6, 4, 8, 2, 2, 6, 4, 2, 6, 3, 4, 2, 6, 3, 4, 4, 5, 4, 4, 3, 8, 4, 2, 4, 6, 2, 8, 1, 8, 4, 2, 2, 6, 6, 6, 3, 4, 6, 6, 4, 6, 8, 4, 2, 5, 2, 2, 6, 4, 4, 8
Offset: 1

Views

Author

Gus Wiseman, Mar 08 2025

Keywords

Comments

First differs from A355733 and A355735 at a(21) = 6, A355733(21) = A355735(21) = 5.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
A multiset partition can be regarded as an arrow in the ranked poset of integer partitions. For example, we have {{1},{1,2},{1,3},{1,2,3}}: {1,1,1,1,2,2,3,3} -> {1,3,4,6}, or (33221111) -> (6431) (depending on notation).
Multisets of constant multisets are generally not transitive. For example, we have arrows: {{1,1},{2}}: {1,1,2} -> {2,2} and {{2,2}}: {2,2} -> {4}, but there is no multiset of constant multisets {1,1,2} -> {4}.

Examples

			The a(21) = 6 multisets are: {2,4}, {1,1,4}, {2,2,2}, {1,1,2,2}, {2,1,1,1,1}, {1,1,1,1,1,1}.
The a(n) partitions for n = 1, 3, 7, 13, 53, 21 (G = 16):
  ()  (2)   (4)     (6)       (G)                 (42)
      (11)  (22)    (33)      (88)                (411)
            (1111)  (222)     (4444)              (222)
                    (111111)  (22222222)          (2211)
                              (1111111111111111)  (21111)
                                                  (111111)
		

Crossrefs

Positions of 1 are A000079.
The strict case is A008966.
Before sorting we had A355731.
Choosing divisors instead of constant multisets gives A355733.
The upper version is A381455, before taking sums A000688.
Multiset partitions of prime indices:
- For multiset partitions (A001055) see A317141 (upper), A300383 (lower).
- For strict multiset partitions (A045778) see A381452.
- For set multipartitions (A050320) see A381078 (upper), A381454 (lower).
- For set systems (A050326, zeros A293243) see A381441 (upper).
- For sets of constant multisets (A050361) see A381715.
- For strict multiset partitions with distinct sums (A321469) see A381637.
- For set systems with distinct sums (A381633, zeros A381806) see A381634.
- For sets of constant multisets with distinct sums (A381635, zeros A381636) see A381716.
More on multiset partitions into constant blocks: A006171, A279784, A295935.
A000041 counts integer partitions, strict A000009.
A000040 lists the primes.
A003963 gives product of prime indices.
A055396 gives least prime index, greatest A061395.
A056239 adds up prime indices, row sums of A112798.
A122111 represents conjugation in terms of Heinz numbers.
A265947 counts refinement-ordered pairs of integer partitions.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Length[Union[Sort/@Join@@@Tuples[Select[IntegerPartitions[#],SameQ@@#&]&/@prix[n]]]],{n,nn}]

Formula

a(A002110(n)) = A381807(n).

A381455 Number of multisets that can be obtained by taking the sum of each block of a multiset partition of the prime indices of n into a multiset of constant multisets.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 2, 1, 1, 1, 5, 1, 2, 1, 2, 1, 1, 1, 3, 2, 1, 3, 2, 1, 1, 1, 7, 1, 1, 1, 4, 1, 1, 1, 3, 1, 1, 1, 2, 2, 1, 1, 5, 2, 2, 1, 2, 1, 3, 1, 3, 1, 1, 1, 2, 1, 1, 2, 11, 1, 1, 1, 2, 1, 1, 1, 6, 1, 1, 2, 2, 1, 1, 1, 5, 5, 1, 1, 2, 1, 1, 1
Offset: 1

Views

Author

Gus Wiseman, Mar 06 2025

Keywords

Comments

First differs from A000688 at a(144) = 9, A000688(144) = 10.
First differs from A295879 at a(128) = 15, A295879(128) = 13.
Also the number of multisets that can be obtained by taking the sums of prime indices of each factor in a factorization of n into prime powers > 1.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
A multiset partition can be regarded as an arrow in the ranked poset of integer partitions. For example, we have {{1},{1,2},{1,3},{1,2,3}}: {1,1,1,1,2,2,3,3} -> {1,3,4,6}, or (33221111) -> (6431) (depending on notation).
Multisets of constant multisets are generally not transitive. For example, we have arrows: {{1,1},{2}}: {1,1,2} -> {2,2} and {{2,2}}: {2,2} -> {4}, but there is no multiset of constant multisets {1,1,2} -> {4}.

Examples

			The prime indices of 36 are {1,1,2,2}, with the following 4 partitions into a multiset of constant multisets:
  {{1,1},{2,2}}
  {{1},{1},{2,2}}
  {{2},{2},{1,1}}
  {{1},{1},{2},{2}}
with block-sums: {2,4}, {1,1,4}, {2,2,2}, {1,1,2,2}, which are all different, so a(36) = 4.
The prime indices of 144 are {1,1,1,1,2,2}, with the following 10 partitions into a multiset of constant multisets:
  {{2,2},{1,1,1,1}}
  {{1},{2,2},{1,1,1}}
  {{2},{2},{1,1,1,1}}
  {{1,1},{1,1},{2,2}}
  {{1},{1},{1,1},{2,2}}
  {{1},{2},{2},{1,1,1}}
  {{2},{2},{1,1},{1,1}}
  {{1},{1},{1},{1},{2,2}}
  {{1},{1},{2},{2},{1,1}}
  {{1},{1},{1},{1},{2},{2}}
with block-sums: {4,4}, {1,3,4}, {2,2,4}, {2,2,4}, {1,1,2,4}, {1,2,2,3}, {2,2,2,2}, {1,1,1,1,4}, {1,1,2,2,2}, {1,1,1,1,2,2}, of which 9 are distinct, so a(144) = 9.
The a(n) partitions for n = 4, 8, 16, 32, 36, 64, 72, 128:
  (2)   (3)    (4)     (5)      (42)    (6)       (43)     (7)
  (11)  (21)   (22)    (32)     (222)   (33)      (322)    (43)
        (111)  (31)    (41)     (411)   (42)      (421)    (52)
               (211)   (221)    (2211)  (51)      (2221)   (61)
               (1111)  (311)            (222)     (4111)   (322)
                       (2111)           (321)     (22111)  (331)
                       (11111)          (411)              (421)
                                        (2211)             (511)
                                        (3111)             (2221)
                                        (21111)            (3211)
                                        (111111)           (4111)
                                                           (22111)
                                                           (31111)
                                                           (211111)
                                                           (1111111)
		

Crossrefs

Before taking sums we had A000688.
Positions of 1 are A005117.
There is a chain from the prime indices of n to a singleton iff n belongs to A300273.
The lower version is A381453.
For distinct blocks we have A381715, before sum A050361.
For distinct block-sums we have A381716, before sums A381635 (zeros A381636).
Other multiset partitions of prime indices:
- For multiset partitions (A001055) see A317141 (upper), A300383 (lower).
- For strict multiset partitions (A045778) see A381452.
- For set multipartitions (A050320) see A381078 (upper), A381454 (lower).
- For set systems (A050326) see A381441 (upper).
- For strict multiset partitions with distinct sums (A321469) see A381637.
- For set systems with distinct sums (A381633) see A381634, A293243.
More on multiset partitions into constant blocks: A006171, A279784, A295935.
A000041 counts integer partitions, strict A000009.
A000040 lists the primes.
A003963 gives product of prime indices.
A055396 gives least prime index, greatest A061395.
A056239 adds up prime indices, row sums of A112798.
A122111 represents conjugation in terms of Heinz numbers.
A265947 counts refinement-ordered pairs of integer partitions.

Programs

  • Mathematica
    hwt[n_]:=Total[Cases[FactorInteger[n],{p_,k_}:>PrimePi[p]*k]];
    sqfacs[n_]:=If[n<=1,{{}},Join@@Table[(Prepend[#,d]&)/@Select[sqfacs[n/d],Min@@#>=d&],{d,Select[Rest[Divisors[n]],PrimePowerQ]}]];
    Table[Length[Union[Sort[hwt/@#]&/@sqfacs[n]]],{n,100}]

Formula

a(s) = 1 for any squarefree number s.
a(p^k) = A000041(k) for any prime p.

A145515 Square array A(n,k), n>=0, k>=0, read by antidiagonals: A(n,k) is the number of partitions of k^n into powers of k.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 4, 1, 1, 1, 2, 5, 10, 1, 1, 1, 2, 6, 23, 36, 1, 1, 1, 2, 7, 46, 239, 202, 1, 1, 1, 2, 8, 82, 1086, 5828, 1828, 1, 1, 1, 2, 9, 134, 3707, 79326, 342383, 27338, 1, 1, 1, 2, 10, 205, 10340, 642457, 18583582, 50110484, 692004, 1, 1, 1, 2, 11, 298, 24901, 3649346, 446020582, 14481808030, 18757984046, 30251722, 1, 1
Offset: 0

Views

Author

Alois P. Heinz, Oct 11 2008

Keywords

Examples

			A(2,3) = 5, because there are 5 partitions of 3^2=9 into powers of 3: [1,1,1,1,1,1,1,1,1], [1,1,1,1,1,1,3], [1,1,1,3,3], [3,3,3], [9].
Square array A(n,k) begins:
  1,  1,   1,    1,     1,      1,  ...
  1,  1,   2,    2,     2,      2,  ...
  1,  1,   4,    5,     6,      7,  ...
  1,  1,  10,   23,    46,     82,  ...
  1,  1,  36,  239,  1086,   3707,  ...
  1,  1, 202, 5828, 79326, 642457,  ...
		

Crossrefs

Row n=3 gives: A189890(k+1).
Main diagonal gives: A145514.
Cf. A007318.

Programs

  • Maple
    b:= proc(n, j, k) local nn;
          nn:= n+1;
          if n<0  then 0
        elif j=0  or n=0 or k<=1 then 1
        elif j=1  then nn
        elif n>=j then (nn-j) *binomial(nn, j) *add(binomial(j, h)
                       /(nn-j+h) *b(j-h-1, j, k) *(-1)^h, h=0..j-1)
                  else b(n, j, k):= b(n-1, j, k) +b(k*n, j-1, k)
          fi
        end:
    A:= (n, k)-> b(1, n, k):
    seq(seq(A(n, d-n), n=0..d), d=0..13);
  • Mathematica
    b[n_, j_, k_] := Module[{nn = n+1}, Which[n < 0, 0, j == 0 || n == 0 || k <= 1, 1, j == 1, nn, n >= j, (nn-j)*Binomial[nn, j]*Sum[Binomial[j, h]/(nn-j+h)* b[j-h-1, j, k]*(-1)^h, {h, 0, j-1}], True, b[n, j, k] = b[n-1, j, k] + b[k*n, j-1, k] ] ]; a[n_, k_] := b[1, n, k]; Table[Table[a[n, d-n], {n, 0, d}], {d, 0, 13}] // Flatten (* Jean-François Alcover, Dec 12 2013, translated from Maple *)

Formula

See program.
For k>1: A(n,k) = [x^(k^n)] 1/Product_{j>=0} (1-x^(k^j)).

Extensions

Edited by Alois P. Heinz, Jan 12 2011
Showing 1-10 of 41 results. Next