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-7 of 7 results.

A213250 Numbers n such that the coefficient of x^n in the expansion of Product_{k>=1} (1-x^k)^2 is zero.

Original entry on oeis.org

7, 11, 12, 17, 18, 21, 22, 25, 32, 37, 39, 41, 42, 43, 46, 47, 49, 54, 57, 58, 60, 62, 65, 67, 68, 72, 74, 75, 76, 81, 82, 87, 88, 90, 92, 95, 97, 98, 99, 106, 107, 109, 111, 112, 113, 116, 117, 120, 122, 123, 125, 126, 128, 130, 132, 136, 137
Offset: 1

Views

Author

William J. Keith, Jun 07 2012

Keywords

Comments

Indices of zero entries in A002107.
Asymptotic density is 1.
Contains A093519, numbers with no representation as sum of two or fewer pentagonal numbers.

Crossrefs

Numbers k such that the coefficient of x^k in the expansion of Product_{j>=1} (1 - x^j)^m is zero: A090864 (m=1), this sequence (m=2), A014132 (m=3), A302056 (m=4), A302057 (m=5), A020757 (m=6), A322043 (m=15).

Programs

  • Julia
    # DedekindEta is defined in A000594.
    function A213250List(upto)
        eta = DedekindEta(upto, 2)
        [n - 1 for (n, z) in enumerate(eta) if z == 0] end
    println(A213250List(140))  # Peter Luschny, Jul 19 2022
  • Mathematica
    LongPoly = Series[Product[1 - q^n, {n, 1, 300}]^2, {q, 0, 300}]; ZeroTable = {}; For[i = 1, i < 301, i++, If[Coefficient[LongPoly, q^i] == 0, AppendTo[ZeroTable, i]]]; ZeroTable
  • PARI
    x='x+O('x^200);
    v=Vec(eta(x)^2 - 1);
    for(k=1,#v,if(v[k]==0,print1(k,", ")));
    /* Joerg Arndt, Jun 07 2012 */
    

A203860 G.f.: Product_{n>=1} (1 - Lucas(n)*x^n + (-1)^n*x^(2*n)) where Lucas(n) = A000204(n).

Original entry on oeis.org

1, -1, -4, -1, 1, 11, 7, 25, 18, -11, -1, 0, -325, -199, 122, -1364, -843, 550, 0, 11, 123, 0, 39650, 24476, -15126, 0, 271443, 164194, -103682, -1364, -1, -24476, 0, -9349, -123, -20633239, -12752043, 7881225, -843, 0, -226965629, -141422125, 88114450, 0, 1
Offset: 0

Views

Author

Paul D. Hanna, Jan 07 2012

Keywords

Comments

a(A093519(n)) = 0 where A093519 lists numbers that are not equal to the sum of two generalized pentagonal numbers.

Examples

			G.f.: A(x) = 1 - x - 4*x^2 - x^3 + x^4 + 11*x^5 + 7*x^6 + 25*x^7 +...
-log(A(x)) = x + 3*3*x^2/2 + 4*4*x^3/3 + 7*7*x^4/4 + 6*11*x^5/5 + 12*18*x^6/6 +...+ sigma(n)*A000204(n)*x^n/n +...
The g.f. equals the product:
A(x) = (1-x-x^2) * (1-3*x^2+x^4) * (1-4*x^3-x^6) * (1-7*x^4+x^8) * (1-11*x^5-x^10) * (1-18*x^6+x^12) *...* (1 - Lucas(n)*x^n + (-1)^n*x^(2*n)) *...
Positions of zeros form A093519:
[11,18,21,25,32,39,43,46,49,54,60,65,67,68,74,76,81,87,88,90,...]
which are numbers that are not the sum of two generalized pentagonal numbers.
		

Crossrefs

Programs

  • PARI
    /* Subroutine used in PARI programs below: */
    {Lucas(n)=fibonacci(n-1)+fibonacci(n+1)}
    
  • PARI
    {a(n)=polcoeff(exp(sum(k=1, n, -sigma(k)*Lucas(k)*x^k/k)+x*O(x^n)), n)}
    
  • PARI
    {a(n)=polcoeff(prod(m=1, n, 1 - Lucas(m)*x^m + (-1)^m*x^(2*m) +x*O(x^n)), n)}

Formula

G.f.: exp( Sum_{n>=1} -sigma(n) * A000204(n) * x^n/n ).

A093518 Number of ways of representing n as the sum of two (not necessarily distinct) generalized pentagonal numbers.

Original entry on oeis.org

1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 0, 2, 1, 2, 1, 1, 2, 0, 1, 1, 0, 2, 1, 2, 0, 1, 3, 1, 1, 1, 1, 0, 1, 1, 1, 1, 2, 1, 0, 2, 2, 2, 0, 1, 1, 0, 2, 1, 0, 1, 1, 3, 1, 0, 1, 1, 2, 2, 1, 0, 1, 2, 1, 1, 0, 2, 0, 0, 1, 2, 1, 2, 1, 0, 2, 0, 3, 1, 2, 1, 0, 2, 1, 1, 1, 1, 0, 0, 1, 0, 1, 4, 1, 1, 0, 1, 2, 0, 2, 1, 1, 2, 1
Offset: 0

Views

Author

Jon Perry, Mar 29 2004

Keywords

Examples

			a(7)=2 as we have 7+0 = 5+2.
		

Crossrefs

Cf. A001318 (generalized pentagonal numbers), A093519 (where a(n)=0).

Programs

  • Maple
    GP:= [0,seq(op([m*(3*m-1)/2, m*(3*m+1)/2]),m=1..11)]:
    V:= Array(0..200):
    for i from 1 to 23 do
      for j from 1 to i do
        r:= GP[i]+GP[j];
        if r > 200 then break fi;
        V[r]:= V[r]+1
    od od:
    convert(V,list); # Robert Israel, Feb 26 2025
  • PARI
    { v=vector(101); v[1]=0; for (i=1,50, v[2*i]=i*(3*i-1)/2; v[2*i+1]=i*(3*i+1)/2); x=vector(500); for (a=1,50, for (b=a,50, if (v[a]+v[b]<500, x[v[a]+v[b]+1]++))); x }

Extensions

Definition clarified by Robert Israel, Feb 26 2025

A204382 G.f.: Product_{n>=1} (1 - A002203(n)*x^n + (-1)^n*x^(2*n)) where A002203(n) is the companion Pell numbers.

Original entry on oeis.org

1, -2, -7, -2, 1, 82, 34, 464, 198, -82, -1, 0, -39208, -16238, 6725, -551614, -228486, 95120, 0, 82, 6726, 0, 263673800, 109216786, -45239073, 0, 8957108166, 3706940654, -1536796802, -551614, -1, -109216786, 0, -18738638, -6726, -24954506565518, -10336495061766
Offset: 0

Views

Author

Paul D. Hanna, Jan 14 2012

Keywords

Comments

a(A093519(n)) = 0 where A093519 lists numbers that are not equal to the sum of two generalized pentagonal numbers.

Examples

			G.f.: A(x) = 1 - 2*x - 7*x^2 - 2*x^3 + x^4 + 82*x^5 + 34*x^6 + 464*x^7 +...
-log(A(x)) = 1*2*x + 3*6*x^2/2 + 4*14*x^3/3 + 7*34*x^4/4 + 6*82*x^5/5 + 12*198*x^6/6 +...+ sigma(n)*A002203(n)*x^n/n +...
The g.f. equals the product:
A(x) = (1-2*x-x^2) * (1-6*x^2+x^4) * (1-14*x^3-x^6) * (1-34*x^4+x^8) * (1-82*x^5-x^10) * (1-198*x^6+x^12) *...* (1 - A002203(n)*x^n + (-1)^n*x^(2*n)) *...
Positions of zeros form A093519:
[11,18,21,25,32,39,43,46,49,54,60,65,67,68,74,76,81,87,88,90,...].
which are numbers that are not the sum of two generalized pentagonal numbers.
		

Crossrefs

Programs

  • PARI
    /* Subroutine used in PARI programs below: */
    {A002203(n)=polcoeff(2*(1-x)/(1-2*x-x^2+x*O(x^n)), n)}
    
  • PARI
    {a(n)=polcoeff(exp(sum(k=1, n, -sigma(k)*A002203(k)*x^k/k)+x*O(x^n)), n)}
    
  • PARI
    {a(n)=polcoeff(prod(m=1, n, 1 - A002203(m)*x^m + (-1)^m*x^(2*m) +x*O(x^n)), n)}

Formula

G.f.: exp( Sum_{n>=1} -sigma(n) * A002203(n) * x^n/n ).

A355717 Smallest number of generalized pentagonal numbers which sum to n.

Original entry on oeis.org

0, 1, 1, 2, 2, 1, 2, 1, 2, 2, 2, 3, 1, 2, 2, 1, 2, 2, 3, 2, 2, 3, 1, 2, 2, 3, 1, 2, 2, 2, 2, 2, 3, 2, 2, 1, 2, 2, 2, 3, 1, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 1, 2, 2, 3, 2, 2, 1, 2, 2, 3, 2, 2, 2, 2, 3, 2, 3, 3, 2, 1, 2, 2, 2, 3, 2, 3, 1, 2, 2, 2, 3, 2, 2, 2, 2, 2, 3, 3, 2, 3, 2, 1, 2, 2, 3, 2, 2, 3, 2, 1
Offset: 0

Views

Author

Bernard Schott, Jul 15 2022

Keywords

Comments

From Euler's Pentagonal Number Theorem, every number is expressible as the sum of at most three generalized pentagonal numbers (A001318) (see Richard K. Guy reference).
Corresponding sums of only pentagonal numbers of positive rank are A100878(n). Those numbers are a subset of the generalized pentagonals so that a(n) <= A100878(n).
More specifically, by the definition given in the name, we understand the following: Given n >= 0 we seek a multiset S such that (1) S is a multiset of GPN = {0, 1, 2, 5, ...} = A001318; (2) Sum(S) = n; (3) if T is a multiset of GPN and Sum(T) = n then card(T) >= card(S). Additionally one might require that the set is not empty. If a multiset satisfies these three conditions, then a(n) = card(S). Note that no actual summation has to be performed to decide the value of a(n); only membership in GPN needs to be tested, as shown in the Maple and Python program. - Peter Luschny, Jul 18 2022

Examples

			Let GPN = {0, 1, 2, 5, ...} be the generalized pentagonal numbers.
a(0) = 0 since {} is a multiset of GPN, Sum {} = 0, and card({}) = 0.
a(1) = 1 since {1} is a multiset of GPN, Sum {1} = 1, and card({1}) = 1.
a(3) = 2 since {1, 2} is a multiset of GPN, Sum {1, 2} = 3, and card({1, 2}) = 2.
a(11) = 3 since {2, 2, 7} is a multiset of GPN, Sum {2, 2, 7} = 11, card({2, 2, 7}) = 3, and no other multiset S of GPN with Sum(S) = 11 has less members.
		

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section D3, Figurate numbers, pp. 222-228.

Crossrefs

Cf. A001318, A093519 (indices of 3's).
Cf. A100878.

Programs

  • Maple
    A355717_list := proc(upto) local P, Q, k, q, isgpn; P := []; Q := [0];
    isgpn := k -> ormap(n -> 0 = 8*k - (n + irem(n,2)) * (3*n + 2 - irem(n,2)), [$0..k]);
    for k from 1 to upto do
        q := 3;
        if isgpn(k) then
            P := [op(P), k]; q := 1;
            elif ormap(p -> member(k - p, P), P) then q := 2 fi:
            Q := [op(Q), q];
    od: Q end:
    print(A355717_list(100));  # Peter Luschny, Jul 18 2022
  • Python
    def A355717_list(ln: int) -> list[int]:
        P: list[int] = []
        Q: list[int] = [0]
        def is_gpn(k: int) -> bool:
            return any(8 * k == ((n + n % 2) * (3 * n + 2 - n % 2)) for n in range(k + 1))
        for k in range(1, ln):
            q = 3
            if is_gpn(k):
                P.append(k)
                q = 1
            elif any([(k - p) in P for p in P]):
                q = 2
            Q.append(q)
        return Q
    print(A355717_list(100))  # Peter Luschny, Jul 18 2022

Formula

a(n) <= 3.
a(A001318(n)) = 1.

A290943 Number of ways to write n as an ordered sum of 3 generalized pentagonal numbers (A001318).

Original entry on oeis.org

1, 3, 6, 7, 6, 6, 7, 12, 12, 12, 9, 6, 12, 12, 18, 13, 12, 18, 12, 18, 12, 13, 18, 12, 24, 12, 12, 24, 21, 30, 12, 18, 18, 12, 24, 18, 19, 18, 24, 24, 18, 24, 36, 24, 18, 19, 18, 24, 24, 30, 18, 12, 36, 30, 24, 21, 18, 36, 24, 36, 24, 12, 36, 36, 36, 18, 25, 30, 24, 24, 24, 30, 24, 36, 30, 24
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 14 2017

Keywords

Comments

Conjecture: every number is the sum of at most k - 4 generalized k-gonal numbers (for k >= 8).
In 1830, Legendre showed that for each integer m>4 every integer N >= 28*(m-2)^3 can be written as the sum of five m-gonal numbers. In 1994 R. K. Guy proved that each natural number is the sum of three generalized pentagonal numbers. In a 2016 paper Zhi-Wei Sun proved that each natural number is the sum of four octagonal numbers. - Zhi-Wei Sun, Oct 03 2020

Examples

			a(6) = 7 because we have [5, 1, 0], [5, 0, 1], [2, 2, 2], [1, 5, 0], [1, 0, 5], [0, 5, 1] and [0, 1, 5].
		

Crossrefs

Programs

  • Maple
    N:= 100;
    bds:= [fsolve(k*(3*k-1)/2 = N)];
    G:= add(x^(k*(3*k-1)/2),k=floor(min(bds))..ceil(max(bds)))^3:
    seq(coeff(G,x,n),n=0..N); # Robert Israel, Aug 16 2017
  • Mathematica
    nmax = 75; CoefficientList[Series[Sum[x^(k (3 k - 1)/2), {k, -nmax, nmax}]^3, {x, 0, nmax}], x]
    nmax = 75; CoefficientList[Series[Sum[x^((6 k^2 + 6 k + (-1)^(k + 1) (2 k + 1) + 1)/16), {k, 0, nmax}]^3, {x, 0, nmax}], x]
    nmax = 75; CoefficientList[Series[EllipticTheta[4, 0, x^3]^3/QPochhammer[x, x^2]^3, {x, 0, nmax}], x]

Formula

G.f.: (Sum_{k=-infinity..infinity} x^(k*(3*k-1)/2))^3.
G.f.: (Sum_{k>=0} x^A001318(k))^3.
G.f.: Product_{n >= 1} ( (1 - q^(3*n))/(1 - q^n + q^(2*n)) )^3. - Peter Bala, Jan 04 2025

A355774 An extension of the generalized pentagonal numbers such that every positive integer can be represented as the sum of at most two terms of the sequence.

Original entry on oeis.org

0, 1, 2, 5, 7, 11, 12, 15, 21, 22, 25, 26, 35, 39, 40, 49, 51, 57, 67, 70, 77, 87, 92, 100, 117, 120, 123, 126, 145, 153, 155, 173, 176, 182, 186, 187, 205, 210, 214, 222, 228, 241, 247, 251, 260, 283, 287, 301, 319, 330, 345, 376, 382, 392, 425, 435, 442, 448
Offset: 0

Views

Author

Peter Luschny, Jul 17 2022

Keywords

Comments

The sequence is defined inductively. Starting from the empty sequence, the terms are added one after the other. A term is added if it is a generalized pentagonal number or if it cannot be represented as the sum of two preceding terms. Note that these exceptions form a proper subsequence of A093519.
Thus any positive number can be expressed as the sum of at most two positive terms by Euler's Pentagonal Number Theorem. Every pentagonal number and every generalized pentagonal number is in this sequence.

Examples

			32 = 7 + 25; 195 = 22 + 173.
		

Crossrefs

Cf. A000326, A001318, A093519, A100878, A355717, A176747 (same construction with triangular numbers).

Programs

  • Maple
    A355774_list := proc(upto) local P, k, issum, isgpn; P := [];
    isgpn := k -> ormap(n -> 0 = 8*k-(n+irem(n,2))*(3*n+2-irem(n,2)), [$0..k]);
    issum := k -> ormap(p -> member(k - p, P), P);
    for k from 0 to upto do
        if isgpn(k) or not issum(k) then P := [op(P), k] fi od;
    P end: print(A355774_list(448));
  • Mathematica
    isgpn[k_] := AnyTrue[Range[0, k], 0 == 8*k-(#+Mod[#,2])*(3*#+2-Mod[#,2])&];
    issum[k_] := AnyTrue[P, MemberQ[P, k-#]&];
    P = {};
    For[k = 0, k <= 448, k++, If[isgpn[k] || !issum[k], AppendTo[P, k]]];
    P (* Jean-François Alcover, Mar 07 2024, after Peter Luschny *)
  • Python
    def A355774_list(upto: int) -> list[int]:
        P: list[int] = []
        for k in range(upto + 1):
            if any(
                k == ((n + n % 2) * (3 * n + 2 - n % 2)) >> 3
                for n in range(k + 1)
            ) or not any([(k - p) in P for p in P]):
                P.append(k)
        return P
    print(A355774_list(448))
Showing 1-7 of 7 results.