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

A053251 Coefficients of the '3rd-order' mock theta function psi(q).

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 5, 5, 6, 7, 8, 9, 11, 12, 13, 16, 17, 19, 22, 24, 27, 31, 34, 37, 42, 46, 51, 57, 62, 68, 76, 83, 91, 101, 109, 120, 132, 143, 156, 171, 186, 202, 221, 239, 259, 283, 306, 331, 360, 388, 420, 455, 490, 529, 572, 616, 663, 716, 769, 827
Offset: 0

Views

Author

Dean Hickerson, Dec 19 1999

Keywords

Comments

Number of partitions of n into odd parts such that if a number occurs as a part then so do all smaller positive odd numbers.
Number of ways to express n as a partial sum of 1 + [1,3] + [1,5] + [1,7] + [1,9] + .... E.g., a(6)=2 because we have 6 = 1+1+1+1+1+1 = 1+3+1+1. - Jon Perry, Jan 01 2004
Also number of partitions of n such that the largest part occurs exactly once and all the other parts occur exactly twice. Example: a(9)=4 because we have [9], [7,1,1], [5,2,2] and [3,2,2,1,1]. - Emeric Deutsch, Mar 08 2006
Number of partitions (d1,d2,...,dm) of n such that 0 < d1/1 < d2/2 < ... < dm/m. - Seiichi Manyama, Mar 17 2018
For Emeric Deutsch's comment above, (1) this appears to be an alternately equal case of A122130, (2) the ordered version (compositions) is A239327, (3) allowing any length gives A351006, (4) the even-length version is A351007. - Gus Wiseman, Feb 25 2022

Examples

			q + q^2 + q^3 + 2*q^4 + 2*q^5 + 2*q^6 + 3*q^7 + 3*q^8 + 4*q^9 + ...
From _Seiichi Manyama_, Mar 17 2018: (Start)
n | Partition (d1,d2,...,dm) | (d1/1, d2/2, ... , dm/m)
--+--------------------------+-------------------------
1 | (1)                      | (1)
2 | (2)                      | (2)
3 | (3)                      | (3)
4 | (4)                      | (4)
  | (1, 3)                   | (1, 3/2)
5 | (5)                      | (5)
  | (1, 4)                   | (1, 2)
6 | (6)                      | (6)
  | (1, 5)                   | (1, 5/2)
7 | (7)                      | (7)
  | (1, 6)                   | (1, 3)
  | (2, 5)                   | (2, 5/2)
8 | (8)                      | (8)
  | (1, 7)                   | (1, 7/2)
  | (2, 6)                   | (2, 3)
9 | (9)                      | (9)
  | (1, 8)                   | (1, 4)
  | (2, 7)                   | (2, 7/2)
  | (1, 3, 5)                | (1, 3/2, 5/3) (End)
		

References

  • N. J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 55, Eq. (26.13).
  • Srinivasa Ramanujan, Collected Papers, Chelsea, New York, 1962, pp. 354-355.
  • Srinivasa Ramanujan, The Lost Notebook and Other Unpublished Papers, Narosa Publishing House, New Delhi, 1988, p. 31.

Crossrefs

Other '3rd-order' mock theta functions are at A000025, A053250, A053252, A053253, A053254, A053255.
Cf. A003475.

Programs

  • Maple
    f:=n->q^(n^2)/mul((1-q^(2*i+1)),i=0..n-1); add(f(i),i=1..6);
    # second Maple program:
    b:= proc(n, i) option remember; (s-> `if`(n>s, 0, `if`(n=s, 1,
          b(n, i-1)+b(n-i, min(n-i, i-1)))))(i*(i+1)/2)
        end:
    a:= n-> `if`(n=0, 0, add(b(j, min(j, n-2*j-1)), j=0..iquo(n, 2))):
    seq(a(n), n=0..80);  # Alois P. Heinz, May 17 2018
  • Mathematica
    Series[Sum[q^n^2/Product[1-q^(2k-1), {k, 1, n}], {n, 1, 10}], {q, 0, 100}]
    (* Second program: *)
    b[n_, i_] := b[n, i] = Function[s, If[n > s, 0, If[n == s, 1, b[n, i - 1] + b[n - i, Min[n - i, i - 1]]]]][i*(i + 1)/2];
    a[n_] := If[n==0, 0, Sum[b[j, Min[j, n-2*j-1]], {j, 0, Quotient[n, 2]}]];
    Table[a[n], {n, 0, 80}] (* Jean-François Alcover, Jun 17 2018, after Alois P. Heinz *)
  • PARI
    { n=20; v=vector(n); for (i=1,n,v[i]=vector(2^(i-1))); v[1][1]=1; for (i=2,n, k=length(v[i-1]); for (j=1,k, v[i][j]=v[i-1][j]+1; v[i][j+k]=v[i-1][j]+2*i-1)); c=vector(n); for (i=1,n, for (j=1,2^(i-1), if (v[i][j]<=n, c[v[i][j]]++))); c } \\ Jon Perry
    
  • PARI
    {a(n) = local(t); if(n<0, 0, t = 1 + O(x^n); polcoeff( sum(k=1, sqrtint(n), t *= x^(2*k-1) / (1 - x^(2*k-1)) + O(x^(n-(k-1)^2+1))), n))} /* Michael Somos, Sep 04 2007 */

Formula

G.f.: psi(q) = Sum_{n>=1} q^(n^2) / ( (1-q)*(1-q^3)*...*(1-q^(2*n-1)) ).
G.f.: Sum_{k>=1} q^k*Product_{j=1..k-1} (1+q^(2*j)) (see the Fine reference, p. 58, Eq. (26,53)). - Emeric Deutsch, Mar 08 2006
a(n) ~ exp(Pi*sqrt(n/6)) / (4*sqrt(n)). - Vaclav Kotesovec, Jun 09 2019

Extensions

More terms from Emeric Deutsch, Mar 08 2006

A291941 Number of Carlitz compositions of n that either have length 1, or have length greater than or equal to 2 and are palindromic if we exclude the first part.

Original entry on oeis.org

1, 1, 3, 3, 5, 7, 9, 13, 19, 21, 31, 45, 53, 73, 101, 129, 171, 233, 295, 407, 533, 701, 921, 1251, 1605, 2175, 2837, 3797, 4945, 6681, 8637, 11679, 15165, 20403, 26525, 35777, 46381, 62589, 81253, 109503, 142187, 191755, 248775, 335579, 435561, 587233, 762305
Offset: 1

Views

Author

Petros Hadjicostas, Sep 06 2017

Keywords

Comments

Carlitz compositions are compositions where adjacent parts are distinct. They are enumerated in sequence A003242.
In Hadjicostas and Zhang (2017), compositions that either have length 1, or have length greater than or equal to 2 and are palindromic, if we exclude the first part, are called type II palindromic compositions, while the usual palindromic compositions are called type I palindromic compositions. (Type I palindromic compositions that are Carlitz are enumerated in sequence A239327.)
Since in a Carlitz composition adjacent parts are distinct, type II palindromic compositions of length > 1 that are Carlitz must have an even number of parts.

Examples

			For n=6, the a(6)=7 compositions that are type II palindromic and Carlitz are 6, 1+5, 5+1, 2+4, 4+2, 1+2+1+2, and 2+1+2+1. For n=7, the a(7)=9 compositions of this kind are 7, 1+6, 6+1, 2+5, 5+2, 3+4, 4+3, 3+1+2+1, and 2+1+3+1. (For example, the composition 1+6 becomes palindromic, i.e. 6, if we remove the first part. Similarly, the composition 2+1+3+1 becomes palindromic, i.e., 1+3+1, if we remove the first part. A composition of length one, such as 7, is considered palindromic of both types, I and II.)
		

References

  • S. Heubach and T. Mansour, "Compositions of n with parts in a set," Congr. Numer. 168 (2004), 127-143.

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n<>i, 1, 0)+add(
         `if`(i=j, 0, b(n-2*j, `if`(j>n-2*j, 0, j))), j=1..(n-1)/2)
        end:
    a:= n-> 1+add(b(n-j, j), j=1..n-1):
    seq(a(n), n=1..50);  # Alois P. Heinz, Sep 08 2017
  • Mathematica
    b[n_, i_] := b[n, i] = If[n != i, 1, 0] + Sum[If[i == j, 0, b[n - 2*j, If[j > n - 2*j, 0, j]]], {j, 1, (n - 1)/2}];
    a[n_] :=  1 + Sum[b[n - j, j], {j, 1, n - 1}];
    Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Jun 06 2018, after Alois P. Heinz *)
  • PARI
    a(n) = { my(A=sum(j=1, n, x^(2*j)/(1+x^(2*j)) + O(x*x^n)), B=sum(j=1, n, x^j/(1+x^(2*j)) + O(x*x^n))); polcoeff(x/(1-x) + B^2/(1-A)-A, n) } \\ Andrew Howroyd, Oct 12 2017

Formula

G.f.: x/(1-x) + B(x)^2/(1-A(x))-A(x), where A(x) = Sum_{n>=1} x^(2*n)/(1+x^(2*n)) and B(x) = Sum_{n>=1} x^n/(1+x^(2*n)).

Extensions

a(26)-a(47) from Alois P. Heinz, Sep 07 2017

A356846 Number of integer compositions of n into parts not covering an interval of positive integers.

Original entry on oeis.org

0, 0, 0, 0, 2, 5, 11, 25, 57, 115, 236, 482, 978, 1986, 4003, 8033, 16150, 32402, 64943, 130207, 260805, 522123, 1045168, 2091722, 4185431, 8374100, 16753538, 33515122, 67042865, 134106640, 268246886, 536549760, 1073194999, 2146553011, 4293391411, 8587283895
Offset: 0

Views

Author

Gus Wiseman, Sep 03 2022

Keywords

Examples

			The a(0) = 0 through a(6) = 8 compositions:
  .  .  .  .  (13)  (14)   (15)
              (31)  (41)   (24)
                    (113)  (42)
                    (131)  (51)
                    (311)  (114)
                           (141)
                           (411)
                           (1113)
                           (1131)
                           (1311)
                           (3111)
		

Crossrefs

The complement is counted by A107428, initial A107429.
The case of partitions is A239955, ranked by A073492, initial A053251, complement A034296.
These compositions are ranked by A356842, complement A356841.
A000041 counts partitions, compositions A011782.
A066208 lists numbers with all odd prime indices, counted by A000009.
A073491 lists numbers with gapless prime indices, initial A055932.

Programs

  • Mathematica
    gappyQ[m_]:=And[m!={},Union[m]!=Range[Min[m],Max[m]]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],gappyQ]],{n,0,15}]

Formula

a(n) = A011782(n) - A107428(n).

A296167 Triangle read by rows: T(n,k) is the number of circular compositions of n with length k such that no two adjacent parts are equal (1 <= k <= n).

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 2, 0, 0, 0, 1, 2, 2, 1, 0, 0, 1, 3, 2, 1, 0, 0, 0, 1, 3, 4, 3, 0, 0, 0, 0, 1, 4, 6, 4, 2, 1, 0, 0, 0, 1, 4, 8, 11, 4, 1, 0, 0, 0, 0, 1, 5, 10, 13, 10, 3, 0, 0, 0, 0, 0, 1, 5, 14, 22, 18, 10, 2, 1, 0, 0, 0, 0, 1, 6, 16, 29, 32, 20, 6, 1, 0, 0, 0, 0, 0, 1, 6, 20, 44, 50, 40, 18, 4, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Petros Hadjicostas, Dec 07 2017

Keywords

Comments

By "circular compositions" here we mean equivalence classes of compositions with parts on a circle such that two compositions are equivalent if one is a cyclic shift of the other. We may call them "circular Carlitz compositions".
The formula below for T(n,k) involves indicator functions of conditions because unfortunately circular compositions of length 1 are considered Carlitz by most authors (even though, strictly speaking, they are not since the single number in such a composition is "next to itself" if we go around the circle).
To prove that the two g.f.'s below are equal to each other, use the geometric series formula, change the order of summations where it is necessary, and use the result Sum_{n >= 1} (phi(n)/n)*log(1 + x^n) = Sum_{n >= 1} (phi(n)/n)*log(1 - x^(2*n)) - Sum_{n >= 1} (phi(n)/n)*log(1 - x^n) = -x^2/(1 - x^2) + x/(1 - x) = x/(1 - x^2).

Examples

			Triangle T(n,k) (with rows n >= 1 and columns k = 1..n) begins:
  1;
  1,  0;
  1,  1,  0;
  1,  1,  0,  0;
  1,  2,  0,  0,  0;
  1,  2,  2,  1,  0,  0;
  1,  3,  2,  1,  0,  0,  0;
  1,  3,  4,  3,  0,  0,  0,  0;
  1,  4,  6,  4,  2,  1,  0,  0,  0;
  1,  4,  8, 11,  4,  1,  0,  0,  0,  0;
  ...
Case n=6:
The included circular compositions are:
k=1: 6;                                => T(6,1) = 1
k=2: 15, 24;                           => T(6,2) = 2
k=3: 123, 321;                         => T(6,3) = 2
k=4: 1212;                             => T(6,4) = 1
k=5: none;                             => T(6,5) = 0
k=6: none;                             => T(6,6) = 0
		

Crossrefs

Row sums are in A106369.

Programs

  • Mathematica
    nmax = 14; gf (* of A293595 *) = Sum[x^(2j) y^2/(1 + x^j y), {j, 1, nmax}] + Sum[x^j y/(1 + x^j y)^2, {j, 1, nmax}]/(1 - Sum[x^j y/(1 + x^j y), {j, 1, nmax}]) + O[x]^(nmax + 1) + O[y]^(nmax + 1) // Normal // Expand;
    A293595[n_, k_] := SeriesCoefficient[gf, {x, 0, n}, {y, 0, k}];
    T[n_, k_] := Boole[k == 1] + (1/k) Sum[EulerPhi[d] A293595[n/d, k/d]* Boole[k/d != 1], {d, Divisors[GCD[n, k]]}];
    Table[T[n, k], {n, 1, nmax}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jul 26 2020 *)

Formula

T(n,k) = [k = 1] + (1/k)*Sum_{d | gcd(n,k)} phi(d)*A293595(n/d, k/d) * [k/d <> 1], where [ ] is the Iverson Bracket.
G.f.: Sum_{n,k >= 1} T(n,k)*x^n*y^k = x*y/(1-x) - Sum_{s>=1} (phi(s)/s)*f(x^s,y^s), where f(x,y) = log(1 - Sum_{n >= 1} x^n*y/(1 + x^n*y)) + Sum_{n >= 1} log(1 + x^n*y).
G.f.: -Sum_{s >= 1} (x*y)^(2*s + 1)/(1-x^(2*s + 1)) - Sum_{s >= 1} (phi(s)/s)*g(x^s,y^s), where g(x,y) = log(1 + Sum_{n >= 1} (-x*y)^n/(1 - x^n)).
Showing 1-4 of 4 results.