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 274 results. Next

A080995 Characteristic function of generalized pentagonal numbers A001318.

Original entry on oeis.org

1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0
Offset: 0

Views

Author

Michael Somos, Feb 27 2003

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
Repeatedly [1,[0,]^2k,1,[0,]^k], k>=0; characteristic function of generalized pentagonal numbers: a(A001318(n))=1, a(A090864(n))=0. - Reinhard Zumkeller, Apr 22 2006
Starting with offset 1 with 1's signed (++--++,...), i.e., (1, 1, 0, 0, -1, 0, -1, 0, ...); is the INVERTi transform of A000041 starting (1, 2, 3, 5, 7, 11, ...). - Gary W. Adamson, May 17 2013
Number 9 of the 14 primitive eta-products which are holomorphic modular forms of weight 1/2 listed by D. Zagier on page 30 of "The 1-2-3 of Modular Forms". - Michael Somos, May 04 2016

Examples

			G.f. = 1 + x + x^2 + x^5 + x^7 + x^12 + x^15 + x^22 + x^26 + x^35 + x^40 + x^51 + ...
G.f. = q + q^25 + q^49 + q^121 + q^169 + q^289 + q^361 + q^529 + q^625 + ...
		

References

  • Percy A. MacMahon, Combinatory Analysis, Cambridge Univ. Press, London and New York, Vol. 1, 1915 and Vol. 2, 1916; see vol. 2, p. 81, Article 331.

Crossrefs

Programs

  • Haskell
    a080995 = a033683 . (+ 1) . (* 24)  -- Reinhard Zumkeller, Nov 14 2015
  • Mathematica
    a[ n_] := If[ n < 0, 0, SeriesCoefficient[ (Series[ EllipticTheta[ 3, Log[y] / (2 I), x^(3/2)], {x, 0, n + Floor@Sqrt[n]}] // Normal // TrigToExp) /. {y -> x^(1/2)}, {x, 0, n}]]; (* Michael Somos, Nov 18 2011 *)
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 4, 0, x^3] / QPochhammer[ x, x^2], {x, 0, n}]; (* Michael Somos, Jun 08 2013 *)
    a[ n_] := If[ n < 0, 0, Boole[ IntegerQ[ Sqrt[ 24 n + 1]]]]; (* Michael Somos, Jun 08 2013 *)
  • PARI
    {a(n) = if( n<0, 0, abs( polcoeff( eta(x + x * O(x^n)), n)))};
    
  • PARI
    {a(n) = issquare( 24*n + 1)}; /* Michael Somos, Apr 13 2005 */
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^2 + A) * eta(x^3 + A)^2 / (eta(x + A) * eta(x^6 + A)), n))};
    

Formula

Expansion of phi(-x^3) / chi(-x) in powers of x where phi(), chi() are Ramanujan theta functions. - Michael Somos, Sep 14 2007
Expansion of psi(x) - x * psi(x^9) in powers of x^3 where psi() is a Ramanujan theta function. - Michael Somos, Sep 14 2007
Expansion of f(x, x^2) in powers of x where f() is Ramanujan's two-variable theta function.
Expansion of q^(-1/24) * eta(q^2) * eta(q^3)^2 / (eta(q) * eta(q^6)) in powers of q.
a(n) = b(24*n + 1) where b() is multiplicative with b(2^e) = b(3^e) = 0^e, b(p^e) = (1 + (-1)^e) / 2 if p>3. - Michael Somos, Jun 06 2005
Euler transform of period 6 sequence [ 1, 0, -1, 0, 1, -1, ...].
G.f. is a period 1 Fourier series which satisfies f(-1 / (144 t)) = 2^(1/2) (t/i)^(1/2) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A089810.
G.f.: Product_{k>0} (1 - x^(3*k)) / (1 - x^k + x^(2*k)). - Michael Somos, Jan 26 2008
G.f.: Sum x^(n*(3n+1)/2), n=-inf..inf [the exponents are the pentagonal numbers, A000326].
a(n) = |A010815(n)| = A089806(2*n) = A033683(24*n + 1).
For n > 0, a(n) = b(n) - b(n-1) + c(n) - c(n-1), where b(n) = floor(sqrt(2n/3+1/36)+1/6) (= A180447(n)) and c(n) = floor(sqrt(2n/3+1/36)-1/6) (= A085141(n)). - Mikael Aaltonen, Mar 08 2015
a(n) = (-1)^n * A133985(n). - Michael Somos, Jul 12 2015
a(n) = A000009(n) (mod 2). - John M. Campbell, Jun 29 2016
Sum_{k=1..n} a(k) ~ c * sqrt(n), where c = 2*sqrt(2/3) = 1.632993... . - Amiram Eldar, Jan 13 2024

Extensions

Minor edits by N. J. A. Sloane, Feb 03 2012

A090864 Complement of generalized pentagonal numbers (A001318).

Original entry on oeis.org

3, 4, 6, 8, 9, 10, 11, 13, 14, 16, 17, 18, 19, 20, 21, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 52, 53, 54, 55, 56, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84
Offset: 1

Views

Author

Jon Perry, Feb 12 2004

Keywords

Comments

Also n for which A006906(n) is even, or equivalently n for which A000009(n) is even (since A006906 and A000009 have the same parity).
The number of partitions of a(n) into distinct parts with an even number of parts equals the number of such partitions with an odd number of parts: A067661(a(n)) = A067659(a(n)). See, e.g., the Freitag-Busam reference, p. 410 given in A036499. - Wolfdieter Lang, Jan 19 2016

Crossrefs

Programs

  • Mathematica
    Complement[Range[200], Select[Accumulate[Range[0,200]]/3, IntegerQ]] (* G. C. Greubel, Jun 06 2017 *)
  • PARI
    a(n) = my(q,r); [q,r]=divrem(sqrtint(24*n),3); n + q + (r >= bitnegimply(1,q)); \\ Kevin Ryde, Sep 15 2024
  • Python
    from math import isqrt
    def A090864(n):
        def f(x): return n+(m:=isqrt(24*x+1)+1)//6+(m-2)//6
        kmin, kmax = 0,1
        while f(kmax) > kmax:
            kmax <<= 1
        while kmax-kmin > 1:
            kmid = kmax+kmin>>1
            if f(kmid) <= kmid:
                kmax = kmid
            else:
                kmin = kmid
        return kmax # Chai Wah Wu, Aug 29 2024
    

Formula

A080995(a(n)) = 0; A000009(a(n)) = A118303(n). - Reinhard Zumkeller, Apr 22 2006
A010815(a(n)) = A067661(a(n)) - A067659(a(n)) = 0, n >= 1. See a comment above. - Wolfdieter Lang, Jan 19 2016
a(n) = n+1 + A085141(n-1) + A111651(n). - Kevin Ryde, Sep 15 2024

Extensions

More terms from Reinhard Zumkeller, Apr 22 2006
Edited by Ray Chandler, Dec 14 2011
Edited by Jon E. Schoenfield, Nov 25 2016

A195310 Triangle read by rows with T(n,k) = n - A001318(k), n >= 1, k >= 1, if (n - A001318(k)) >= 0.

Original entry on oeis.org

0, 1, 0, 2, 1, 3, 2, 4, 3, 0, 5, 4, 1, 6, 5, 2, 0, 7, 6, 3, 1, 8, 7, 4, 2, 9, 8, 5, 3, 10, 9, 6, 4, 11, 10, 7, 5, 0, 12, 11, 8, 6, 1, 13, 12, 9, 7, 2, 14, 13, 10, 8, 3, 0, 15, 14, 11, 9, 4, 1, 16, 15, 12, 10, 5, 2, 17, 16, 13, 11, 6, 3, 18, 17, 14, 12, 7, 4
Offset: 1

Views

Author

Omar E. Pol, Sep 21 2011

Keywords

Comments

Also triangle read by rows in which column k lists the nonnegative integers A001477 starting at the row A001318(k). This sequence is related to Euler's Pentagonal Number Theorem. A000041(a(n)) gives the absolute value of A175003(n). To get the number of partitions of n see the example.

Examples

			Written as a triangle:
   0;
   1,  0;
   2,  1;
   3,  2;
   4,  3,  0;
   5,  4,  1;
   6,  5,  2,  0;
   7,  6,  3,  1;
   8,  7,  4,  2;
   9,  8,  5,  3;
  10,  9,  6,  4;
  11, 10,  7,  5,  0;
  12, 11,  8,  6,  1;
  13, 12,  9,  7,  2;
  14, 13, 10,  8,  3,  0;
.
For n = 15, consider row 15 which lists the numbers 14, 13, 10, 8, 3, 0. From Euler's Pentagonal Number Theorem we have that the number of partitions of 15 is p(15) = p(14) + p(13) - p(10) - p(8) + p(3) + p(0) = 135 + 101 - 42 - 22 + 3 + 1 = 176.
		

Crossrefs

Programs

Formula

A175003(n,k) = A057077(k-1)*A000041(T(n,k)), n >= 1, k >= 1.

Extensions

Name essentially suggested by Franklin T. Adams-Watters (see history), Sep 21 2011

A260672 Table read by rows: T(n,k) = n - A001318(k), k = 0 .. A193832(n)-1.

Original entry on oeis.org

0, 1, 0, 2, 1, 0, 3, 2, 1, 4, 3, 2, 5, 4, 3, 0, 6, 5, 4, 1, 7, 6, 5, 2, 0, 8, 7, 6, 3, 1, 9, 8, 7, 4, 2, 10, 9, 8, 5, 3, 11, 10, 9, 6, 4, 12, 11, 10, 7, 5, 0, 13, 12, 11, 8, 6, 1, 14, 13, 12, 9, 7, 2, 15, 14, 13, 10, 8, 3, 0, 16, 15, 14, 11, 9, 4, 1, 17, 16
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 15 2015

Keywords

Comments

Column k starts at row A001318(k); each column = A001477.

Examples

			.   0:    0
.   1:    1   0
.   2:    2   1   0
.   3:    3   2   1
.   4:    4   3   2
.   5:    5   4   3   0
.   6:    6   5   4   1
.   7:    7   6   5   2   0
.   8:    8   7   6   3   1
.   9:    9   8   7   4   2
.  10:   10   9   8   5   3
.  11:   11  10   9   6   4
.  12:   12  11  10   7   5   0
.  13:   13  12  11   8   6   1
.  14:   14  13  12   9   7   2
.  15:   15  14  13  10   8   3   0
.  16:   16  15  14  11   9   4   1
.  17:   17  16  15  12  10   5   2
.  18:   18  17  16  13  11   6   3
.  19:   19  18  17  14  12   7   4
.  20:   20  19  18  15  13   8   5  .
		

Crossrefs

Cf. A001318, A193832 (row lengths), A000041, A087960, A054440, A260664, A260706 (row sums).

Programs

  • Haskell
    a260672 n k = a260672_tabf !! n !! k
    a260672_row n = a260672_tabf !! n
    a260672_tabf = map (takeWhile (>= 0) . flip map a001318_list . (-)) [0..]

Formula

Number of m-tuples of partitions of n that have no part in common = Sum(A087960(k)*A000041(T(n,k))^m: k = 0 .. A193832(n+1)-1), e.g. A054440 (m=2) and A260664 (m=3); see Wilf link: p. 2, (3).

A290942 Number of partitions of n into distinct generalized pentagonal numbers (A001318).

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 2, 2, 1, 1, 0, 2, 2, 2, 3, 1, 2, 2, 2, 3, 2, 4, 3, 3, 3, 2, 5, 4, 5, 4, 2, 3, 3, 6, 6, 5, 5, 4, 5, 7, 8, 8, 7, 6, 6, 6, 8, 9, 9, 9, 7, 8, 9, 9, 11, 10, 11, 11, 10, 12, 10, 14, 15, 14, 14, 11, 13, 13, 17, 17, 14, 15, 14, 17, 20, 19, 20, 20, 20, 21, 20, 21, 21, 25, 26, 23, 22, 21, 24, 27
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 14 2017

Keywords

Examples

			a(15) = 3 because we have [15], [12, 2, 1] and [7, 5, 2, 1].
		

Crossrefs

Programs

  • Mathematica
    nmax = 90; CoefficientList[Series[Product[(1 + x^(k (3 k - 1)/2)) (1 + x^(k (3 k + 1)/2)), {k, 1, nmax}], {x, 0, nmax}], x]

Formula

G.f.: Product_{k>=1} (1 + x^(k*(3*k-1)/2))*(1 + x^(k*(3*k+1)/2)).

A270594 Number of ordered ways to write n as the sum of a triangular number, a positive square and the square of a generalized pentagonal number (A001318).

Original entry on oeis.org

1, 2, 1, 2, 4, 2, 2, 4, 2, 3, 5, 2, 2, 3, 3, 4, 3, 2, 4, 5, 1, 2, 5, 1, 3, 7, 3, 2, 6, 5, 3, 6, 2, 2, 5, 4, 6, 4, 3, 5, 8, 2, 2, 6, 2, 5, 5, 1, 4, 9, 5, 3, 8, 5, 4, 8, 4, 3, 5, 5, 5, 6, 3, 6, 11, 2, 3, 9, 2, 5, 12, 2, 2, 9, 6, 3, 4, 4, 5, 6, 6, 6, 5, 5, 6, 11, 2, 4, 8, 1
Offset: 1

Views

Author

Zhi-Wei Sun, Mar 19 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 3, 21, 24, 48, 90, 138, 213, 283, 462, 468, 567, 573, 1998, 2068, 2488, 2687, 5208, 5547, 5638, 6093, 6492, 6548, 6717, 7538, 7731, 8522, 14763, 16222, 17143, 24958, 26148.
(ii) Let T(x) = x(x+1)/2, pen(x) = x(3x+1)/2 and hep(x) = x(5x+3)/2. Then any natural number can be written as P(x,y,z) with x, y and z integers, where P(x,y,z) is either of the following polynomials: T(x)^2+T(y)+z(5z+1)/2, T(x)^2+T(y)+z(3z+j) (j = 1,2), T(x)^2+y^2+pen(z), T(x)^2+pen(y)+hep(z), T(x)^2+pen(y)+z(7z+j)/2 (j = 1,3,5), T(x)^2+pen(y)+z(4z+j) (j = 1,3), T(x)^2+pen(y)+z(5z+j) (j = 1,3,4), T(x)^2+pen(y)+z(11z+7)/2, T(x)^2+y(5y+1)/2+z(3z+2), T(x)^2+hep(y)+z(3z+2), pen(x)^2+T(y)+pen(z), pen(x)^2+T(y)+2*pen(z), pen(x)^2+T(y)+z(9z+7)/2, pen(x)^2+y^2+pen(z), pen(x)^2+2*T(y)+pen(z), pen(x)^2+pen(y)+3*T(z), pen(x)^2+pen(y)+2z^2, pen(x)^2+pen(y)+2*pen(z), pen(x)^2+pen(y)+z(7z+j)/2 (j = 1,3,5), pen(x)^2+pen(y)+z(4z+3), pen(x)^2+pen(y)+z(9z+1)/2, pen(x)^2+pen(y)+3*pen(z), pen(x)^2+pen(y)+z(5z+j) (j = 1,2,3,4), pen(x)^2+pen(y)+z(11z+j)/2 (j = 7,9), pen(x)^2+pen(y)+z(7z+1), pen(x)^2+pen(y)+3*hep(z), pen(x)^2+y(5y+j)/2+z(3z+k) (j = 1,3; k = 1,2), pen(x)^2+hep(y)+z(7z+j)/2 (j = 1,3,5), pen(x)^2+hep(y)+z(9z+5)/2, pen(y)^2+2pen(y)+z(3z+2), pen(x)^2+2*pen(y)+3*pen(z), (x(5x+1)/2)^2+2*T(y)+pen(z), (x(5x+1)/2)^2+pen(y)+z(7z+3)/2, (x(5x+1)/2)^2+pen(y)+z(4z+1), (x(5x+1)/2)^2+hep(y)+2*pen(z), hep(x)^2+T(y)+2*pen(z), hep(x)^2+pen(y)+z(7z+j)/2 (j = 1,3,5), hep(x)^2+pen(y)+z(4z+1), hep(x)^2+pen(y)+z(5z+4), 4*pen(x)^2+T(y)+hep(z), 4*pen(x)^2+T(y)+2*pen(z), 4*pen(x)^2+pen(y)+z(7z+j)/2 (j = 1,3,5), (x(3x+2))^2+y^2+pen(z), (x(3x+2))^2+pen(y)+z(7z+j)/2 (j = 3,5), 2*T(x)^2+T(y)+z(3z+j) (j = 1,2), 2*T(x)^2+y^2+pen(z), 2*T(x)^2+2*T(y)+pen(z), 2*T(x)^2+pen(y)+z(7z+j)/2 (j = 1,5), 2*T(x)^2+pen(y)+z(5z+1), 2*pen(y)^2+T(y)+z(3z+2), 2*pen(x)^2+y^2+pen(z), 2*pen(x)^2+pen(y)+z(7z+3)/2, 2*pen(x)^2+pen(y)+z(4z+j) (j = 1,3), 2*pen(x)^2+pen(y)+z(5z+4), 2*pen(x)^2+pen(y)+z(7z+1), 2*pen(x)^2+hep(y)+2*pen(z), 2*hep(x)^2+pen(y)+z(7z+5)/2, 3*pen(x)^2+T(y)+z(3z+2), 3*pen(x)^2+y^2+pen(z), 3*pen(x)^2+2*T(y)+pen(z), 3*pen(x)^2+pen(y)+z(7z+j)/2 (j = 1,3,5), 3*pen(x)^2+pen(y)+z(4z+1), 6*pen(x)^2+pen(y)+z(7z+3)/2.
See also A270566 for a similar conjecture involving four powers.
It is known that any positive integer can be written as the sum of a triangular number, a square and an odd square.

Examples

			a(21) = 1 since 21 = 1*2/2 + 4^2 + (1*(3*1+1)/2)^2.
a(24) = 1 since 24 = 5*6/2 + 3^2 + (0*(3*0-1)/2)^2.
a(468) = 1 since 468 = 0*1/2 + 18^2 + (3*(3*3-1)/2)^2.
a(7538) = 1 since 7538 = 64*65/2 + 47^2 + (6*(3*6+1)/2)^2.
a(7731) = 1 since 7731 = 82*83/2 + 62^2 + (4*(3*4-1)/2)^2.
a(8522) = 1 since 8522 = 127*128/2 + 13^2 + (3*(3*3+1)/2)^2.
a(14763) = 1 since 14763 = 164*165/2 + 33^2 + (3*(3*3-1)/2)^2.
a(16222) = 1 since 16222 = 168*169/2 + 45^2 + (1*(3*1-1)/2)^2.
a(17143) = 1 since 17143 = 182*183/2 + 21^2 + (2*(3*2+1)/2)^2.
a(24958) = 1 since 24958 = 216*217/2 + 39^2 + (1*(3*1-1)/2)^2.
a(26148) = 1 since 26148 = 10*11/2 + 142^2 + (7*(3*7+1)/2)^2.
		

Crossrefs

Programs

  • Mathematica
    pQ[n_]:=pQ[n]=IntegerQ[n]&&IntegerQ[Sqrt[24n+1]]
    Do[r=0;Do[If[pQ[Sqrt[n-x^2-y(y+1)/2]],r=r+1],{x,1,Sqrt[n]},{y,0,(Sqrt[8(n-x^2)+1]-1)/2}];Print[n," ",r];Continue,{n,1,90}]

A341418 Triangle read by rows: T(n, m) gives the sum of the weights of weighted compositions of n with m parts from generalized pentagonal numbers {A001318(k)}_{k>=1}.

Original entry on oeis.org

1, 1, 1, 0, 2, 1, 0, 1, 3, 1, -1, 0, 3, 4, 1, 0, -2, 1, 6, 5, 1, -1, -2, -3, 4, 10, 6, 1, 0, -2, -6, -3, 10, 15, 7, 1, 0, -2, -6, -12, 0, 20, 21, 8, 1, 0, 1, -6, -16, -19, 9, 35, 28, 9, 1, 0, 0, 0, -16, -35, -24, 28, 56, 36, 10, 1, 1, 2, 3, -6, -40, -65, -21, 62, 84, 45, 11, 1
Offset: 1

Views

Author

Wolfdieter Lang, Feb 15 2021

Keywords

Comments

The sums of row n are given in A000041(n), for n >= 1 (number of partitions).
A differently signed triangle is A047265.
One could add a column m = 0 starting at n = 0 with T(0, 0) = 1 and T(n, 0) = 0 otherwise, by including the empty partition with no parts.
For the weights w of positive integer numbers n see a comment in A339885. It is w(n) = -A010815(n), for n >= 0. Also w(n) = A257628(n), for n >= 1.
The weight of a composition is the one of the respective partition, obtained by the product of the weights of the parts.
That the row sums give the number of partitions follows from the pentagonal number theorem. See also the Apr 04 2013 conjecture in A000041 by Gary W. Adamson, and the hint for the proof by Joerg Arndt. The INVERT map of A = {1, 1, 0, 0, -5, -7, ...}, with offset 1, gives the A000041(n) numbers, for n >= 0.
If the above mentioned column for m = 0, starting at n = 0 is added this is an ordinary convolution triangle of the Riordan type R(1, f(x)), with f(x) = -(Product_{j>=1} (1 - x^j) - 1), generating {A257628(n)}{n>=0}. See the formulae below. - _Wolfdieter Lang, Feb 16 2021

Examples

			The triangle T(n, m) begins:
  n\m   1  2  3   4   5   6   7  8  9 10 11 12 ... A000041
  --------------------------------------------------------
  1:    1                                                1
  2:    1  1                                             2
  3:    0  2  1                                          3
  4:    0  1  3   1                                      5
  5:   -1  0  3   4   1                                  7
  6:    0 -2  1   6   5   1                             11
  7:   -1 -2 -3   4  10   6   1                         15
  8:    0 -2 -6  -3  10  15   7  1                      22
  9:    0 -2 -6 -12   0  20  21  8  1                   30
  10:   0  1 -6 -16 -19   9  35 28  9  1                42
  11:   0  0  0 -16 -35 -24  28 56 36 10  1             56
  12:   1  2  3  -6 -40 -65 -21 62 84 45 11  1          77
  ...
For instance the case n = 6: The relevant weighted partitions with parts from the pentagonal numbers and number of compositions are: m = 2: 2*(1,-5) = -2*(1,5), m = 3: 1*(2^3), m = 4: 3*(1^2,2^2), m = 5: 1*(1^4,2), m = 6: 1*(1^6). The other partitions have weight 0.
		

Crossrefs

Cf. A000041, A008284, A010815, A047265, A257628, -A307059 (alternating row sums), A339885 (for partitions).

Programs

  • Maple
    # Using function PMatrix from A357368. Adds a row and a column for n, m = 0.
    PMatrix(14, proc(n) 24*n+1; if issqr(%) then sqrt(%); -(-1)^irem(iquo(%+irem(%,6),6),2) else 0 fi end); # Peter Luschny, Oct 06 2022
  • Mathematica
    nmax = 12;
    col[m_] := col[m] = (-(Product[(1-x^j), {j, 1, nmax}]-1))^m // CoefficientList[#, x]&;
    T[n_, m_] := col[m][[n+1]];
    Table[T[n, m], {n, 1, nmax}, {m, 1, n}] // Flatten (* Jean-François Alcover, Oct 23 2023 *)

Formula

T(n, m) = Sum_{j=1..p(n,m)} w(Part(n, m, j))*M0(n, m, j), where p(n, m) = A008284(n, m), M0(n, m, j) are the multinomials from A048996, i.e., m!/Prod_{k=1..m} e(n,m,j,k)! with the exponents of the parts, and the ternary weight of the j-th partition of n with m parts Part(n,m,j), in Abramowitz-Stegun order, is defined as the product of the weights of the parts, using w(n) = -A010815(n), for n >= 1, and m = 1, 2, ..., n.
From Wolfdieter Lang, Feb 16 2021: (Start)
G.f. column m: G(m, x) = ( -(Product_{j>=1} (1 - x^j) - 1) )^m, for m >= 1.
G.f. of row polynomials R(n, x) = Sum_{m=1..n}, that is g. f. of the triangle:
GfT(z, x) = 1/(1 - x*G(1, z)) - 1. Riordan triangle (without m = 0 column). (End)

A270616 Number of ordered ways to write n as the sum of a positive square, the square of a triangular number, and a generalized pentagonal number (A001318).

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 20 2016

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 8, 29, 34, 5949, 10913.
See also A270566 and A270594 for more similar conjectures.
By the author's work in Sci. China Math. 58(2015), any natural number can be written as the sum of a triangular number, a square and a generalized pentagonal number.

Examples

			a(1) = 1 since 1 = 1^2 + (0*1/2)^2 + 0*(3*0+1)/2.
a(8) = 1 since 8 = 1^2 + (0*1/2)^2 + 2*(3*2+1)/2.
a(29) = 1 since 29 = 4^2 + (1*2/2)^2 + 3*(3*3-1)/2.
a(34) = 1 since 34 = 5^2 + (2*3/2)^2 + 0*(3*0+1)/2.
a(5949) = 1 since 5949 = 47^2 + (10*11/2)^2 + 22*(3*22-1)/2.
a(10913) = 1 since 10913 = 23^2 + (2*3/2)^2 +83*(3*83+1)/2.
		

Crossrefs

Programs

  • Mathematica
    pQ[n_]:=pQ[n]=IntegerQ[Sqrt[24n+1]]
    Do[r=0;Do[If[pQ[n-x^2-(y(y+1)/2)^2],r=r+1],{x,1,Sqrt[n]},{y,0,(Sqrt[8*Sqrt[n-x^2]+1]-1)/2}];Print[n," ",r];Continue,{n,1,80}]

A124458 Triangular array resulting from summing three repeated Pascal sequences; related to the generalized pentagonal sequence (A001318) and the classical modular tessellation (cf. A054886).

Original entry on oeis.org

1, 2, 1, 3, 2, 1, 3, 4, 2, 1, 3, 5, 5, 2, 1, 3, 7, 7, 6, 2, 1, 3, 8, 12, 9, 7, 2, 1, 3, 10, 15, 18, 11, 8, 2, 1, 3, 11, 22, 24, 25, 13, 9, 2, 1, 3, 13, 26, 40, 35, 33, 15, 10, 2, 1
Offset: 1

Views

Author

Alford Arnold, Nov 04 2006

Keywords

Comments

The third diagonal is the generalized pentagonal sequence A001318

Examples

			Consider
1.......1.......6.......6.......21......21....
........1.......1.......6.......6.......21....
................1.......1.......6.......6.....
which sums to
1.....2....8.....13....33....48....,
a diagonal of A124458
		

Crossrefs

A160166 Toothpick number A153006(n) minus generalized pentagonal number A001318(n).

Original entry on oeis.org

0, 0, 1, 1, 2, 1, 5, 6, 7, 2, 4, 2, 6, 8, 23, 28, 29, 16, 14, 4, 4, -2, 9, 7, 9, -1, 9, 10, 31, 54, 103, 120, 121, 92, 82, 56, 48, 26, 29, 11, 5, -21, -19, -34, -21, -14, 27, 29, 27, -7, -9, -32, -23, -24
Offset: 0

Views

Author

Omar E. Pol, May 23 2009

Keywords

Crossrefs

Formula

a(n) = A153006(n) - A001318(n).

Extensions

a(11) corrected and more terms from Nathaniel Johnston, Mar 22 2011
Showing 1-10 of 274 results. Next