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.

Previous Showing 11-20 of 45 results. Next

A000041 a(n) is the number of partitions of n (the partition numbers).

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 11, 15, 22, 30, 42, 56, 77, 101, 135, 176, 231, 297, 385, 490, 627, 792, 1002, 1255, 1575, 1958, 2436, 3010, 3718, 4565, 5604, 6842, 8349, 10143, 12310, 14883, 17977, 21637, 26015, 31185, 37338, 44583, 53174, 63261, 75175, 89134, 105558, 124754, 147273, 173525
Offset: 0

Views

Author

Keywords

Comments

Also number of nonnegative solutions to b + 2c + 3d + 4e + ... = n and the number of nonnegative solutions to 2c + 3d + 4e + ... <= n. - Henry Bottomley, Apr 17 2001
a(n) is also the number of conjugacy classes in the symmetric group S_n (and the number of irreducible representations of S_n).
Also the number of rooted trees with n+1 nodes and height at most 2.
Coincides with the sequence of numbers of nilpotent conjugacy classes in the Lie algebras gl(n). A006950, A015128 and this sequence together cover the nilpotent conjugacy classes in the classical A,B,C,D series of Lie algebras. - Alexander Elashvili, Sep 08 2003
Number of distinct Abelian groups of order p^n, where p is prime (the number is independent of p). - Lekraj Beedassy, Oct 16 2004
Number of graphs on n vertices that do not contain P3 as an induced subgraph. - Washington Bomfim, May 10 2005
Numbers of terms to be added when expanding the n-th derivative of 1/f(x). - Thomas Baruchel, Nov 07 2005
Sequence agrees with expansion of Molien series for symmetric group S_n up to the term in x^n. - Maurice D. Craig (towenaar(AT)optusnet.com.au), Oct 30 2006
Also the number of nonnegative integer solutions to x_1 + x_2 + x_3 + ... + x_n = n such that n >= x_1 >= x_2 >= x_3 >= ... >= x_n >= 0, because by letting y_k = x_k - x_(k+1) >= 0 (where 0 < k < n) we get y_1 + 2y_2 + 3y_3 + ... + (n-1)y_(n-1) + nx_n = n. - Werner Grundlingh (wgrundlingh(AT)gmail.com), Mar 14 2007
Let P(z) := Sum_{j>=0} b_j z^j, b_0 != 0. Then 1/P(z) = Sum_{j>=0} c_j z^j, where the c_j must be computed from the infinite triangular system b_0 c_0 = 1, b_0 c_1 + b_1 c_0 = 0 and so on (Cauchy products of the coefficients set to zero). The n-th partition number arises as the number of terms in the numerator of the expression for c_n: The coefficient c_n of the inverted power series is a fraction with b_0^(n+1) in the denominator and in its numerator having a(n) products of n coefficients b_i each. The partitions may be read off from the indices of the b_i. - Peter C. Heinig (algorithms(AT)gmx.de), Apr 09 2007
A sequence of positive integers p = p_1 ... p_k is a descending partition of the positive integer n if p_1 + ... + p_k = n and p_1 >= ... >= p_k. If formally needed p_j = 0 is appended to p for j > k. Let P_n denote the set of these partition for some n >= 1. Then a(n) = 1 + Sum_{p in P_n} floor((p_1-1)/(p_2+1)). (Cf. A000065, where the formula reduces to the sum.) Proof in Kelleher and O'Sullivan (2009). For example a(6) = 1 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 1 + 1 + 2 + 5 = 11. - Peter Luschny, Oct 24 2010
Let n = Sum( k_(p_m) p_m ) = k_1 + 2k_2 + 5k_5 + 7k_7 + ..., where p_m is the m-th generalized pentagonal number (A001318). Then a(n) is the sum over all such pentagonal partitions of n of (-1)^(k_5+k_7 + k_22 + ...) ( k_1 + k_2 + k_5 + ...)! /( k_1! k_2! k_5! ...), where the exponent of (-1) is the sum of all the k's corresponding to even-indexed GPN's. - Jerome Malenfant, Feb 14 2011
From Jerome Malenfant, Feb 14 2011: (Start)
The matrix of a(n) values
a(0)
a(1) a(0)
a(2) a(1) a(0)
a(3) a(2) a(1) a(0)
....
a(n) a(n-1) a(n-2) ... a(0)
is the inverse of the matrix
1
-1 1
-1 -1 1
0 -1 -1 1
....
-d_n -d_(n-1) -d_(n-2) ... -d_1 1
where d_q = (-1)^(m+1) if q = m(3m-1)/2 = the m-th generalized pentagonal number (A001318), = 0 otherwise. (End)
Let k > 0 be an integer, and let i_1, i_2, ..., i_k be distinct integers such that 1 <= i_1 < i_2 < ... < i_k. Then, equivalently, a(n) equals the number of partitions of N = n + i_1 + i_2 + ... + i_k in which each i_j (1 <= j <= k) appears as a part at least once. To see this, note that the partitions of N of this class must be in 1-to-1 correspondence with the partitions of n, since N - i_1 - i_2 - ... - i_k = n. - L. Edson Jeffery, Apr 16 2011
a(n) is the number of distinct degree sequences over all free trees having n + 2 nodes. Take a partition of the integer n, add 1 to each part and append as many 1's as needed so that the total is 2n + 2. Now we have a degree sequence of a tree with n + 2 nodes. Example: The partition 3 + 2 + 1 = 6 corresponds to the degree sequence {4, 3, 2, 1, 1, 1, 1, 1} of a tree with 8 vertices. - Geoffrey Critzer, Apr 16 2011
a(n) is number of distinct characteristic polynomials among n! of permutations matrices size n X n. - Artur Jasinski, Oct 24 2011
Conjecture: starting with offset 1 represents the numbers of ordered compositions of n using the signed (++--++...) terms of A001318 starting (1, 2, -5, -7, 12, 15, ...). - Gary W. Adamson, Apr 04 2013 (this is true by the pentagonal number theorem, Joerg Arndt, Apr 08 2013)
a(n) is also number of terms in expansion of the n-th derivative of log(f(x)). In Mathematica notation: Table[Length[Together[f[x]^n * D[Log[f[x]], {x, n}]]], {n, 1, 20}]. - Vaclav Kotesovec, Jun 21 2013
Conjecture: No a(n) has the form x^m with m > 1 and x > 1. - Zhi-Wei Sun, Dec 02 2013
Partitions of n that contain a part p are the partitions of n - p. Thus, number of partitions of m*n - r that include k*n as a part is A000041(h*n-r), where h = m - k >= 0, n >= 2, 0 <= r < n; see A111295 as an example. - Clark Kimberling, Mar 03 2014
a(n) is the number of compositions of n into positive parts avoiding the pattern [1, 2]. - Bob Selcoe, Jul 08 2014
Conjecture: For any j there exists k such that all primes p <= A000040(j) are factors of one or more a(n) <= a(k). Growth of this coverage is slow and irregular. k = 1067 covers the first 102 primes, thus slower than A000027. - Richard R. Forberg, Dec 08 2014
a(n) is the number of nilpotent conjugacy classes in the order-preserving, order-decreasing and (order-preserving and order-decreasing) injective transformation semigroups. - Ugbene Ifeanyichukwu, Jun 03 2015
Define a segmented partition a(n,k, ) to be a partition of n with exactly k parts, with s(j) parts t(j) identical to each other and distinct from all the other parts. Note that n >= k, j <= k, 0 <= s(j) <= k, s(1)t(1) + ... + s(j)t(j) = n and s(1) + ... + s(j) = k. Then there are up to a(k) segmented partitions of n with exactly k parts. - Gregory L. Simay, Nov 08 2015
(End)
From Gregory L. Simay, Nov 09 2015: (Start)
The polynomials for a(n, k, ) have degree j-1.
a(n, k, ) = 1 if n = 0 mod k, = 0 otherwise
a(rn, rk, ) = a(n, k, )
a(n odd, k, ) = 0
Established results can be recast in terms of segmented partitions:
For j(j+1)/2 <= n < (j+1)(j+2)/2, A000009(n) = a(n, 1, <1>) + ... + a(n, j, ), j < n
a(n, k, ) = a(n - j(j-1)/2, k)
(End)
a(10^20) was computed using the NIST Arb package. It has 11140086260 digits and its head and tail sections are 18381765...88091448. See the Johansson 2015 link. - Stanislav Sykora, Feb 01 2016
Satisfies Benford's law [Anderson-Rolen-Stoehr, 2011]. - N. J. A. Sloane, Feb 08 2017
The partition function p(n) is log-concave for all n>25 [DeSalvo-Pak, 2014]. - Michel Marcus, Apr 30 2019
a(n) is also the dimension of the n-th cohomology of the infinite real Grassmannian with coefficients in Z/2. - Luuk Stehouwer, Jun 06 2021
Number of equivalence relations on n unlabeled nodes. - Lorenzo Sauras Altuzarra, Jun 13 2022
Equivalently, number of idempotent mappings f from a set X of n elements into itself (i.e., satisfying f o f = f) up to permutation (i.e., f~f' :<=> There is a permutation sigma in Sym(X) such that f' o sigma = sigma o f). - Philip Turecek, Apr 17 2023
Conjecture: Each integer n > 2 different from 6 can be written as a sum of finitely many numbers of the form a(k) + 2 (k > 0) with no summand dividing another. This has been verified for n <= 7140. - Zhi-Wei Sun, May 16 2023
a(n) is also the number of partitions of n*(n+3)/2 into n distinct parts. - David García Herrero, Aug 20 2024
a(n) is also the number of non-isomorphic sigma algebras on {1,...,n}. A000110(n) counts all sigma algebras on {1,...,n}. Every sigma algebra on a finite set X is exactly the collection of all unions of its atoms (its minimal nonempty members), and those atoms partition X. An isomorphism of sigma algebras must map atoms to atoms, so the isomorphism class of a sigma algebra is determined by the multiset of its atom-sizes, which is an integer partition of n. - Matthew Azar, Jul 18 2025

Examples

			a(5) = 7 because there are seven partitions of 5, namely: {1, 1, 1, 1, 1}, {2, 1, 1, 1}, {2, 2, 1}, {3, 1, 1}, {3, 2}, {4, 1}, {5}. - _Bob Selcoe_, Jul 08 2014
G.f. = 1 + x + 2*x^2 + 3*x^3 + 5*x^4 + 7*x^5 + 11*x^6 + 15*x^7 + 22*x^8 + ...
G.f. = 1/q + q^23 + 2*q^47 + 3*q^71 + 5*q^95 + 7*q^119 + 11*q^143 + 15*q^167 + ...
From _Gregory L. Simay_, Nov 08 2015: (Start)
There are up to a(4)=5 segmented partitions of the partitions of n with exactly 4 parts. They are a(n,4, <4>), a(n,4,<3,1>), a(n,4,<2,2>), a(n,4,<2,1,1>), a(n,4,<1,1,1,1>).
The partition 8,8,8,8 is counted in a(32,4,<4>).
The partition 9,9,9,5 is counted in a(32,4,<3,1>).
The partition 11,11,5,5 is counted in a(32,4,<2,2>).
The partition 13,13,5,1 is counted in a(32,4,<2,1,1>).
The partition 14,9,6,3 is counted in a(32,4,<1,1,1,1>).
a(n odd,4,<2,2>) = 0.
a(12, 6, <2,2,2>) = a(6,3,<1,1,1>) = a(6-3,3) = a(3,3) = 1. The lone partition is 3,3,2,2,1,1.
(End)
		

References

  • George E. Andrews, The Theory of Partitions, Addison-Wesley, Reading, Mass., 1976.
  • George E. Andrews and K. Ericksson, Integer Partitions, Cambridge University Press 2004.
  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 307.
  • R. Ayoub, An Introduction to the Analytic Theory of Numbers, Amer. Math. Soc., 1963; Chapter III.
  • Mohammad K. Azarian, A Generalization of the Climbing Stairs Problem, Mathematics and Computer Education Journal, Vol. 31, No. 1, pp. 24-28, Winter 1997.
  • Mohammad K. Azarian, A Generalization of the Climbing Stairs Problem II, Missouri Journal of Mathematical Sciences, Vol. 16, No. 1, Winter 2004, pp. 12-17. Zentralblatt MATH, Zbl 1071.05501.
  • Bruce C. Berndt, Ramanujan's Notebooks Part V, Springer-Verlag.
  • B. C. Berndt, Number Theory in the Spirit of Ramanujan, Chap. I Amer. Math. Soc. Providence RI 2006.
  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 999.
  • J. M. Borwein, D. H. Bailey and R. Girgensohn, Experimentation in Mathematics, A K Peters, Ltd., Natick, MA, 2004. x+357 pp. See p. 183.
  • Florian Cajori, A History of Mathematical Notations, Dover edition (2012), par. 411.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 94-96.
  • L. E. Dickson, History of the Theory of Numbers, Vol.II Chapter III pp. 101-164, Chelsea NY 1992.
  • N. J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 37, Eq. (22.13).
  • H. Gupta et al., Tables of Partitions. Royal Society Mathematical Tables, Vol. 4, Cambridge Univ. Press, 1958, p. 90.
  • G. H. Hardy and S. Ramanujan, Asymptotic formulas in combinatorial analysis, Proc. London Math. Soc., 17 (1918), 75-.
  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, pp. 83-100, 113-131.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers (Fifth edition), Oxford Univ. Press (Clarendon), 1979, 273-296.
  • D. E. Knuth, The Art of Computer Programming, vol. 4A, Combinatorial Algorithms, Section 7.2.1.4, p. 396.
  • D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Section XIV.1, p. 491.
  • S. Ramanujan, Collected Papers, Chap. 25, Cambridge Univ. Press 1927 (Proceedings of the Camb. Phil. Soc., 19 (1919), pp. 207-213).
  • S. Ramanujan, Collected Papers, Chap. 28, Cambridge Univ. Press 1927 (Proceedings of the London Math. Soc., 2, 18(1920)).
  • S. Ramanujan, Collected Papers, Chap. 30, Cambridge Univ. Press 1927 (Mathematische Zeitschrift, 9 (1921), pp. 147-163).
  • S. Ramanujan, Collected Papers, Ed. G. H. Hardy et al., Cambridge 1927; Chelsea, NY, 1962. See Table IV on page 308.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 122.
  • J. E. Roberts, Lure of the Integers, pp. 168-9 MAA 1992.
  • 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).
  • R. E. Tapscott and D. Marcovich, "Enumeration of Permutational Isomers: The Porphyrins", Journal of Chemical Education, 55 (1978), 446-447.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 286-289, 297-298, 303.
  • Robert M. Young, "Excursions in Calculus", Mathematical Association of America, p. 367.

Crossrefs

Partial sums give A000070.
For successive differences see A002865, A053445, A072380, A081094, A081095.
Antidiagonal sums of triangle A092905. a(n) = A054225(n,0).
Boustrophedon transforms: A000733, A000751.
Cf. A167376 (complement), A061260 (multisets), A000700 (self-conjug), A330644 (not self-conj).

Programs

  • GAP
    List([1..10],n->Size(OrbitsDomain(SymmetricGroup(IsPermGroup,n),SymmetricGroup(IsPermGroup,n),\^))); # Attila Egri-Nagy, Aug 15 2014
    
  • Haskell
    import Data.MemoCombinators (memo2, integral)
    a000041 n = a000041_list !! n
    a000041_list = map (p' 1) [0..] where
       p' = memo2 integral integral p
       p _ 0 = 1
       p k m = if m < k then 0 else p' k (m - k) + p' (k + 1) m
    -- Reinhard Zumkeller, Nov 03 2015, Nov 04 2013
    
  • Julia
    # DedekindEta is defined in A000594
    A000041List(len) = DedekindEta(len, -1)
    A000041List(50) |> println # Peter Luschny, Mar 09 2018
  • Magma
    a:= func< n | NumberOfPartitions(n) >; [ a(n) : n in [0..10]];
    
  • Maple
    A000041 := n -> combinat:-numbpart(n): [seq(A000041(n), n=0..50)]; # Warning: Maple 10 and 11 give incorrect answers in some cases: A110375.
    spec := [B, {B=Set(Set(Z,card>=1))}, unlabeled ];
    [seq(combstruct[count](spec, size=n), n=0..50)];
    with(combstruct):ZL0:=[S,{S=Set(Cycle(Z,card>0))}, unlabeled]: seq(count(ZL0,size=n),n=0..45); # Zerinvary Lajos, Sep 24 2007
    G:={P=Set(Set(Atom,card>0))}: combstruct[gfsolve](G,labeled,x); seq(combstruct[count]([P,G,unlabeled],size=i),i=0..45); # Zerinvary Lajos, Dec 16 2007
    # Using the function EULER from Transforms (see link at the bottom of the page).
    1,op(EULER([seq(1,n=1..49)])); # Peter Luschny, Aug 19 2020
  • Mathematica
    Table[ PartitionsP[n], {n, 0, 45}]
    a[ n_] := SeriesCoefficient[ q^(1/24) / DedekindEta[ Log[q] / (2 Pi I)], {q, 0, n}]; (* Michael Somos, Jul 11 2011 *)
    a[ n_] := SeriesCoefficient[ 1 / Product[ 1 - x^k, {k, n}], {x, 0, n}]; (* Michael Somos, Jul 11 2011 *)
    CoefficientList[1/QPochhammer[q] + O[q]^100, q] (* Jean-François Alcover, Nov 25 2015 *)
    a[0] := 1; a[n_] := a[n] = Block[{k=1, s=0, i=n-1}, While[i >= 0, s=s-(-1)^k (a[i]+a[i-k]); k=k+1; i=i-(3 k-2)]; s]; Map[a, Range[0, 49]] (* Oliver Seipel, Jun 01 2024 after Euler *)
  • Maxima
    num_partitions(60,list); /* Emanuele Munarini, Feb 24 2014 */
    
  • MuPAD
    combinat::partitions::count(i) $i=0..54 // Zerinvary Lajos, Apr 16 2007
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( 1 / eta(x + x * O(x^n)), n))};
    
  • PARI
    /* The Hardy-Ramanujan-Rademacher exact formula in PARI is as follows (this is no longer necessary since it is now built in to the numbpart command): */
    Psi(n, q) = local(a, b, c); a=sqrt(2/3)*Pi/q; b=n-1/24; c=sqrt(b); (sqrt(q)/(2*sqrt(2)*b*Pi))*(a*cosh(a*c)-(sinh(a*c)/c))
    L(n, q) = if(q==1,1,sum(h=1,q-1,if(gcd(h,q)>1,0,cos((g(h,q)-2*h*n)*Pi/q))))
    g(h, q) = if(q<3,0,sum(k=1,q-1,k*(frac(h*k/q)-1/2)))
    part(n) = round(sum(q=1,max(5,0.5*sqrt(n)),L(n,q)*Psi(n,q)))
    /* Ralf Stephan, Nov 30 2002, fixed by Vaclav Kotesovec, Apr 09 2018 */
    
  • PARI
    {a(n) = numbpart(n)};
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( sum( k=1, sqrtint(n), x^k^2 / prod( i=1, k, 1 - x^i, 1 + x * O(x^n))^2, 1), n))};
    
  • PARI
    f(n)= my(v,i,k,s,t);v=vector(n,k,0);v[n]=2;t=0;while(v[1]1,i--;s+=i*(v[i]=(n-s)\i));t++);t \\ Thomas Baruchel, Nov 07 2005
    
  • PARI
    a(n)=if(n<0, 0, polcoeff(exp(sum(k=1, n, x^k/(1-x^k)/k, x*O(x^n))), n)) \\ Joerg Arndt, Apr 16 2010
    
  • Perl
    use ntheory ":all"; my @p = map { partitions($) } 0..100; say "[@p]"; # _Dana Jacobsen, Sep 06 2015
    
  • Python
    from sympy.functions.combinatorial.numbers import partition
    print([partition(i) for i in range(101)]) # Joan Ludevid, May 25 2025
    
  • Racket
    #lang racket
    ; SUM(k,-inf,+inf) (-1)^k p(n-k(3k-1)/2)
    ; For k outside the range (1-(sqrt(1-24n))/6 to (1+sqrt(1-24n))/6) argument n-k(3k-1)/2 < 0.
    ; Therefore the loops below are finite. The hash avoids repeated identical computations.
    (define (p n) ; Nr of partitions of n.
    (hash-ref h n
      (λ ()
       (define r
        (+
         (let loop ((k 1) (n (sub1 n)) (s 0))
          (if (< n 0) s
           (loop (add1 k) (- n (* 3 k) 1) (if (odd? k) (+ s (p n)) (- s (p n))))))
         (let loop ((k -1) (n (- n 2)) (s 0))
          (if (< n 0) s
           (loop (sub1 k) (+ n (* 3 k) -2) (if (odd? k) (+ s (p n)) (- s (p n))))))))
       (hash-set! h n r)
       r)))
    (define h (make-hash '((0 . 1))))
    ; (for ((k (in-range 0 50))) (printf "~s, " (p k))) runs in a moment.
    ; Jos Koot, Jun 01 2016
    
  • Sage
    [number_of_partitions(n) for n in range(46)]  # Zerinvary Lajos, May 24 2009
    
  • Sage
    @CachedFunction
    def A000041(n):
        if n == 0: return 1
        S = 0; J = n-1; k = 2
        while 0 <= J:
            T = A000041(J)
            S = S+T if is_odd(k//2) else S-T
            J -= k if is_odd(k) else k//2
            k += 1
        return S
    [A000041(n) for n in range(50)]  # Peter Luschny, Oct 13 2012
    
  • Sage
    # uses[EulerTransform from A166861]
    a = BinaryRecurrenceSequence(1, 0)
    b = EulerTransform(a)
    print([b(n) for n in range(50)]) # Peter Luschny, Nov 11 2020
    

Formula

G.f.: Product_{k>0} 1/(1-x^k) = Sum_{k>= 0} x^k Product_{i = 1..k} 1/(1-x^i) = 1 + Sum_{k>0} x^(k^2)/(Product_{i = 1..k} (1-x^i))^2.
G.f.: 1 + Sum_{n>=1} x^n/(Product_{k>=n} 1-x^k). - Joerg Arndt, Jan 29 2011
a(n) - a(n-1) - a(n-2) + a(n-5) + a(n-7) - a(n-12) - a(n-15) + ... = 0, where the sum is over n-k and k is a generalized pentagonal number (A001318) <= n and the sign of the k-th term is (-1)^([(k+1)/2]). See A001318 for a good way to remember this!
a(n) = (1/n) * Sum_{k=0..n-1} sigma(n-k)*a(k), where sigma(k) is the sum of divisors of k (A000203).
a(n) ~ 1/(4*n*sqrt(3)) * e^(Pi * sqrt(2n/3)) as n -> infinity (Hardy and Ramanujan). See A050811.
a(n) = a(0)*b(n) + a(1)*b(n-2) + a(2)*b(n-4) + ... where b = A000009.
From Jon E. Schoenfield, Aug 17 2014: (Start)
It appears that the above approximation from Hardy and Ramanujan can be refined as
a(n) ~ 1/(4*n*sqrt(3)) * e^(Pi * sqrt(2n/3 + c0 + c1/n^(1/2) + c2/n + c3/n^(3/2) + c4/n^2 + ...)), where the coefficients c0 through c4 are approximately
c0 = -0.230420145062453320665537
c1 = -0.0178416569128570889793
c2 = 0.0051329911273
c3 = -0.0011129404
c4 = 0.0009573,
as n -> infinity. (End)
From Vaclav Kotesovec, May 29 2016 (c4 added Nov 07 2016): (Start)
c0 = -0.230420145062453320665536704197233... = -1/36 - 2/Pi^2
c1 = -0.017841656912857088979502135349949... = 1/(6*sqrt(6)*Pi) - sqrt(3/2)/Pi^3
c2 = 0.005132991127342167594576391633559... = 1/(2*Pi^4)
c3 = -0.001112940489559760908236602843497... = 3*sqrt(3/2)/(4*Pi^5) - 5/(16*sqrt(6)*Pi^3)
c4 = 0.000957343284806972958968694349196... = 1/(576*Pi^2) - 1/(24*Pi^4) + 93/(80*Pi^6)
a(n) ~ exp(Pi*sqrt(2*n/3))/(4*sqrt(3)*n) * (1 - (sqrt(3/2)/Pi + Pi/(24*sqrt(6)))/sqrt(n) + (1/16 + Pi^2/6912)/n).
a(n) ~ exp(Pi*sqrt(2*n/3) - (sqrt(3/2)/Pi + Pi/(24*sqrt(6)))/sqrt(n) + (1/24 - 3/(4*Pi^2))/n) / (4*sqrt(3)*n).
(End)
a(n) < exp( (2/3)^(1/2) Pi sqrt(n) ) (Ayoub, p. 197).
G.f.: Product_{m>=1} (1+x^m)^A001511(m). - Vladeta Jovovic, Mar 26 2004
a(n) = Sum_{i=0..n-1} P(i, n-i), where P(x, y) is the number of partitions of x into at most y parts and P(0, y)=1. - Jon Perry, Jun 16 2003
G.f.: Product_{i>=1} Product_{j>=0} (1+x^((2i-1)*2^j))^(j+1). - Jon Perry, Jun 06 2004
G.f. e^(Sum_{k>0} (x^k/(1-x^k)/k)). - Franklin T. Adams-Watters, Feb 08 2006
a(n) = A114099(9*n). - Reinhard Zumkeller, Feb 15 2006
Euler transform of all 1's sequence (A000012). Weighout transform of A001511. - Franklin T. Adams-Watters, Mar 15 2006
a(n) = A027187(n) + A027193(n) = A000701(n) + A046682(n). - Reinhard Zumkeller, Apr 22 2006
A026820(a(n),n) = A134737(n) for n > 0. - Reinhard Zumkeller, Nov 07 2007
Convolved with A152537 gives A000079, powers of 2. - Gary W. Adamson, Dec 06 2008
a(n) = A026820(n, n); a(n) = A108949(n) + A045931(n) + A108950(n) = A130780(n) + A171966(n) - A045931(n) = A045931(n) + A171967(n). - Reinhard Zumkeller, Jan 21 2010
a(n) = Tr(n)/(24*n-1) = A183011(n)/A183010(n), n>=1. See the Bruinier-Ono paper in the Links. - Omar E. Pol, Jan 23 2011
From Jerome Malenfant, Feb 14 2011: (Start)
a(n) = determinant of the n X n Toeplitz matrix:
1 -1
1 1 -1
0 1 1 -1
0 0 1 1 -1
-1 0 0 1 1 -1
. . .
d_n d_(n-1) d_(n-2)...1
where d_q = (-1)^(m+1) if q = m(3m-1)/2 = p_m, the m-th generalized pentagonal number (A001318), otherwise d_q = 0. Note that the 1's run along the diagonal and the -1's are on the superdiagonal. The (n-1) row (not written) would end with ... 1 -1. (End)
Empirical: let F*(x) = Sum_{n=0..infinity} p(n)*exp(-Pi*x*(n+1)), then F*(2/5) = 1/sqrt(5) to a precision of 13 digits.
F*(4/5) = 1/2+3/2/sqrt(5)-sqrt(1/2*(1+3/sqrt(5))) to a precision of 28 digits. These are the only values found for a/b when a/b is from F60, Farey fractions up to 60. The number for F*(4/5) is one of the real roots of 25*x^4 - 50*x^3 - 10*x^2 - 10*x + 1. Note here the exponent (n+1) compared to the standard notation with n starting at 0. - Simon Plouffe, Feb 23 2011
The constant (2^(7/8)*GAMMA(3/4))/(exp(Pi/6)*Pi^(1/4)) = 1.0000034873... when expanded in base exp(4*Pi) will give the first 52 terms of a(n), n>0, the precision needed is 300 decimal digits. - Simon Plouffe, Mar 02 2011
a(n) = A035363(2n). - Omar E. Pol, Nov 20 2009
G.f.: A(x)=1+x/(G(0)-x); G(k) = 1 + x - x^(k+1) - x*(1-x^(k+1))/G(k+1); (continued fraction Euler's kind, 1-step ). - Sergei N. Gladkovskii, Jan 25 2012
Convolution of A010815 with A000712. - Gary W. Adamson, Jul 20 2012
G.f.: 1 + x*(1 - G(0))/(1-x) where G(k) = 1 - 1/(1-x^(k+1))/(1-x/(x-1/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jan 22 2013
G.f.: Q(0) where Q(k) = 1 + x^(4*k+1)/( (x^(2*k+1)-1)^2 - x^(4*k+3)*(x^(2*k+1)-1)^2/( x^(4*k+3) + (x^(2*k+2)-1)^2/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Feb 16 2013
a(n) = 24*spt(n) + 12*N_2(n) - Tr(n) = 24*A092269(n) + 12*A220908(n) - A183011(n), n >= 1. - Omar E. Pol, Feb 17 2013
a(n) = A066186(n)/n, n >= 1. - Omar E. Pol, Aug 16 2013
From Peter Bala, Dec 23 2013: (Start)
a(n-1) = Sum_{parts k in all partitions of n} mu(k), where mu(k) is the arithmetical Möbius function (see A008683).
Let P(2,n) denote the set of partitions of n into parts k >= 2. Then a(n-2) = -Sum_{parts k in all partitions in P(2,n)} mu(k).
n*( a(n) - a(n-1) ) = Sum_{parts k in all partitions in P(2,n)} k (see A138880).
Let P(3,n) denote the set of partitions of n into parts k >= 3. Then
a(n-3) = (1/2)*Sum_{parts k in all partitions in P(3,n)} phi(k), where phi(k) is the Euler totient function (see A000010). Using this result and Mertens's theorem on the average order of the phi function, we can find an approximate 3-term recurrence for the partition function: a(n) ~ a(n-1) + a(n-2) + (Pi^2/(3*n) - 1)*a(n-3). For example, substituting the values a(47) = 124754, a(48) = 147273 and a(49) = 173525 into the recurrence gives the approximation a(50) ~ 204252.48... compared with the true value a(50) = 204226. (End)
a(n) = Sum_{k=1..n+1} (-1)^(n+1-k)*A000203(k)*A002040(n+1-k). - Mircea Merca, Feb 27 2014
a(n) = A240690(n) + A240690(n+1), n >= 1. - Omar E. Pol, Mar 16 2015
From Gary W. Adamson, Jun 22 2015: (Start)
A production matrix for the sequence with offset 1 is M, an infinite n x n matrix of the following form:
a, 1, 0, 0, 0, 0, ...
b, 0, 1, 0, 0, 0, ...
c, 0, 0, 1, 0, 0, ...
d, 0, 0, 0, 1, 0, ...
.
.
... such that (a, b, c, d, ...) is the signed version of A080995 with offset 1: (1,1,0,0,-1,0,-1,...)
and a(n) is the upper left term of M^n.
This operation is equivalent to the g.f. (1 + x + 2x^2 + 3x^3 + 5x^4 + ...) = 1/(1 - x - x^2 + x^5 + x^7 - x^12 - x^15 + x^22 + ...). (End)
G.f.: x^(1/24)/eta(log(x)/(2 Pi i)). - Thomas Baruchel, Jan 09 2016, after Michael Somos (after Richard Dedekind).
a(n) = Sum_{k=-inf..+inf} (-1)^k a(n-k(3k-1)/2) with a(0)=1 and a(negative)=0. The sum can be restricted to the (finite) range from k = (1-sqrt(1-24n))/6 to (1+sqrt(1-24n))/6, since all terms outside this range are zero. - Jos Koot, Jun 01 2016
G.f.: (conjecture) (r(x) * r(x^2) * r(x^4) * r(x^8) * ...) where r(x) is A000009: (1, 1, 1, 2, 2, 3, 4, ...). - Gary W. Adamson, Sep 18 2016; Doron Zeilberger observed today that "This follows immediately from Euler's formula 1/(1-z) = (1+z)*(1+z^2)*(1+z^4)*(1+z^8)*..." Gary W. Adamson, Sep 20 2016
a(n) ~ 2*Pi * BesselI(3/2, sqrt(24*n-1)*Pi/6) / (24*n-1)^(3/4). - Vaclav Kotesovec, Jan 11 2017
G.f.: Product_{k>=1} (1 + x^k)/(1 - x^(2*k)). - Ilya Gutkovskiy, Jan 23 2018
a(n) = p(1, n) where p(k, n) = p(k+1, n) + p(k, n-k) if k < n, 1 if k = n, and 0 if k > n. p(k, n) is the number of partitions of n into parts >= k. - Lorraine Lee, Jan 28 2020
Sum_{n>=1} 1/a(n) = A078506. - Amiram Eldar, Nov 01 2020
Sum_{n>=0} a(n)/2^n = A065446. - Amiram Eldar, Jan 19 2021
From Simon Plouffe, Mar 12 2021: (Start)
Sum_{n>=0} a(n)/exp(Pi*n) = 2^(3/8)*Gamma(3/4)/(Pi^(1/4)*exp(Pi/24)).
Sum_{n>=0} a(n)/exp(2*Pi*n) = 2^(1/2)*Gamma(3/4)/(Pi^(1/4)*exp(Pi/12)).
[corrected by Vaclav Kotesovec, May 12 2023] (End)
[These are the reciprocals of phi(exp(-Pi)) (A259148) and phi(exp(-2*Pi)) (A259149), where phi(q) is the Euler modular function. See B. C. Berndt (RLN, Vol. V, p. 326), and formulas (13) and (14) in I. Mező, 2013. - Peter Luschny, Mar 13 2021]
a(n) = A000009(n) + A035363(n) + A006477(n). - R. J. Mathar, Feb 01 2022
a(n) = A008284(2*n,n) is also the number of partitions of 2n into n parts. - Ryan Brooks, Jun 11 2022
a(n) = A000700(n) + A330644(n). - R. J. Mathar, Jun 15 2022
a(n) ~ exp(Pi*sqrt(2*n/3)) / (4*n*sqrt(3)) * (1 + Sum_{r>=1} w(r)/n^(r/2)), where w(r) = 1/(-4*sqrt(6))^r * Sum_{k=0..(r+1)/2} binomial(r+1,k) * (r+1-k) / (r+1-2*k)! * (Pi/6)^(r-2*k) [Cormac O'Sullivan, 2023, pp. 2-3]. - Vaclav Kotesovec, Mar 15 2023

Extensions

Additional comments from Ola Veshta (olaveshta(AT)my-deja.com), Feb 28 2001
Additional comments from Dan Fux (dan.fux(AT)OpenGaia.com or danfux(AT)OpenGaia.com), Apr 07 2001

A002865 Number of partitions of n that do not contain 1 as a part.

Original entry on oeis.org

1, 0, 1, 1, 2, 2, 4, 4, 7, 8, 12, 14, 21, 24, 34, 41, 55, 66, 88, 105, 137, 165, 210, 253, 320, 383, 478, 574, 708, 847, 1039, 1238, 1507, 1794, 2167, 2573, 3094, 3660, 4378, 5170, 6153, 7245, 8591, 10087, 11914, 13959, 16424, 19196, 22519, 26252, 30701
Offset: 0

Views

Author

Keywords

Comments

Also the number of partitions of n-1, n >= 2, such that the least part occurs exactly once. See A096373, A097091, A097092, A097093. - Robert G. Wilson v, Jul 24 2004 [Corrected by Wolfdieter Lang, Feb 18 2009]
Number of partitions of n+1 where the number of parts is itself a part. Take a partition of n (with k parts) which does not contain 1, remove 1 from each part and add a new part of size k+1. - Franklin T. Adams-Watters, May 01 2006
Number of partitions where the largest part occurs at least twice. - Joerg Arndt, Apr 17 2011
Row sums of triangle A147768. - Gary W. Adamson, Nov 11 2008
From Lewis Mammel (l_mammel(AT)att.net), Oct 06 2009: (Start)
a(n) is the number of sets of n disjoint pairs of 2n things, called a pairing, disjoint with a given pairing (A053871), that are unique under permutations preserving the given pairing.
Can be seen immediately from a graphical representation which must decompose into even numbered cycles of 4 or more things, as connected by pairs alternating between the pairings. Each thing is in a single cycle, so this is a partition of 2n into even parts greater than 2, equivalent to a partition of n into parts greater than 1. (End)
Convolution product (1, 1, 2, 2, 4, 4, ...) * (1, 2, 3, ...) = A058682 starting (1, 3, 7, 13, 23, 37, ...); with row sums of triangle A171239 = A058682. - Gary W. Adamson, Dec 05 2009
Also the number of 2-regular multigraphs with loops forbidden. - Jason Kimberley, Jan 05 2011
Number of appearances of the multiplicity n, n-1, ..., n-k in all partitions of n, for k < n/2. (Only populated by multiplicities of large numbers of 1's.) - William Keith, Nov 20 2011
Also the number of equivalence classes of n X n binary matrices with exactly 2 1's in each row and column, up to permutations of rows and columns (cf. A133687). - N. J. A. Sloane, Sep 16 2013
Starting at a(2) this sequence gives the number of vertices on a nim tree created in the game of edge removal for a path P_{n} where n is the number of vertices on the path. This is the number of nonisomorphic graphs that can result from the path when the game of edge removal is played. - Lyndsey Wong, Jul 09 2016
The number of different ways to climb a staircase taking at least two stairs at a time. - Mohammad K. Azarian, Nov 20 2016
Let 1,0,1,1,1,... (offset 0) count unlabeled, connected, loopless 1-regular digraphs. This here is the Euler transform of that sequence, counting unlabeled loopless 1-regular digraphs. A145574 is the associated multiset transformation. A000166 are the labeled loopless 1-regular digraphs. - R. J. Mathar, Mar 25 2019
For n > 1, also the number of partitions with no part greater than the number of ones. - George Beck, May 09 2019 [See A187219 which is the correct sequence for this interpretation for n >= 1. - Spencer Miller, Jan 30 2023]
From Gus Wiseman, May 19 2019: (Start)
Conjecture: Also the number of integer partitions of n - 1 that have a consecutive subsequence summing to each positive integer from 1 to n - 1. For example, (32211) is such a partition because we have consecutive subsequences:
1: (1)
2: (2)
3: (3) or (21)
4: (22) or (211)
5: (32) or (221)
6: (2211)
7: (322)
8: (3221)
9: (32211)
(End)
There is a sufficient and necessary condition to characterize the partitions defined by Gus Wiseman. It is that the largest part must be less than or equal to the number of ones plus one. Hence, the number of partitions of n with no part greater than the number of ones is the same as the number of partitions of n-1 that have a consecutive subsequence summing to each integer from 1 to n-1. Gus Wiseman's conjecture can be proved bijectively. - Andrew Yezhou Wang, Dec 14 2019
From Peter Bala, Dec 01 2024: (Start)
Let P(2, n) denote the set of partitions of n into parts k > 1. Then A000041(n) = - Sum_{parts k in all partitions in P(2, n+2)} mu(k). For example, with n = 5, there are 4 partitions of n + 2 = 7 into parts greater than 1, namely, 7, 5 + 2, 4 + 3, 3 + 2 + 2, and mu(7) + (mu(5) + mu(2)) + (mu(4 ) + mu(3)) + (mu(3) + mu(2) + mu(2)) = -7 = - A000041(5). (End)

Examples

			a(6) = 4 from 6 = 4+2 = 3+3 = 2+2+2.
G.f. = 1 + x^2 + x^3 + 2*x^4 + 2*x^5 + 4*x^6 + 4*x^7 + 7*x^8 + 8*x^9 + ...
From _Gus Wiseman_, May 19 2019: (Start)
The a(2) = 1 through a(9) = 8 partitions not containing 1 are the following. The Heinz numbers of these partitions are given by A005408.
  (2)  (3)  (4)   (5)   (6)    (7)    (8)     (9)
            (22)  (32)  (33)   (43)   (44)    (54)
                        (42)   (52)   (53)    (63)
                        (222)  (322)  (62)    (72)
                                      (332)   (333)
                                      (422)   (432)
                                      (2222)  (522)
                                              (3222)
The a(2) = 1 through a(9) = 8 partitions of n - 1 whose least part appears exactly once are the following. The Heinz numbers of these partitions are given by A247180.
  (1)  (2)  (3)   (4)   (5)    (6)    (7)     (8)
            (21)  (31)  (32)   (42)   (43)    (53)
                        (41)   (51)   (52)    (62)
                        (221)  (321)  (61)    (71)
                                      (331)   (332)
                                      (421)   (431)
                                      (2221)  (521)
                                              (3221)
The a(2) = 1 through a(9) = 8 partitions of n + 1 where the number of parts is itself a part are the following. The Heinz numbers of these partitions are given by A325761.
  (21)  (22)  (32)   (42)   (52)    (62)    (72)     (82)
              (311)  (321)  (322)   (332)   (333)    (433)
                            (331)   (431)   (432)    (532)
                            (4111)  (4211)  (531)    (631)
                                            (4221)   (4222)
                                            (4311)   (4321)
                                            (51111)  (4411)
                                                     (52111)
The a(2) = 1 through a(8) = 7 partitions of n whose greatest part appears at least twice are the following. The Heinz numbers of these partitions are given by A070003.
  (11)  (111)  (22)    (221)    (33)      (331)      (44)
               (1111)  (11111)  (222)     (2221)     (332)
                                (2211)    (22111)    (2222)
                                (111111)  (1111111)  (3311)
                                                     (22211)
                                                     (221111)
                                                     (11111111)
Nonisomorphic representatives of the a(2) = 1 through a(6) = 4 2-regular multigraphs with n edges and n vertices are the following.
  {12,12}  {12,13,23}  {12,12,34,34}  {12,12,34,35,45}  {12,12,34,34,56,56}
                       {12,13,24,34}  {12,13,24,35,45}  {12,12,34,35,46,56}
                                                        {12,13,23,45,46,56}
                                                        {12,13,24,35,46,56}
The a(2) = 1 through a(9) = 8 partitions of n with no part greater than the number of ones are the following. The Heinz numbers of these partitions are given by A325762.
  (11)  (111)  (211)   (2111)   (2211)    (22111)    (22211)     (33111)
               (1111)  (11111)  (3111)    (31111)    (32111)     (222111)
                                (21111)   (211111)   (41111)     (321111)
                                (111111)  (1111111)  (221111)    (411111)
                                                     (311111)    (2211111)
                                                     (2111111)   (3111111)
                                                     (11111111)  (21111111)
                                                                 (111111111)
(End)
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 836.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 115, p*(n).
  • H. P. Robinson, Letter to N. J. A. Sloane, Jan 04 1974.
  • 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).
  • P. G. Tait, Scientific Papers, Cambridge Univ. Press, Vol. 1, 1898, Vol. 2, 1900, see Vol. 1, p. 334.

Crossrefs

First differences of partition numbers A000041. Cf. A053445, A072380, A081094, A081095, A232697.
Pairwise sums seem to be in A027336.
Essentially the same as A085811.
A column of A090824 and of A133687 and of A292508 and of A292622. Cf. A229161.
2-regular not necessarily connected graphs: A008483 (simple graphs), A000041 (multigraphs with loops allowed), this sequence (multigraphs with loops forbidden), A027336 (graphs with loops allowed but no multiple edges). - Jason Kimberley, Jan 05 2011
See also A098743 (parts that do not divide n).
Numbers n such that in the edge-delete game on the path P_{n} the first player does not have a winning strategy: A274161. - Lyndsey Wong, Jul 09 2016
Row sums of characteristic array A145573.
Number of partitions of n into parts >= m: A008483 (m = 3), A008484 (m = 4), A185325 - A185329 (m = 5 through 9).

Programs

  • GAP
    Concatenation([1],List([1..41],n->NrPartitions(n)-NrPartitions(n-1))); # Muniru A Asiru, Aug 20 2018
    
  • Magma
    A41 := func; [A41(n)-A41(n-1):n in [0..50]]; // Jason Kimberley, Jan 05 2011
    
  • Maple
    with(combstruct): ZL1:=[S, {S=Set(Cycle(Z,card>1))}, unlabeled]: seq(count(ZL1,size=n), n=0..50);  # Zerinvary Lajos, Sep 24 2007
    G:= {P=Set (Set (Atom, card>1))}: combstruct[gfsolve](G, unlabeled, x): seq  (combstruct[count] ([P, G, unlabeled], size=i), i=0..50);  # Zerinvary Lajos, Dec 16 2007
    with(combstruct):a:=proc(m) [ZL, {ZL=Set(Cycle(Z, card>=m))}, unlabeled]; end: A:=a(2):seq(count(A, size=n), n=0..50);  # Zerinvary Lajos, Jun 11 2008
    # alternative Maple program:
    A002865:= proc(n) option remember; `if`(n=0, 1, add(
          (numtheory[sigma](j)-1)*A002865(n-j), j=1..n)/n)
        end:
    seq(A002865(n), n=0..60);  # Alois P. Heinz, Sep 17 2017
  • Mathematica
    Table[ PartitionsP[n + 1] - PartitionsP[n], {n, -1, 50}] (* Robert G. Wilson v, Jul 24 2004 *)
    f[1, 1] = 1; f[n_, k_] := f[n, k] = If[n < 0, 0, If[k > n, 0, If[k == n, 1, f[n, k + 1] + f[n - k, k]]]]; Table[ f[n, 2], {n, 50}] (* Robert G. Wilson v *)
    Table[SeriesCoefficient[Exp[Sum[x^(2*k)/(k*(1 - x^k)), {k, 1, n}]], {x, 0, n}], {n, 0, 50}] (* Vaclav Kotesovec, Aug 18 2018 *)
    CoefficientList[Series[1/QPochhammer[x^2, x], {x,0,50}], x] (* G. C. Greubel, Nov 03 2019 *)
    Table[Count[IntegerPartitions[n],?(FreeQ[#,1]&)],{n,0,50}] (* _Harvey P. Dale, Feb 12 2023 *)
  • PARI
    {a(n) = if( n<0, 0, polcoeff( (1 - x) / eta(x + x * O(x^n)), n))};
    
  • PARI
    a(n)=if(n,numbpart(n)-numbpart(n-1),1) \\ Charles R Greathouse IV, Nov 26 2012
    
  • Python
    from sympy import npartitions
    def A002865(n): return npartitions(n)-npartitions(n-1) if n else 1 # Chai Wah Wu, Mar 30 2023
  • SageMath
    def A002865_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( 1/product((1-x^(m+2)) for m in (0..60)) ).list()
    A002865_list(50) # G. C. Greubel, Nov 03 2019
    

Formula

G.f.: Product_{m>1} 1/(1-x^m).
a(0)=1, a(n) = p(n) - p(n-1), n >= 1, with the partition numbers p(n) := A000041(n).
a(n) = A085811(n+3). - James Sellers, Dec 06 2005 [Corrected by Gionata Neri, Jun 14 2015]
a(n) = A116449(n) + A116450(n). - Reinhard Zumkeller, Feb 16 2006
a(n) = Sum_{k=2..floor((n+2)/2)} A008284(n-k+1,k-1) for n > 0. - Reinhard Zumkeller, Nov 04 2007
G.f.: 1 + Sum_{n>=2} x^n / Product_{k>=n} (1 - x^k). - Joerg Arndt, Apr 13 2011
G.f.: Sum_{n>=0} x^(2*n) / Product_{k=1..n} (1 - x^k). - Joerg Arndt, Apr 17 2011
a(n) = A090824(n,1) for n > 0. - Reinhard Zumkeller, Oct 10 2012
a(n) ~ Pi * exp(sqrt(2*n/3)*Pi) / (12*sqrt(2)*n^(3/2)) * (1 - (3*sqrt(3/2)/Pi + 13*Pi/(24*sqrt(6)))/sqrt(n) + (217*Pi^2/6912 + 9/(2*Pi^2) + 13/8)/n). - Vaclav Kotesovec, Feb 26 2015, extended Nov 04 2016
G.f.: exp(Sum_{k>=1} (sigma_1(k) - 1)*x^k/k). - Ilya Gutkovskiy, Aug 21 2018
a(0) = 1, a(n) = A232697(n) - 1. - George Beck, May 09 2019
From Peter Bala, Feb 19 2021: (Start)
G.f.: A(q) = Sum_{n >= 0} q^(n^2)/( (1 - q)*Product_{k = 2..n} (1 - q^k)^2 ).
More generally, A(q) = Sum_{n >= 0} q^(n*(n+r))/( (1 - q) * Product_{k = 2..n} (1 - q^k)^2 * Product_{i = 1..r} (1 - q^(n+i)) ) for r = 0,1,2,.... (End)
G.f.: 1 + Sum_{n >= 1} x^(n+1)/Product_{k = 1..n-1} 1 - x^(k+2). - Peter Bala, Dec 01 2024

A377051 Array read by antidiagonals downward where A(n,k) is the n-th term of the k-th differences of the powers of primes.

Original entry on oeis.org

1, 2, 1, 3, 1, 0, 4, 1, 0, 0, 5, 1, 0, 0, 0, 7, 2, 1, 1, 1, 1, 8, 1, -1, -2, -3, -4, -5, 9, 1, 0, 1, 3, 6, 10, 15, 11, 2, 1, 1, 0, -3, -9, -19, -34, 13, 2, 0, -1, -2, -2, 1, 10, 29, 63, 16, 3, 1, 1, 2, 4, 6, 5, -5, -34, -97, 17, 1, -2, -3, -4, -6, -10, -16, -21, -16, 18, 115
Offset: 0

Views

Author

Gus Wiseman, Oct 20 2024

Keywords

Comments

Row k of the array is the k-th differences of A000961.

Examples

			Array form:
        n=1:  n=2:  n=3:  n=4:  n=5:  n=6:  n=7:  n=8:  n=9:
  ----------------------------------------------------------
  k=0:   1     2     3     4     5     7     8     9    11
  k=1:   1     1     1     1     2     1     1     2     2
  k=2:   0     0     0     1    -1     0     1     0     1
  k=3:   0     0     1    -2     1     1    -1     1    -3
  k=4:   0     1    -3     3     0    -2     2    -4     6
  k=5:   1    -4     6    -3    -2     4    -6    10    -8
  k=6:  -5    10    -9     1     6   -10    16   -18     5
  k=7:  15   -19    10     5   -16    26   -34    23     9
  k=8: -34    29    -5   -21    42   -60    57   -14   -42
  k=9:  63   -34   -16    63  -102   117   -71   -28   104
Triangle form:
    1
    2    1
    3    1    0
    4    1    0    0
    5    1    0    0    0
    7    2    1    1    1    1
    8    1   -1   -2   -3   -4   -5
    9    1    0    1    3    6   10   15
   11    2    1    1    0   -3   -9  -19  -34
   13    2    0   -1   -2   -2    1   10   29   63
   16    3    1    1    2    4    6    5   -5  -34  -97
		

Crossrefs

Row k=0 is A000961, exclusive A246655.
Row k=1 is A057820.
Row k=2 is A376596.
The version for primes is A095195, noncomposites A376682, composites A377033.
A version for partitions is A175804, cf. A053445, A281425, A320590.
For squarefree numbers we have A377038, nonsquarefree A377046.
Triangle row-sums are A377052, absolute version A377053.
Column n = 1 is A377054, for primes A007442 or A030016.
First position of 0 in each row is A377055.
A000040 lists the primes, differences A001223, seconds A036263.
A023893 and A023894 count integer partitions into prime-powers, factorizations A000688.

Programs

  • Mathematica
    nn=12;
    t=Table[Take[Differences[NestList[NestWhile[#+1&, #+1,!PrimePowerQ[#]&]&,1,2*nn],k],nn],{k,0,nn}]
    Table[t[[j,i-j+1]],{i,nn},{j,i}]

Formula

A(i,j) = Sum_{k=0..j} (-1)^(j-k)*binomial(j,k)*A000961(i+k).

A095195 T(n,0) = prime(n), T(n,k) = T(n,k-1)-T(n-1,k-1), 0<=k

Original entry on oeis.org

2, 3, 1, 5, 2, 1, 7, 2, 0, -1, 11, 4, 2, 2, 3, 13, 2, -2, -4, -6, -9, 17, 4, 2, 4, 8, 14, 23, 19, 2, -2, -4, -8, -16, -30, -53, 23, 4, 2, 4, 8, 16, 32, 62, 115, 29, 6, 2, 0, -4, -12, -28, -60, -122, -237, 31, 2, -4, -6, -6, -2, 10, 38, 98, 220, 457, 37, 6, 4, 8, 14, 20, 22, 12
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 22 2004

Keywords

Comments

T(n,0)=A000040(n); T(n,1)=A001223(n-1) for n>1; T(n,2)=A036263(n-2) for n>2; T(n,n-1)=A007442(n) for n>1.
Row k of the array (not the triangle) is the k-th differences of the prime numbers. - Gus Wiseman, Jan 11 2025

Examples

			Triangle begins:
   2;
   3,  1;
   5,  2,  1;
   7,  2,  0, -1;
  11,  4,  2,  2,  3;
  13,  2, -2, -4, -6, -9;
Alternative: array form read by antidiagonals:
     2,   3,   5,   7,  11,  13,  17,  19,  23,  29,  31,...
     1,   2,   2,   4,   2,   4,   2,   4,   6,   2,   6,...
     1,   0,   2,  -2,   2,  -2,   2,   2,  -4,   4,  -2,...
    -1,   2,  -4,   4,  -4,   4,   0,  -6,   8,  -6,   0,...
     3,  -6,   8,  -8,   8,  -4,  -6,  14, -14,   6,   4,...
    -9,  14, -16,  16, -12,  -2,  20, -28,  20,  -2,  -8,...
    23, -30,  32, -28,  10,  22, -48,  48, -22,  -6,  10,..,
   -53,  62, -60,  38,  12, -70,  96, -70,  16,  16, -12,...
   115,-122,  98, -26, -82, 166,-166,  86,   0, -28,  28,...
  -237, 220,-124, -56, 248,-332, 252, -86, -28,  56, -98,...
   457,-344,  68, 304,-580, 584,-338,  58,  84,-154, 308,...
		

Crossrefs

Cf. A140119 (row sums).
Below, the inclusive primes (A008578) are 1 followed by A000040. See also A075526.
Rows of the array (columns of the triangle) begin: A000040, A001223, A036263.
Column n = 1 of the array is A007442, inclusive A030016.
The version for partition numbers is A175804, see A053445, A281425, A320590.
First position of 0 is A376678, inclusive A376855.
Absolute antidiagonal-sums are A376681, inclusive A376684.
The inclusive version is A376682.
For composite instead of prime we have A377033, see A377034-A377037.
For squarefree instead of prime we have A377038, nonsquarefree A377046.
Column n = 2 of the array is A379542.

Programs

  • Haskell
    a095195 n k = a095195_tabl !! (n-1) !! (k-1)
    a095195_row n = a095195_tabl !! (n-1)
    a095195_tabl = f a000040_list [] where
       f (p:ps) xs = ys : f ps ys where ys = scanl (-) p xs
    -- Reinhard Zumkeller, Oct 10 2013
  • Maple
    A095195A := proc(n,k) # array, k>=0, n>=0
        option remember;
        if n =0 then
            ithprime(k+1) ;
        else
            procname(n-1,k+1)-procname(n-1,k) ;
        end if;
    end proc:
    A095195 := proc(n,k) # triangle, 0<=k=1
            A095195A(k,n-k-1) ;
    end proc: # R. J. Mathar, Sep 19 2013
  • Mathematica
    T[n_, 0] := Prime[n]; T[n_, k_] /; 0 <= k < n := T[n, k] = T[n, k-1] - T[n-1, k-1]; Table[T[n, k], {n, 1, 12}, {k, 0, n-1}] // Flatten (* Jean-François Alcover, Feb 01 2017 *)
    nn=6;
    t=Table[Differences[Prime[Range[nn]],k],{k,0,nn}];
    Table[t[[j,i-j+1]],{i,nn},{j,i}] (* Gus Wiseman, Jan 11 2025 *)

A175804 Square array A(n,k), n>=0, k>=0, read by antidiagonals: A(n,k) is the n-th term of the k-th differences of partition numbers A000041.

Original entry on oeis.org

1, 0, 1, 1, 1, 2, -1, 0, 1, 3, 2, 1, 1, 2, 5, -4, -2, -1, 0, 2, 7, 9, 5, 3, 2, 2, 4, 11, -21, -12, -7, -4, -2, 0, 4, 15, 49, 28, 16, 9, 5, 3, 3, 7, 22, -112, -63, -35, -19, -10, -5, -2, 1, 8, 30, 249, 137, 74, 39, 20, 10, 5, 3, 4, 12, 42, -539, -290, -153, -79, -40, -20, -10, -5, -2, 2, 14, 56
Offset: 0

Views

Author

Alois P. Heinz, Dec 04 2010

Keywords

Comments

Odlyzko showed that the k-th differences of A000041(n) alternate in sign with increasing n up to a certain index n_0(k) and then stay positive.
Are there any zeros after the first four, which all lie in columns k = 1, 2? - Gus Wiseman, Dec 15 2024

Examples

			Square array A(n,k) begins:
   1,  0,  1, -1,  2,  -4,   9,  ...
   1,  1,  0,  1, -2,   5, -12,  ...
   2,  1,  1, -1,  3,  -7,  16,  ...
   3,  2,  0,  2, -4,   9, -19,  ...
   5,  2,  2, -2,  5, -10,  20,  ...
   7,  4,  0,  3, -5,  10, -20,  ...
  11,  4,  3, -2,  5, -10,  22,  ...
		

Crossrefs

Columns k=0-5 give: A000041, A002865, A053445, A072380, A081094, A081095.
Main diagonal gives A379378.
For primes we have A095195 or A376682.
Row n = 0 is A281425.
Row n = 1 is A320590 except first term.
For composites we have A377033.
For squarefree numbers we have A377038.
For nonsquarefree numbers we have A377046.
For prime powers we have A377051.
Antidiagonal sums are A377056, absolute value version A378621.
The version for strict partitions is A378622, first column A293467.
A000009 counts strict integer partitions, differences A087897, A378972.

Programs

  • Maple
    A41:= combinat[numbpart]:
    DD:= proc(p) proc(n) option remember; p(n+1) -p(n) end end:
    A:= (n,k)-> (DD@@k)(A41)(n):
    seq(seq(A(n, d-n), n=0..d), d=0..11);
  • Mathematica
    max = 11; a41 = Array[PartitionsP, max+1, 0]; a[n_, k_] := Differences[a41, k][[n+1]]; Table[a[n, k-n], {k, 0, max}, {n, 0, k}] // Flatten (* Jean-François Alcover, Aug 29 2014 *)
    nn=5;Table[Table[Sum[(-1)^(k-i)*Binomial[k,i]*PartitionsP[n+i],{i,0,k}],{k,0,nn}],{n,0,nn}] (* Gus Wiseman, Dec 15 2024 *)

Formula

A(n,k) = (Delta^(k) A000041)(n).
A(n,k) = Sum_{i=0..k} (-1)^(k-i) * binomial(k,i) * A000041(n+i). In words, row x is the inverse zero-based binomial transform of A000041 shifted left x times. - Gus Wiseman, Dec 15 2024

A281425 a(n) = [q^n] (1 - q)^n / Product_{j=1..n} (1 - q^j).

Original entry on oeis.org

1, 0, 1, -1, 2, -4, 9, -21, 49, -112, 249, -539, 1143, -2396, 5013, -10550, 22420, -48086, 103703, -223806, 481388, -1029507, 2187944, -4625058, 9742223, -20490753, 43111808, -90840465, 191773014, -405523635, 858378825, -1817304609, 3845492204, -8129023694, 17162802918, -36191083386
Offset: 0

Views

Author

Ilya Gutkovskiy, Oct 05 2017

Keywords

Comments

a(n) is n-th term of the Euler transform of -n + 1, 1, 1, 1, ...
Inverse zero-based binomial transform of A000041. The version for strict partitions is A380412, or A293467 up to sign. - Gus Wiseman, Feb 06 2025

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(k=0,
          combinat[numbpart](n), b(n, k-1)-b(n-1, k-1))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..35);  # Alois P. Heinz, Dec 21 2024
  • Mathematica
    Table[SeriesCoefficient[(1 - q)^n / Product[(1 - q^j), {j, 1, n}], {q, 0, n}], {n, 0, 35}]
    Table[SeriesCoefficient[(1 - q)^n QPochhammer[q^(1 + n), q]/QPochhammer[q, q], {q, 0, n}], {n, 0, 35}]
    Table[SeriesCoefficient[1/QFactorial[n, q], {q, 0, n}], {n, 0, 35}]
    Table[Differences[PartitionsP[Range[0, n]], n], {n, 0, 35}] // Flatten
    Table[Sum[(-1)^j*Binomial[n, j]*PartitionsP[n-j], {j, 0, n}], {n, 0, 30}] (* Vaclav Kotesovec, Oct 06 2017 *)

Formula

a(n) = [q^n] 1/((1 + q)*(1 + q + q^2)*...*(1 + q + ... + q^(n-1))).
a(n) = Sum_{j=0..n} (-1)^j * binomial(n, j) * A000041(n-j). - Vaclav Kotesovec, Oct 06 2017
a(n) ~ (-1)^n * 2^(n - 3/2) * exp(Pi*sqrt(n/12) + Pi^2/96) / (sqrt(3)*n). - Vaclav Kotesovec, May 07 2018

A377046 Array read by downward antidiagonals where A(n,k) is the n-th term of the k-th differences of nonsquarefree numbers.

Original entry on oeis.org

4, 8, 4, 9, 1, -3, 12, 3, 2, 5, 16, 4, 1, -1, -6, 18, 2, -2, -3, -2, 4, 20, 2, 0, 2, 5, 7, 3, 24, 4, 2, 2, 0, -5, -12, -15, 25, 1, -3, -5, -7, -7, -2, 10, 25, 27, 2, 1, 4, 9, 16, 23, 25, 15, -10, 28, 1, -1, -2, -6, -15, -31, -54, -79, -94, -84, 32, 4, 3, 4, 6, 12, 27, 58, 112, 191, 285, 369
Offset: 0

Views

Author

Gus Wiseman, Oct 19 2024

Keywords

Comments

Row k is the k-th differences of A013929.

Examples

			Array form:
        n=1:  n=2:  n=3:  n=4:  n=5:  n=6:  n=7:  n=8:  n=9:
  ---------------------------------------------------------
  k=0:   4     8     9    12    16    18    20    24    25
  k=1:   4     1     3     4     2     2     4     1     2
  k=2:  -3     2     1    -2     0     2    -3     1    -1
  k=3:   5    -1    -3     2     2    -5     4    -2     4
  k=4:  -6    -2     5     0    -7     9    -6     6    -7
  k=5:   4     7    -5    -7    16   -15    12   -13    10
  k=6:   3   -12    -2    23   -31    27   -25    23   -13
  k=7: -15    10    25   -54    58   -52    48   -36    13
  k=8:  25    15   -79   112  -110   100   -84    49     1
  k=9: -10   -94   191  -222   210  -184   133   -48   -57
Triangle form:
   4
   8   4
   9   1  -3
  12   3   2   5
  16   4   1  -1  -6
  18   2  -2  -3  -2   4
  20   2   0   2   5   7   3
  24   4   2   2   0  -5 -12 -15
  25   1  -3  -5  -7  -7  -2  10  25
  27   2   1   4   9  16  23  25  15 -10
  28   1  -1  -2  -6 -15 -31 -54 -79 -94 -84
  32   4   3   4   6  12  27  58 112 191 285 369
		

Crossrefs

Initial rows: A013929, A078147, A376593.
The version for primes is A095195, noncomposites A376682, composites A377033.
A version for partitions is A175804, cf. A053445, A281425, A320590.
For squarefree numbers we have A377038, sums A377039, absolute A377040.
Triangle row-sums are A377047, absolute version A377048.
Column n = 1 is A377049, for squarefree A377041, for prime A007442 or A030016.
First position of 0 in each row is A377050.
For prime-power instead of nonsquarefree we have A377051.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers.
A073576 counts integer partitions into squarefree numbers, factorizations A050320.

Programs

  • Mathematica
    nn=9;
    t=Table[Take[Differences[NestList[NestWhile[#+1&,#+1,SquareFreeQ[#]&]&,4,2*nn],k],nn],{k,0,nn}]
    Table[t[[j,i-j+1]],{i,nn},{j,i}]

Formula

A(i,j) = sum_{k=0..j} (-1)^(j-k) binomial(j,k) A013929(i+k).

A377038 Array read by antidiagonals downward where A(n,k) is the n-th term of the k-th differences of the squarefree numbers.

Original entry on oeis.org

1, 2, 1, 3, 1, 0, 5, 2, 1, 1, 6, 1, -1, -2, -3, 7, 1, 0, 1, 3, 6, 10, 3, 2, 2, 1, -2, -8, 11, 1, -2, -4, -6, -7, -5, 3, 13, 2, 1, 3, 7, 13, 20, 25, 22, 14, 1, -1, -2, -5, -12, -25, -45, -70, -92, 15, 1, 0, 1, 3, 8, 20, 45, 90, 160, 252, 17, 2, 1, 1, 0, -3, -11, -31, -76, -166, -326, -578
Offset: 0

Views

Author

Gus Wiseman, Oct 18 2024

Keywords

Comments

Row n is the k-th differences of A005117 = the squarefree numbers.

Examples

			Array form:
        n=1:  n=2:  n=3:  n=4:  n=5:  n=6:  n=7:  n=8:  n=9:
  ----------------------------------------------------------
  k=0:   1     2     3     5     6     7    10    11    13
  k=1:   1     1     2     1     1     3     1     2     1
  k=2:   0     1    -1     0     2    -2     1    -1     0
  k=3:   1    -2     1     2    -4     3    -2     1     1
  k=4:  -3     3     1    -6     7    -5     3     0    -2
  k=5:   6    -2    -7    13   -12     8    -3    -2     3
  k=6:  -8    -5    20   -25    20   -11     1     5    -5
  k=7:   3    25   -45    45   -31    12     4   -10    10
  k=8:  22   -70    90   -76    43    -8   -14    20   -19
  k=9: -92   160  -166   119   -51    -6    34   -39    28
Triangle form:
   1
   2   1
   3   1   0
   5   2   1   1
   6   1  -1  -2  -3
   7   1   0   1   3   6
  10   3   2   2   1  -2  -8
  11   1  -2  -4  -6  -7  -5   3
  13   2   1   3   7  13  20  25  22
  14   1  -1  -2  -5 -12 -25 -45 -70 -92
  15   1   0   1   3   8  20  45  90 160 252
		

Crossrefs

Row k=0 is A005117.
Row k=1 is A076259.
Row k=2 is A376590.
The version for primes is A095195, noncomposites A376682, composites A377033.
A version for partitions is A175804, cf. A053445, A281425, A320590.
Triangle row-sums are A377039, absolute version A377040.
Column n = 1 is A377041, for primes A007442 or A030016.
First position of 0 in each row is A377042.
For nonsquarefree instead of squarefree numbers we have A377046.
For prime-powers instead of squarefree numbers we have A377051.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers, complement A013929 (differences A078147).
A073576 counts integer partitions into squarefree numbers, factorizations A050320.

Programs

  • Mathematica
    nn=9;
    t=Table[Take[Differences[NestList[NestWhile[#+1&,#+1,!SquareFreeQ[#]&]&,1,2*nn],k],nn],{k,0,nn}]
    Table[t[[j,i-j+1]],{i,nn},{j,i}]

Formula

A(i,j) = sum_{k=0..j} (-1)^(j-k) binomial(j,k) A005117(i+k).

A377033 Array read by antidiagonals downward where A(n,k) is the n-th term of the k-th differences of the composite numbers (A002808).

Original entry on oeis.org

4, 6, 2, 8, 2, 0, 9, 1, -1, -1, 10, 1, 0, 1, 2, 12, 2, 1, 1, 0, -2, 14, 2, 0, -1, -2, -2, 0, 15, 1, -1, -1, 0, 2, 4, 4, 16, 1, 0, 1, 2, 2, 0, -4, -8, 18, 2, 1, 1, 0, -2, -4, -4, 0, 8, 20, 2, 0, -1, -2, -2, 0, 4, 8, 8, 0, 21, 1, -1, -1, 0, 2, 4, 4, 0, -8, -16, -16
Offset: 0

Views

Author

Gus Wiseman, Oct 17 2024

Keywords

Comments

Row n is the k-th differences of A002808 = the composite numbers.

Examples

			Array begins:
        n=1:  n=2:  n=3:  n=4:  n=5:  n=6:  n=7:  n=8:  n=9:
  ----------------------------------------------------------
  k=0:   4     6     8     9    10    12    14    15    16
  k=1:   2     2     1     1     2     2     1     1     2
  k=2:   0    -1     0     1     0    -1     0     1     0
  k=3:  -1     1     1    -1    -1     1     1    -1    -1
  k=4:   2     0    -2     0     2     0    -2     0     2
  k=5:  -2    -2     2     2    -2    -2     2     2    -2
  k=6:   0     4     0    -4     0     4     0    -4    -1
  k=7:   4    -4    -4     4     4    -4    -4     3    10
  k=8:  -8     0     8     0    -8     0     7     7   -29
  k=9:   8     8    -8    -8     8     7     0   -36    63
Triangle begins:
    4
    6    2
    8    2    0
    9    1   -1   -1
   10    1    0    1    2
   12    2    1    1    0   -2
   14    2    0   -1   -2   -2    0
   15    1   -1   -1    0    2    4    4
   16    1    0    1    2    2    0   -4   -8
   18    2    1    1    0   -2   -4   -4    0    8
   20    2    0   -1   -2   -2    0    4    8    8    0
   21    1   -1   -1    0    2    4    4    0   -8  -16  -16
		

Crossrefs

Initial rows: A002808, A073783, A073445.
The version for primes is A095195 or A376682.
A version for partitions is A175804, cf. A053445, A281425, A320590.
Triangle row-sums are A377034, absolute version A377035.
Column n = 1 is A377036, for primes A007442 or A030016.
First position of 0 in each row is A377037.
Other arrays of differences: A095195 (prime), A376682 (noncomposite), A377033 (composite), A377038 (squarefree), A377046 (nonsquarefree), A377051 (prime-power).
A000040 lists the primes, differences A001223, seconds A036263.
A008578 lists the noncomposites, differences A075526.
Cf. A065310, A065890, A084758, A173390, A350004, A376602 (zero), A376603 (nonzero), A376651 (positive), A376652 (negative), A376680.

Programs

  • Mathematica
    nn=9;
    t=Table[Take[Differences[NestList[NestWhile[#+1&, #+1,PrimeQ]&,4,2*nn],k],nn],{k,0,nn}]

Formula

A(i,j) = Sum_{k=0..j} (-1)^(j-k) binomial(j,k) A002808(i+k).

A376682 Array read by antidiagonals downward where A(n,k) is the n-th term of the k-th differences of the noncomposite numbers (A008578).

Original entry on oeis.org

1, 2, 1, 3, 1, 0, 5, 2, 1, 1, 7, 2, 0, -1, -2, 11, 4, 2, 2, 3, 5, 13, 2, -2, -4, -6, -9, -14, 17, 4, 2, 4, 8, 14, 23, 37, 19, 2, -2, -4, -8, -16, -30, -53, -90, 23, 4, 2, 4, 8, 16, 32, 62, 115, 205, 29, 6, 2, 0, -4, -12, -28, -60, -122, -237, -442, 31, 2, -4, -6, -6, -2, 10, 38, 98, 220, 457, 899
Offset: 0

Views

Author

Gus Wiseman, Oct 15 2024

Keywords

Comments

Row k is the k-th differences of the noncomposite numbers.

Examples

			Array begins:
         n=1:  n=2:  n=3:  n=4:  n=5:  n=6:  n=7:  n=8:  n=9:
  -----------------------------------------------------------
  k=0:    1     2     3     5     7    11    13    17    19
  k=1:    1     1     2     2     4     2     4     2     4
  k=2:    0     1     0     2    -2     2    -2     2     2
  k=3:    1    -1     2    -4     4    -4     4     0    -6
  k=4:   -2     3    -6     8    -8     8    -4    -6    14
  k=5:    5    -9    14   -16    16   -12    -2    20   -28
  k=6:  -14    23   -30    32   -28    10    22   -48    48
  k=7:   37   -53    62   -60    38    12   -70    96   -70
  k=8:  -90   115  -122    98   -26   -82   166  -166    86
  k=9:  205  -237   220  -124   -56   248  -332   252   -86
Triangle begins:
    1
    2    1
    3    1    0
    5    2    1    1
    7    2    0   -1   -2
   11    4    2    2    3    5
   13    2   -2   -4   -6   -9  -14
   17    4    2    4    8   14   23   37
   19    2   -2   -4   -8  -16  -30  -53  -90
   23    4    2    4    8   16   32   62  115  205
   29    6    2    0   -4  -12  -28  -60 -122 -237 -442
   31    2   -4   -6   -6   -2   10   38   98  220  457  899
		

Crossrefs

The version for modern primes (A000040) is A095195.
Initial rows: A008578, A075526, A036263 with 0 prepended.
Column n = 1 is A030016 (modern A007442).
A version for partitions is A175804, cf. A053445, A281425, A320590.
Antidiagonal-sums are A376683 (modern A140119), absolute A376684 (modern A376681).
First position of 0 is A376855 (modern A376678).
For composite instead of prime we have A377033.
For squarefree instead of prime we have A377038, nonsquarefree A377046.
For prime-power instead of composite we have A377051.
A000040 lists the primes, differences A001223, second A036263.

Programs

  • Mathematica
    nn=12;
    t=Table[Take[Differences[NestList[NestWhile[#+1&, #+1,!PrimeQ[#]&]&,1,2*nn],k],nn],{k,0,nn}]
    (* or *)
    nn=12;
    q=Table[If[n==0,1,Prime[n]],{n,0,2nn}];
    Table[Sum[(-1)^(j-k)*Binomial[j,k]*q[[i+k]],{k,0,j}],{j,0,nn},{i,nn}]

Formula

A(i,j) = Sum_{k=0..j} (-1)^(j-k) binomial(j,k) A008578(i+k).
Previous Showing 11-20 of 45 results. Next