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

A238870 Number of compositions of n with c(1) = 1, c(i+1) - c(i) <= 1, and c(i+1) - c(i) != 0.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 2, 2, 1, 4, 4, 4, 9, 10, 11, 21, 25, 30, 51, 62, 80, 125, 157, 208, 309, 399, 536, 772, 1013, 1373, 1938, 2574, 3503, 4882, 6540, 8918, 12329, 16611, 22672, 31183, 42182, 57588, 78952, 107092, 146202, 200037, 271831, 371057, 507053, 689885, 941558, 1285655, 1750672, 2388951, 3260459, 4442179, 6060948
Offset: 0

Views

Author

Joerg Arndt, Mar 09 2014

Keywords

Comments

Number of fountains of n coins with at most two successive coins on the same level.

Examples

			The a(10) = 4 such compositions are:
:
:   1:  [ 1 2 1 2 1 2 1 ]  (composition)
:
:  o o o
: ooooooo   (rendering as composition)
:
:     O   O   O
:    O O O O O O O  (rendering as fountain of coins)
:
:
:   2:  [ 1 2 1 2 3 1 ]
:
:     o
:  o oo
: oooooo
:
:           O
:      O   O O
:     O O O O O O
:
:
:   3:  [ 1 2 3 1 2 1 ]
:
:   o
:  oo o
: oooooo
:
:       O
:      O O   O
:     O O O O O O
:
:
:   4:  [ 1 2 3 4 ]
:
:    o
:   oo
:  ooo
: oooo
:
:         O
:        O O
:       O O O
:      O O O O
:
		

Crossrefs

Cf. A005169 (fountains of coins), A001524 (weakly unimodal fountains of coins).
Cf. A186085 (1-dimensional sandpiles), A227310 (rough sandpiles).
Cf. A023361 (fountains of coins with all valleys at lowest level).

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, add(
          `if`(i=j, 0, b(n-j, j)), j=1..min(n, i+1)))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..60);  # Alois P. Heinz, Mar 11 2014
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, Sum[If[i == j, 0, b[n-j, j]], {j, 1, Min[n, i+1]}]];
    a[n_] := b[n, 0];
    a /@ Range[0, 60] (* Jean-François Alcover, Nov 07 2020, after Alois P. Heinz *)
  • Sage
    # translation of the Maple program by Alois P. Heinz
    @CachedFunction
    def F(n, i):
        if n == 0: return 1
        return sum( (i!=j) * F(n-j, j) for j in [1..min(n,i+1)] ) # A238870
    #    return sum( F(n-j, j) for j in [1, min(n,i+1)] ) # A005169
    def a(n): return F(n, 0)
    print([a(n) for n in [0..50]])
    # Joerg Arndt, Mar 20 2014

Formula

a(n) ~ c / r^n, where r = 0.733216317061133379740342579187365700397652443391231594... and c = 0.172010618097928709454463097802313209201440229976513439... . - Vaclav Kotesovec, Feb 17 2017

A340658 The number of overpartitions of n having more non-overlined parts than overlined parts.

Original entry on oeis.org

0, 1, 2, 4, 8, 14, 25, 41, 67, 105, 163, 246, 368, 540, 784, 1124, 1596, 2242, 3124, 4316, 5918, 8058, 10899, 14651, 19581, 26028, 34417, 45293, 59327, 77372, 100483, 129984, 167502, 215077, 275199, 350966, 446162, 565451, 714515, 900334, 1131370, 1417963
Offset: 0

Views

Author

Jeremy Lovejoy, Jan 15 2021

Keywords

Examples

			a(3) = 4 counts the overpartitions [3], [2,1], [1,1,1], and [1',1,1].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, c) option remember; `if`(n=0,
         `if`(c>0, 1, 0), `if`(i<1, 0, b(n, i-1, c)+add(
          add(b(n-i*j, i-1, c+j-t), t=[0, 2]), j=1..n/i)))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..60);  # Alois P. Heinz, Jan 15 2021
  • Mathematica
    b[n_, i_, c_] := b[n, i, c] = If[n==0, If[c>0, 1, 0], If[i<1, 0, b[n, i-1, c] + Sum[Sum[b[n-i*j, i-1, c+j-t], {t, {0, 2}}], {j, 1, n/i}]]];
    a[n_] := b[n, n, 0];
    a /@ Range[0, 60] (* Jean-François Alcover, Jan 29 2021, after Alois P. Heinz *)

Formula

G.f.: (Product_{k>=1} (1+q^k)/(1-q^k)) - Sum_{n>=0} q^(n*(n+1)/2)/Product_{k=1..n} (1-q^k)^2.

A171604 Take the standard 2-D lattice packing of pennies; a(n) = number of ways to pick n pennies (modulo rotations and reflections) such that if we form a linkage with centers of pennies as hinges and with struts between centers of two touching pennies, the linkage is rigid.

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 4
Offset: 1

Views

Author

J. Lowell, Dec 12 2009

Keywords

Comments

The pennies are laid flat on a horizontal plane. - Daniel Forgues, Oct 10 2016
We might have a rigid structure with a hole through which we have a taut chain of pennies (is this considered a packing?). - Daniel Forgues, Oct 08 2016

Examples

			Examples for n=2,3,4,5,6,7:
n=2:
.o.o
n=3:
..o
.o.o
n=4:
..o
.o.o
..o
n=5:
..o.o
.o.o.o
n=6:
.o.o.o
o.o.o
.
...o
o.o.o
.o.o
.
..o
.o.o
o.o.o
n=7:
..o.o.o
.o.o.o.o
.
..o.o
.o.o.o
..o.o
.
...o.o
..o.o
.o.o.o
.
....o.o
...o.o.o
..o.o
		

Crossrefs

Extensions

Edited by N. J. A. Sloane, Dec 19 2009

A174439 Partial sums of A001523.

Original entry on oeis.org

1, 2, 4, 8, 16, 31, 58, 105, 184, 314, 523, 853, 1365, 2149, 3332, 5097, 7701, 11505, 17009, 24907, 36147, 52027, 74304, 105352, 148355, 207575, 288673, 399157, 548926, 750996, 1022400, 1385374, 1868813, 2510181, 3357862, 4474187, 5939186
Offset: 0

Views

Author

Jonathan Vos Post, Mar 19 2010

Keywords

Comments

The subsequence of primes begins: 2, 31, 523, 853, 24907, 52027, 1868813, ...

Crossrefs

Programs

  • Mathematica
    nmax = 41; A001523 = CoefficientList[Series[1 + Sum[(-1)^(k + 1)*x^(k*(k + 1)/2), {k, 1, nmax}] / QPochhammer[x]^2, {x, 0, nmax}], x]; s = 0; Table[s = s + A001523[[k]], {k, 1, nmax}] (* Vaclav Kotesovec, Dec 13 2015 *)

Formula

a(n) = Sum_{i=0..n} A001523(i).
a(n) ~ exp(2*Pi*sqrt(n/3))/(8*Pi*3^(1/4)*n^(3/4)). - Vaclav Kotesovec, Dec 13 2015

A340668 The number of overpartitions of n where the number of non-overlined parts is at least two more than the number of overlined parts.

Original entry on oeis.org

0, 0, 1, 2, 5, 9, 17, 29, 49, 79, 125, 193, 293, 437, 642, 932, 1336, 1896, 2663, 3709, 5121, 7020, 9551, 12913, 17347, 23172, 30779, 40679, 53495, 70030, 91269, 118459, 153133, 197214, 253057, 323595, 412418, 523953, 663612, 838035, 1055304, 1325287, 1659969
Offset: 0

Views

Author

Jeremy Lovejoy, Jan 15 2021

Keywords

Comments

Also equal to A340658(n) - A001524(n).

Examples

			a(4) = 5 counts the overpartitions [3,1], [2,2], [2,1,1], [1,1,1,1], and [1',1,1,1].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, c) option remember; `if`(n=0,
         `if`(c>1, 1, 0), `if`(i<1, 0, b(n, i-1, c)+add(
          add(b(n-i*j, i-1, c+j-t), t=[0, 2]), j=1..n/i)))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..60);  # Alois P. Heinz, Jan 15 2021
  • Mathematica
    b[n_, i_, c_] := b[n, i, c] = If[n == 0,
         If[c > 1, 1, 0], If[i < 1, 0, b[n, i-1, c] + Sum[
         Sum[b[n-i*j, i-1, c+j-t], {t, {0, 2}}], {j, 1, n/i}]]];
    a[n_] := b[n, n, 0];
    Table[a[n], {n, 0, 60}] (* Jean-François Alcover, May 14 2022, after Alois P. Heinz *)

Formula

G.f.: (Product_{k>=1} (1+q^k)/(1-q^k)) - Sum_{n>=0} q^(n*(n+1)/2)/ ((Product_{k=1..n} (1-q^k)^2) * (1-q^(n+1))).
Previous Showing 11-15 of 15 results.