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.

User: Arnold Knopfmacher

Arnold Knopfmacher's wiki page.

Arnold Knopfmacher has authored 17 sequences. Here are the ten most recent ones:

A366157 The number of lit cells in weakly decreasing partitions of n when light shines from the north west. Here partitions are represented from left to right by columns of cells.

Original entry on oeis.org

1, 4, 8, 17, 27, 49, 74, 118, 174, 263, 371, 540, 747, 1048, 1429, 1954, 2610, 3513, 4631, 6123, 7978, 10398, 13397, 17277, 22054, 28131, 35605, 45004, 56502, 70879, 88370, 110033, 136325, 168612, 207637, 255308, 312689, 382373, 466004, 566979, 687685, 832793, 1005654
Offset: 1

Author

Arnold Knopfmacher, Oct 02 2023

Keywords

References

  • A. Blecher, A. Knopfmacher, and M. E. Mays, Casting light on integer partitions, preprint.

Crossrefs

Programs

  • Mathematica
    T[r_, s_] := If[s > r, 0, If[s == 0, 1, If[r == 1 && s == 1, q, If[r == 2 && s == 1, q*(1 + q), q^s*Sum[T[r - 1, i], {i, 0, s}]]]]]; nmax = 15; Do[Print[SeriesCoefficient[Sum[PartitionsP[n]*q^n - Sum[T[r, s], {s, 0, r}], {r, 0, n}], {q, 0, n}]], {n, 1, nmax}] (* Vaclav Kotesovec, Oct 04 2023 *)
  • PARI
    a(n) = {my(res = 0); forpart(p = n, res+=qlit(p)); res}
    qlit(v) = {my(res = v[#v], h = v[#v]-1); forstep(i = #v-1, 1, -1, res+=max(0, v[i]-h); h = max(h, v[i])-1); res} \\ David A. Corneth, Oct 04 2023

Formula

G.f.: Sum_{k>=0} (P(q)-T_q(k))
where P(q) is the partition g.f. Product_{i>=1} 1/(1-q^i)
and T_q(k)=Sum_{s=0..k} t[k,s] with t[r,s]=q^s*Sum_{i=0..s} t[r-1,i]
and initial conditions t[1,1]=q; t[2,1]=q(1+q); t[r,0]=1; t[r,s]=0 for s>r.
a(n) <= n * A000041(n). - David A. Corneth, Oct 04 2023

Extensions

a(13)-a(15) from Vaclav Kotesovec, Oct 04 2023
More terms from David A. Corneth, Oct 04 2023

A366175 The number of lit cells in weakly decreasing partitions of n when light shines from the north west and only the first column is lit. Here partitions are represented from left to right by columns of cells.

Original entry on oeis.org

1, 2, 5, 7, 15, 22, 35, 54, 86, 115, 175, 248, 351, 480, 662, 890, 1229, 1622, 2154, 2820, 3718, 4814, 6269, 8048, 10303, 13086, 16648, 20998, 26540, 33196, 41509, 51607, 64086, 79162, 97769, 120213, 147587, 180401, 220173, 267697, 325211, 393778, 476237
Offset: 1

Author

Arnold Knopfmacher, Oct 03 2023

Keywords

References

  • A. Blecher, A. Knopfmacher, and M. E. Mays, Casting light on integer partitions, preprint.

Crossrefs

Programs

  • Mathematica
    T[r_, s_] := If[s > r, 0, If[s == 0, 1, If[r == 1 && s == 1, q, If[r == 2 && s == 1, q*(1 + q), q^s*Sum[T[r - 1, i], {i, 0, s}]]]]]; nmax = 15; Rest[CoefficientList[Series[Sum[(r + 1)*q^(r + 1)*Sum[T[r, s], {s, 0, r}], {r, 0, nmax}], {q, 0, nmax}], q]] (* Vaclav Kotesovec, Oct 04 2023 *)

Formula

G.f.: Sum_{r>=0} (r+1)*q^(r+1)*T_q(r) where T_q(k) = Sum_{s=0..k} t(k,s) with t(r,s) = q^s*Sum_{i=0..s} t(r-1,i) and initial conditions t(1,1) = q; t(2,1) = q(1+q); t(r,0) = 1; t(r,s) = 0 for s>r.

Extensions

a(14)-a(16) from Vaclav Kotesovec, Oct 04 2023
a(17)-a(43) from Alois P. Heinz, Oct 04 2023

A366069 The number of lit cells in weakly increasing partitions of n when light shines from the northwest. Here partitions are represented from left to right by columns of cells.

Original entry on oeis.org

1, 4, 8, 17, 28, 51, 78, 127, 189, 287, 411, 603, 840, 1187, 1628, 2242, 3015, 4076, 5399, 7173, 9390, 12292, 15904, 20585, 26364, 33748, 42856, 54348, 68446, 86101, 107641, 134383, 166912, 206961, 255479, 314872, 386491, 473632, 578389, 705122, 856900, 1039691
Offset: 1

Author

Arnold Knopfmacher, Sep 29 2023

Keywords

Comments

See reference below.

References

  • A. Becher, A. Knopfmacher, and M. E. Mays, Casting light on integer partitions, preprint.

Crossrefs

Cf. A000041.

Formula

G.f.: P(q) * Sum_{i>=1} (q^i*(1+q^i)/(1-q^i)), where P(q) is the partition g.f. Product_{i>=1} 1/(1-q^i).

Extensions

More terms from Alois P. Heinz, Sep 29 2023

A331609 Number of compositions of n with the multiplicity of the first part even.

Original entry on oeis.org

0, 1, 0, 4, 4, 14, 20, 56, 98, 224, 420, 902, 1764, 3664, 7258, 14824, 29596, 59942, 120012, 241944, 484946, 975216, 1955244, 3926078, 7870980, 15790272, 31650090, 63456208, 127162580, 254845446, 510582236, 1022940392, 2049048890, 4104264424, 8219808108
Offset: 1

Author

Arnold Knopfmacher, Jan 22 2020

Keywords

Examples

			For n=4, a(4)=4 and counts 2+2, 1+2+1, 1+1+2 and 1+1+1+1.
		

Crossrefs

Cf. A011782, A331606 (similar, with odd).

Programs

  • Maple
    b:= proc(n, p, t) option remember; `if`(n=0, t,
          add(b(n-j, p, `if`(p=j, 1-t, t)), j=1..n))
        end:
    a:= n-> add(b(n-j, j, 0), j=1..n):
    seq(a(n), n=1..38);  # Alois P. Heinz, Jan 23 2020
  • Mathematica
    gf[x_] := (1 - x)/(1 - 2 x) - Sum[ ((x - 1) x^i (-x^(i + 1) + x^i - 2 x + 1)) / ((2 x - 1) (-2 x^(i + 1) + 2 x^i - 2 x + 1)), {i, 1, 40}];
    CL := CoefficientList[Series[gf[x], {x, 0, 35}], x]; Drop[CL, 1] (* Peter Luschny, Jan 23 2020 *)

Formula

G.f.: (1-x)/(1-2*x) - Sum_{i>=1} ((x-1)*x^i*(-x^(i+1)+x^i-2*x+1)) / ((2*x-1) * (-2*x^(i+1)+2*x^i-2*x+1)).
a(n) = A011782(n) - A331606(n). - Alois P. Heinz, Jan 23 2020

A331606 Number of compositions of n with the multiplicity of the first part odd.

Original entry on oeis.org

1, 1, 4, 4, 12, 18, 44, 72, 158, 288, 604, 1146, 2332, 4528, 9126, 17944, 35940, 71130, 142132, 282344, 563630, 1121936, 2239060, 4462530, 8906236, 17764160, 35458774, 70761520, 141272876, 282025466, 563159588, 1124543256, 2245918406, 4485670168, 8960061076
Offset: 1

Author

Arnold Knopfmacher, Jan 22 2020

Keywords

Examples

			For n=3, a(4)=4 as we count 4, 3+1, 1+3 and 2+1+1.
		

Crossrefs

Cf. A011782, A331609 (similar, with even).

Programs

  • Maple
    b:= proc(n, p, t) option remember; `if`(n=0, t,
          add(b(n-j, p, `if`(p=j, 1-t, t)), j=1..n))
        end:
    a:= n-> add(b(n-j, j, 1), j=1..n):
    seq(a(n), n=1..38);  # Alois P. Heinz, Jan 23 2020
  • Mathematica
    gf[x_] := x/(2 (1 - 2 x)) + Sum[(1 - x) x^i/(2 (-2 x^(i + 1) + 2 x^i - 2 x + 1))  , {i, 1, 40}]; CL := CoefficientList[Series[gf[x], {x, 0, 35}], x];
    Drop[CL, 1] (* Peter Luschny, Jan 23 2020 *)

Formula

G.f.: Sum_{i>=1} (1-x)*x^i/(2*(-2*x^(i+1)+2*x^i-2*x+1)) + x/(2*(1-2*x)).
a(n) = A011782(n) - A331609(n). - Alois P. Heinz, Jan 23 2020

A277999 Sum of distances between leftmost and rightmost peaks in all bargraphs of semiperimeter n.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 9, 53, 261, 1165, 4887, 19642, 76519, 291095, 1086946, 3998430, 14530223, 52272218, 186467253, 660449671, 2325124444, 8143334776, 28393762841, 98621419068, 341403900888, 1178425064256, 4057244213071, 13937739553781, 47786215201214, 163554669548711
Offset: 1

Author

Arnold Knopfmacher, Nov 08 2016

Keywords

Examples

			a(6)=1 since the bargraph with column heights 2,1,2 has a distance of 1 between first and last peak. All other bargraphs of semiperimeter 6 have at most one peak, hence 0 difference.
		

Crossrefs

Programs

  • PARI
    my(x = 'x + O('x^30)); sqx = sqrt(x^4+2*x^2-4*x+1); concat(vector(5), Vec(-(4*x^6*(3-2*x^3+3*x^4 - sqx + x^2*(4-3*sqx) + 2*x*(sqx - 4))/((x^2-3*x+1)*sqx*(-1+2*x+x^2-sqx)^3)))) \\ Michel Marcus, Feb 25 2019

Formula

G.f.: -(4*x^6*(3-2*x^3+3*x^4 - sqx + x^2*(4-3*sqx) + 2*x*(sqx - 4))/((x^2-3*x+1)*sqx*(-1+2*x+x^2-sqx)^3)) where sqx = sqrt(x^4+2*x^2-4*x+1).

A277973 Sum of horizontal positions of the first peak in all bargraphs of semiperimeter n.

Original entry on oeis.org

0, 0, 0, 1, 6, 25, 91, 311, 1029, 3346, 10778, 34544, 110444, 352785, 1126885, 3601617, 11521648, 36899528, 118322448, 379908707, 1221423149, 3932113059, 12675055399, 40909511880, 132200481507, 427718677728, 1385419058692, 4492446685542, 14582927712740, 47385785436719
Offset: 1

Author

Arnold Knopfmacher, Nov 07 2016

Keywords

Comments

Horizontal position is x-coordinate of the start of the leftmost horizontal step of the first peak.

Examples

			For n = 4, a(4) = 1, as only the bargraph with first column of height one and second column of height two has horizontal position 1, all other cases are zero.
		

Crossrefs

Programs

  • PARI
    seq(n) = my(r=sqrt((1 - x)*(1 - 3*x - x^2 - x^3) + O(x^(n-2)))); Vec(2*x^3*(1 + x^2 - r) / ((1 - x)*(1 - 2*x - x^2 + r)^2), -n) \\ Andrew Howroyd, Jan 12 2024

Formula

G.f.: (2*x^3*(x^2-sqrt(x^4+2*x^2-4*x+1)+1)) / ((1-x)*(-x^2+sqrt(x^4+2*x^2-4*x+1)-2*x+1)^2).

A079499 Total number of parts in all partitions of n into distinct odd parts.

Original entry on oeis.org

0, 1, 0, 1, 2, 1, 2, 1, 4, 4, 4, 4, 6, 7, 6, 10, 12, 13, 12, 16, 18, 22, 22, 25, 32, 36, 36, 42, 50, 53, 58, 64, 76, 83, 88, 99, 116, 123, 132, 147, 168, 181, 194, 215, 240, 262, 280, 306, 346, 375, 396, 437, 482, 521, 558, 610, 670, 724, 772, 840, 922, 993, 1056, 1151, 1256, 1348
Offset: 0

Author

Arnold Knopfmacher, Jan 21 2003

Keywords

Comments

Also sum of the sizes of the Durfee squares of all self-conjugate partitions of n. Example: a(13)=7 because there are three self-conjugate partitions of 13, namely [7,1,1,1,1,1,1], [5,3,3,1,1] and [4,4,3,2], having Durfee squares of sizes 1,3 and 3, respectively. a(n) = Sum_{k=1..floor(sqrt(n))} k*A116422(n,k). - Emeric Deutsch, Feb 14 2006

Examples

			a(13)=7 because the partitions of 13 into distinct odd parts are [13], [9,3,1] and [7,5,1] and we have 1+3+3=7 parts.
		

References

  • G. E. Andrews, The Theory of Partitions, Addison-Wesley, 1976 (pp. 27-28).
  • G. E. Andrews and K. Eriksson, Integer Partitions, Cambridge Univ. Press, 2004 (pp. 75-78).

Crossrefs

Programs

  • Maple
    g:=sum(k*x^(k^2)/product(1-x^(2*i),i =1..k),k=1..20):gser:=series(g,x=0,52): seq(coeff(gser,x,n),n=0..50); # Emeric Deutsch, Feb 14 2006
  • Mathematica
    max = 100; s = Sum[ k*x^(k^2) / Product[1-x^(2*j), {j, 1, k}], {k, 1, Sqrt[max] // Ceiling}]; CoefficientList[ Series[s, {x, 0, max}], x] (* Jean-François Alcover, Feb 19 2015, after Vladeta Jovovic *)
  • PARI
    N=66;  S=2+sqrtint(N); x='x+O('x^N);
    gf=sum(n=0, S, n*x^(n^2)/prod(k=1,n, 1-x^(2*k)) );
    concat( [0], Vec(gf) )
    \\ Joerg Arndt, Feb 18 2014

Formula

G.f.: (Sum_{k>=1} x^(2*k-1)/(1 + x^(2*k-1))) * Product_{m>=1} (1 + x^(2m-1)).
G.f.: Sum_{k>=1} k*x^(k^2)/Product_{j=1..k} (1 - x^(2*j)). - Vladeta Jovovic, Aug 06 2004
a(n) ~ 3^(1/4) * log(2) * exp(Pi*sqrt(n/6)) / (Pi * 2^(5/4) * n^(1/4)). - Vaclav Kotesovec, May 20 2018

A079500 Number of compositions of the integer n in which the first part is >= the other parts.

Original entry on oeis.org

1, 1, 2, 3, 5, 8, 14, 24, 43, 77, 140, 256, 472, 874, 1628, 3045, 5719, 10780, 20388, 38674, 73562, 140268, 268066, 513350, 984911, 1892875, 3643570, 7023562, 13557020, 26200182, 50691978, 98182666, 190353370, 369393466, 717457656, 1394632365, 2713061899
Offset: 0

Author

Arnold Knopfmacher, Jan 21 2003

Keywords

Comments

Essentially the same as A007059: a(n) = A007059(n+1).
In lunar arithmetic in base 2, this is the number of lunar divisors of the number 111...1 (with n 1's). E.g., 1111 has a(4) = 5 divisors (see A048888). - N. J. A. Sloane, Feb 23 2011.
First differences of A186537. - N. J. A. Sloane, Feb 23 2011
Number of balanced ordered rooted trees with n non-root nodes (see A048816 for unordered balanced trees); see example. The compositions are obtained from the level sequences by identifying a length-k run of (non-root) levels [t, t+1, t+2, ..., t+k-1] with a part k. - Joerg Arndt, Jul 20 2014

Examples

			From _Joerg Arndt_, Dec 29 2012: (Start)
There are a(7)=24 compositions p(1)+p(2)+...+p(m)=7 such that p(k) <= p(1):
[ 1]  [ 1 1 1 1 1 1 1 ]
[ 2]  [ 2 1 1 1 1 1 ]
[ 3]  [ 2 1 1 1 2 ]
[ 4]  [ 2 1 1 2 1 ]
[ 5]  [ 2 1 2 1 1 ]
[ 6]  [ 2 1 2 2 ]
[ 7]  [ 2 2 1 1 1 ]
[ 8]  [ 2 2 1 2 ]
[ 9]  [ 2 2 2 1 ]
[10]  [ 3 1 1 1 1 ]
[11]  [ 3 1 1 2 ]
[12]  [ 3 1 2 1 ]
[13]  [ 3 1 3 ]
[14]  [ 3 2 1 1 ]
[15]  [ 3 2 2 ]
[16]  [ 3 3 1 ]
[17]  [ 4 1 1 1 ]
[18]  [ 4 1 2 ]
[19]  [ 4 2 1 ]
[20]  [ 4 3 ]
[21]  [ 5 1 1 ]
[22]  [ 5 2 ]
[23]  [ 6 1 ]
[24]  [ 7 ]
(End)
From _Joerg Arndt_, Jul 20 2014: (Start)
The a(7) = 24 balanced ordered rooted trees with 7 non-root nodes are, as level sequences (of the pre-order walk):
01:  [ 0 1 1 1 1 1 1 1 ]
02:  [ 0 1 2 1 2 1 2 2 ]
03:  [ 0 1 2 1 2 2 1 2 ]
04:  [ 0 1 2 1 2 2 2 2 ]
05:  [ 0 1 2 2 1 2 1 2 ]
06:  [ 0 1 2 2 1 2 2 2 ]
07:  [ 0 1 2 2 2 1 2 2 ]
08:  [ 0 1 2 2 2 2 1 2 ]
09:  [ 0 1 2 2 2 2 2 2 ]
10:  [ 0 1 2 3 1 2 3 3 ]
11:  [ 0 1 2 3 2 3 2 3 ]
12:  [ 0 1 2 3 2 3 3 3 ]
13:  [ 0 1 2 3 3 1 2 3 ]
14:  [ 0 1 2 3 3 2 3 3 ]
15:  [ 0 1 2 3 3 3 2 3 ]
16:  [ 0 1 2 3 3 3 3 3 ]
17:  [ 0 1 2 3 4 2 3 4 ]
18:  [ 0 1 2 3 4 3 4 4 ]
19:  [ 0 1 2 3 4 4 3 4 ]
20:  [ 0 1 2 3 4 4 4 4 ]
21:  [ 0 1 2 3 4 5 4 5 ]
22:  [ 0 1 2 3 4 5 5 5 ]
23:  [ 0 1 2 3 4 5 6 6 ]
24:  [ 0 1 2 3 4 5 6 7 ]
(End)
From _Gus Wiseman_, Oct 07 2018: (Start)
The a(0) = 1 through a(6) = 14 balanced rooted plane trees:
  o  (o)  (oo)   (ooo)    (oooo)     (ooooo)      (oooooo)
          ((o))  ((oo))   ((ooo))    ((oooo))     ((ooooo))
                 (((o)))  (((oo)))   (((ooo)))    (((oooo)))
                          ((o)(o))   ((o)(oo))    ((o)(ooo))
                          ((((o))))  ((oo)(o))    ((oo)(oo))
                                     ((((oo))))   ((ooo)(o))
                                     (((o)(o)))   ((((ooo))))
                                     (((((o)))))  (((o)(oo)))
                                                  (((oo)(o)))
                                                  ((o)(o)(o))
                                                  (((((oo)))))
                                                  ((((o)(o))))
                                                  (((o))((o)))
                                                  ((((((o))))))
(End)
		

References

  • Arnold Knopfmacher and Neville Robbins, Compositions with parts constrained by the leading summand, Ars Combin. 76 (2005), 287-295.

Programs

  • Maple
    M:=101:
    t1:=add( (1-x)*x^k/(1-2*x+x^k), k=1..M):
    series(t1,x,M-1);
    seriestolist(%);
    # second Maple program:
    b:= proc(n, m) option remember; `if`(n=0, 1,
          `if`(m=0, add(b(n-j, j), j=1..n),
          add(b(n-j, min(n-j, m)), j=1..min(n, m))))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..40);  # Alois P. Heinz, May 01 2014
  • Mathematica
    nn=36;CoefficientList[Series[Sum[x^i/(1-(x-x^(i+1))/(1-x)),{i,0,nn}],{x,0,nn}],x]  (* Geoffrey Critzer, Mar 12 2013 *)
    b[n_, m_] := b[n, m] = If[n==0, 1, If[m==0, Sum[b[n-j, j], {j, 1, n}], Sum[ b[n-j, Min[n-j, m]], {j, 1, Min[n, m]}]]]; a[n_] := b[n, 0]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Nov 23 2015, after Alois P. Heinz *)

Formula

G.f.: (1-z) * Sum_{k>=0} z^k/(1 - 2*z + z^(k+1)).
a(n) = A048888(n) - 1.
This is a subsequence of A067399: a(n) = A067399(2^n-1).
G.f.: -((1 + x^2 + 1/(x-1))/x)*( 1 + x*(x-1)^3*(1-x+x^3)/( Q(0) - x*(x-1)^3*(1-x+x^3)) ), where Q(k) = (x+1)*(2*x-1)*(1-x)^2 + x^(k+2)*(x+x^2+x^3-2*x^4-1 - x^(k+3) + x^(k+5)) - x*(-1+2*x-x^(k+3))*(1-2*x+x^2+x^(k+4)-x^(k+5))*(-1+4*x-5*x^2+2*x^3 - x^(k+2)- x^(k+5) + 2*x^(k+3) - x^(2*k+5) + x^(2*k+6))/Q(k+1) ; (continued fraction). - Sergei N. Gladkovskii, Dec 14 2013
a(n) = Sum_{j=1..n} F(j, n+1-j), where F(n,k) is the n-th k-generalized Fibonacci number A092921(k,n). - Gregory L. Simay, Aug 21 2022

Extensions

Offset corrected by N. J. A. Sloane, Feb 23 2011
More terms from N. J. A. Sloane, Feb 24 2011
Further edits (required in order to clarify the definition - is the first part >= the rest. or only > the rest? Answer: the former; for the latter, see A007059) by N. J. A. Sloane, May 08 2011

A079501 Number of compositions of the integer n with strictly smallest part in the first position.

Original entry on oeis.org

1, 1, 2, 2, 4, 5, 8, 12, 19, 28, 45, 70, 110, 173, 275, 436, 695, 1107, 1769, 2831, 4537, 7276, 11683, 18774, 30194, 48592, 78247, 126062, 203192, 327645, 528518, 852815, 1376491, 2222294, 3588628, 5796196, 9363458, 15128631, 24447014, 39510108
Offset: 1

Author

Arnold Knopfmacher, Jan 21 2003

Keywords

Comments

Also number of compositions of n such that the first part is divisible by the number of parts . [Vladeta Jovovic, Dec 02 2009]

Examples

			The a(9)=19 such compositions of 9 are
[ 1]  [ 1 2 2 2 2 ]
[ 2]  [ 1 2 2 4 ]
[ 3]  [ 1 2 3 3 ]
[ 4]  [ 1 2 4 2 ]
[ 5]  [ 1 2 6 ]
[ 6]  [ 1 3 2 3 ]
[ 7]  [ 1 3 3 2 ]
[ 8]  [ 1 3 5 ]
[ 9]  [ 1 4 2 2 ]
[10]  [ 1 4 4 ]
[11]  [ 1 5 3 ]
[12]  [ 1 6 2 ]
[13]  [ 1 8 ]
[14]  [ 2 3 4 ]
[15]  [ 2 4 3 ]
[16]  [ 2 7 ]
[17]  [ 3 6 ]
[18]  [ 4 5 ]
[19]  [ 9 ]
- _Joerg Arndt_, Jan 01 2013
		

References

  • Arnold Knopfmacher and Neville Robbins, Compositions with parts constrained by the leading summand, Ars Combin. 76 (2005), 287-295.

Crossrefs

Cf. A168655, A168656, A168657. [From Vladeta Jovovic, Dec 02 2009]

Programs

  • Maple
    b:= proc(n, s) option remember; `if`(n=0, 1, add(
          `if`(n-j>0 and n-j<=s, 0, b(n-j, s)), j=s+1..n))
        end:
    a:= n-> 1 +add(b(n-j, j), j=1..n/2):
    seq(a(n), n=1..60);  # Alois P. Heinz, Apr 29 2014
  • Mathematica
    b[n_, s_] := b[n, s] = If[n == 0, 1, Sum[ If[n - j > 0 && n - j <= s, 0, b[n - j, s]], {j, s + 1, n}]]; a[n_] := 1 + Sum[b[n - j, j], {j, 1, n/2}]; Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Jan 16 2015, after Alois P. Heinz *)

Formula

G.f.: Sum_{k>=1} (1-z)*z^k/(1-z-z^(k+1)).
G.f.: Sum_{k>=1} z^(2*k-1)/((1-z^k)*(1-z)^(k-1)), cf. A105039. - Vladeta Jovovic, Apr 05 2005
a(n) ~ 1/sqrt(5) * ((1+sqrt(5))/2)^(n-2). - Vaclav Kotesovec, May 01 2014
G.f.: Sum_{n>=1} q^n/(1-Sum_{k>=n+1} q^k). - Joerg Arndt, Jan 03 2024

Extensions

More terms from Benoit Cloitre, Jan 21 2003