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

A227134 Partitions with parts repeated at most twice and repetition only allowed if first part has an odd index (first index = 1).

Original entry on oeis.org

1, 1, 2, 2, 4, 4, 7, 8, 11, 14, 19, 22, 30, 36, 46, 55, 70, 83, 104, 123, 151, 179, 218, 256, 309, 363, 433, 507, 602, 701, 828, 961, 1127, 1306, 1525, 1759, 2046, 2355, 2725, 3129, 3609, 4131, 4750, 5424, 6214, 7081, 8090, 9195, 10478, 11886, 13506, 15290, 17335, 19583, 22154, 24981, 28197, 31741, 35757, 40176, 45176
Offset: 0

Views

Author

Joerg Arndt, Jul 02 2013

Keywords

Examples

			G.f.: 1 + x + 2*x^2 + 2*x^3 + 4*x^4 + 4*x^5 + 7*x^6 + 8*x^7 + 11*x^8 + ...
G.f.: 1/(1-x) + x^2/((1-x)*(1-x^2)) + x^4/((1-x)*(1-x^2)*(1-x^3)) + x^6/((1-x)*(1-x^2)*(1-x^3)*(1-x^4)) + x^9/((1-x)*(1-x^2)*(1-x^3)*(1-x^4)*(1-x^5)) + x^12/((1-x)*(1-x^2)*(1-x^3)*(1-x^4)*(1-x^5)*(1-x^6)) + ...
There are a(13)=36 such partitions, displayed here as partitions into two sorts of parts (format P:S for sort:part) where the first sort is 0 and sorts oscillate:
01:  [ 1:0  1:1  2:0  2:1  3:0  4:1  ]
02:  [ 1:0  1:1  2:0  2:1  7:0  ]
03:  [ 1:0  1:1  2:0  3:1  6:0  ]
04:  [ 1:0  1:1  2:0  4:1  5:0  ]
05:  [ 1:0  1:1  2:0  9:1  ]
06:  [ 1:0  1:1  3:0  3:1  5:0  ]
07:  [ 1:0  1:1  3:0  8:1  ]
08:  [ 1:0  1:1  4:0  7:1  ]
09:  [ 1:0  1:1  5:0  6:1  ]
10:  [ 1:0  1:1 11:0  ]
11:  [ 1:0  2:1  3:0  3:1  4:0  ]
12:  [ 1:0  2:1  3:0  7:1  ]
13:  [ 1:0  2:1  4:0  6:1  ]
14:  [ 1:0  2:1  5:0  5:1  ]
15:  [ 1:0  2:1 10:0  ]
16:  [ 1:0  3:1  4:0  5:1  ]
17:  [ 1:0  3:1  9:0  ]
18:  [ 1:0  4:1  8:0  ]
19:  [ 1:0  5:1  7:0  ]
20:  [ 1:0 12:1  ]
21:  [ 2:0  2:1  3:0  6:1  ]
22:  [ 2:0  2:1  4:0  5:1  ]
23:  [ 2:0  2:1  9:0  ]
24:  [ 2:0  3:1  4:0  4:1  ]
25:  [ 2:0  3:1  8:0  ]
26:  [ 2:0  4:1  7:0  ]
27:  [ 2:0  5:1  6:0  ]
28:  [ 2:0 11:1  ]
29:  [ 3:0  3:1  7:0  ]
30:  [ 3:0  4:1  6:0  ]
31:  [ 3:0 10:1  ]
32:  [ 4:0  4:1  5:0  ]
33:  [ 4:0  9:1  ]
34:  [ 5:0  8:1  ]
35:  [ 6:0  7:1  ]
36:  [13:0  ]
		

Crossrefs

Cf. A227135 (parts may repeat after even index).

Programs

  • Maple
    ## Computes A227134 and A227135 in order n^2 time and order n^2 memory:
    a34:=proc(n) # n-th term of A227134
      return oddMin(n,1):
    end proc:
    a35:=proc(n) # n-th term of A227135
      return evenMin(n,1):
    end proc:
    # oddMin(n,m) finds number of partitions of n (as in A227134) but with the
    #  minimum part AT LEAST m
    oddMin:=proc(n, m) option remember:
      if(n=0) then return 1: fi:  ## Start base cases
      if((n<0) or (m>n)) then return 0: fi:
      if(n=m) then return 1: fi:  ## End base cases
      return oddMin(n, m+1) + evenMin(n-m, m+1) + oddMin(n-2*m, m+1): ## How many times is the element m in the partition
    end proc:
    # evenMin(n,m) finds number of partitions of n (as in A227135) but with the
    #  minimum part AT LEAST m
    evenMin:=proc(n, m) option remember:
      if(n=0) then return 1: fi:   ## Start base cases
      if((n<0) or (m>n)) then return 0: fi:
      if(n=m) then return 1: fi:   ## End base cases
      return evenMin(n, m+1) + oddMin(n-m, m+1): ## Is the element m in the partition
    end proc:
    ## Patrick Devlin, Jul 02 2013
    # second Maple program:
    b:= proc(n, i, t) option remember; `if`(n=0, t,
          `if`(i*(i+1) add(b(n$2, t), t=0..1):
    seq(a(n), n=0..60);  # Alois P. Heinz, Feb 15 2017
  • Mathematica
    nMax = 60; 1/(1-x) + Sum[x^Floor[(n+1)^2/4]/Product[1-x^k, {k, 1, n}], {n, 2, Ceiling @ Sqrt[4*nMax]}] + O[x]^(nMax+1) // CoefficientList[#, x]& (* Jean-François Alcover, Feb 15 2017, after Paul D. Hanna *)
  • PARI
    {A002620(n)=floor(n/2)*ceil(n/2)}
    {a(n)=polcoeff(1/(1-x+x*O(x^n)) + sum(m=2,sqrtint(4*n), x^A002620(m+1)/prod(k=1,m,1-x^k+x*O(x^n))),n)}
    for(n=0,60,print1(a(n),", ")) \\ Paul D. Hanna, Jul 06 2013

Formula

Conjecture: A227134(n) + A227135(n) = A182372(n) for n >= 0, see comment in A182372.
G.f.: 1/(1-x) + Sum_{n>=2} x^A002620(n+1) / Product_{k=1..n} (1-x^k), where A002620(n) = floor(n/2)*ceiling(n/2) forms the quarter-squares. - Paul D. Hanna, Jul 06 2013
a(n) ~ c * exp(Pi*sqrt(2*n/5)) / n^(3/4), where c = 1 / (2^(1/4)*sqrt(5*(1 + sqrt(5)))) = 0.2090492823352... - Vaclav Kotesovec, May 28 2018, updated Mar 06 2020

A227135 Partitions with parts repeated at most twice and repetition only allowed if first part has an even index (first index = 1).

Original entry on oeis.org

1, 1, 1, 2, 2, 4, 4, 6, 8, 10, 12, 17, 20, 25, 31, 39, 47, 58, 69, 85, 102, 123, 145, 175, 207, 246, 290, 343, 401, 473, 551, 646, 751, 875, 1012, 1177, 1358, 1570, 1807, 2083, 2389, 2746, 3140, 3597, 4106, 4690, 5337, 6082, 6907, 7848, 8895, 10085, 11404, 12902, 14561, 16438, 18520, 20864, 23460, 26385, 29619
Offset: 0

Views

Author

Joerg Arndt, Jul 02 2013

Keywords

Examples

			G.f.: 1 + x + x^2 + 2*x^3 + 2*x^4 + 4*x^5 + 4*x^6 + 6*x^7 + 8*x^8 +...
G.f.: 1/(1-x) + x^3/((1-x)*(1-x^2)) + x^5/((1-x)*(1-x^2)*(1-x^3)) + x^8/((1-x)*(1-x^2)*(1-x^3)*(1-x^4)) + x^11/((1-x)*(1-x^2)*(1-x^3)*(1-x^4)*(1-x^5)) + x^15/((1-x)*(1-x^2)*(1-x^3)*(1-x^4)*(1-x^5)*(1-x^6)) +...
There are a(13)=25 such partitions, displayed here as partitions into two sorts of parts (format P:S for sort:part) where the first sort is 1 and sorts oscillate:
01:  [ 1:1  2:0  2:1  3:0  5:1  ]
02:  [ 1:1  2:0  2:1  4:0  4:1  ]
03:  [ 1:1  2:0  2:1  8:0  ]
04:  [ 1:1  2:0  3:1  7:0  ]
05:  [ 1:1  2:0  4:1  6:0  ]
06:  [ 1:1  2:0 10:1  ]
07:  [ 1:1  3:0  3:1  6:0  ]
08:  [ 1:1  3:0  4:1  5:0  ]
09:  [ 1:1  3:0  9:1  ]
10:  [ 1:1  4:0  8:1  ]
11:  [ 1:1  5:0  7:1  ]
12:  [ 1:1  6:0  6:1  ]
13:  [ 1:1 12:0  ]
14:  [ 2:1  3:0  3:1  5:0  ]
15:  [ 2:1  3:0  8:1  ]
16:  [ 2:1  4:0  7:1  ]
17:  [ 2:1  5:0  6:1  ]
18:  [ 2:1 11:0  ]
19:  [ 3:1  4:0  6:1  ]
20:  [ 3:1  5:0  5:1  ]
21:  [ 3:1 10:0  ]
22:  [ 4:1  9:0  ]
23:  [ 5:1  8:0  ]
24:  [ 6:1  7:0  ]
25:  [13:1  ]
		

Crossrefs

Cf. A227134 (parts may repeat after odd index).

Programs

  • Maple
    ## See A227134
    # second Maple program:
    b:= proc(n, i, t) option remember; `if`(n=0, 1-t,
          `if`(i*(i+1) add(b(n$2, t), t=0..1):
    seq(a(n), n=0..60);  # Alois P. Heinz, Feb 15 2017
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = If[n == 0, 1 - t, If[i*(i + 1) < n, 0, Sum[ b[n - i*j, i - 1, Mod[t + j, 2]], {j, 0, Min[t + 1, n/i]}]]];
    a[n_] := Sum[b[n, n, t], {t, 0, 1}];
    Table[a[n], {n, 0, 60}] (* Jean-François Alcover, May 21 2018, after Alois P. Heinz *)
  • PARI
    {A002620(n)=floor(n/2)*ceil(n/2)}
    {a(n)=polcoeff(1/(1-x+x*O(x^n)) + sum(m=2,sqrtint(4*n), x^(A002620(m+2)-1)/prod(k=1,m,1-x^k+x*O(x^n))),n)}
    for(n=0,60,print1(a(n),", ")) \\ Paul D. Hanna, Jul 06 2013

Formula

Conjecture: A227134(n) + A227135(n) = A182372(n) for n>=0, see comment in A182372.
G.f.: 1/(1-x) + Sum_{n>=2} x^(A002620(n+2)-1) / Product_{k=1..n} (1-x^k), where A002620(n) = floor(n/2)*ceiling(n/2) forms the quarter-squares. - Paul D. Hanna, Jul 06 2013
a(n) ~ c * exp(Pi*sqrt(2*n/5)) / n^(3/4), where c = 2^(3/4) / (sqrt(5)*(1 + sqrt(5))^(3/2)) = 0.1291995618069... - Vaclav Kotesovec, May 28 2018, updated Mar 06 2020
Showing 1-2 of 2 results.