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.

A284249 Number T(n,k) of k-element subsets of [n] whose sum is a triangular number; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 2, 3, 3, 1, 1, 1, 3, 4, 5, 3, 1, 1, 1, 3, 5, 8, 6, 4, 1, 1, 1, 3, 7, 12, 11, 9, 4, 1, 1, 1, 3, 9, 16, 20, 18, 11, 5, 1, 1, 1, 4, 10, 22, 32, 35, 26, 14, 5, 1, 1, 1, 4, 12, 29, 48, 61, 55, 36, 17, 6, 1, 1, 1, 4, 14, 37, 70, 100, 106, 84, 48, 21, 6, 1, 1
Offset: 0

Views

Author

Alois P. Heinz, Mar 23 2017

Keywords

Examples

			Triangle T(n,k) begins:
  1;
  1, 1;
  1, 1,  1;
  1, 2,  1,  1;
  1, 2,  2,  1,  1;
  1, 2,  3,  3,  1,   1;
  1, 3,  4,  5,  3,   1,   1;
  1, 3,  5,  8,  6,   4,   1,  1;
  1, 3,  7, 12, 11,   9,   4,  1,  1;
  1, 3,  9, 16, 20,  18,  11,  5,  1,  1;
  1, 4, 10, 22, 32,  35,  26, 14,  5,  1, 1;
  1, 4, 12, 29, 48,  61,  55, 36, 17,  6, 1, 1;
  1, 4, 14, 37, 70, 100, 106, 84, 48, 21, 6, 1, 1;
		

Crossrefs

Second and third lower diagonals give: A008619(n+1), A008747(n+1).
Row sums give A284250.
T(2n,n) gives A284251.

Programs

  • Maple
    b:= proc(n, s) option remember; expand(`if`(n=0,
          `if`(issqr(8*s+1), 1, 0), b(n-1, s)+x*b(n-1, s+n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, 0)):
    seq(T(n), n=0..16);
  • Mathematica
    b[n_, s_] := b[n, s] = Expand[If[n == 0, If[IntegerQ @ Sqrt[8*s + 1], 1, 0], b[n - 1, s] + x*b[n - 1, s + n]]];
    T[n_] := Function [p, Table[Coefficient[p, x, i], {i, 0, n}]][b[n, 0]];
    Table[T[n], {n, 0, 16}] // Flatten (*Jean-François Alcover, May 29 2018, from Maple *)

A277619 Number of aperiodic necklaces (Lyndon words) with k<=4 black beads and n-k white beads.

Original entry on oeis.org

1, 2, 1, 2, 3, 6, 8, 14, 19, 28, 37, 51, 64, 84, 103, 129, 155, 189, 222, 265, 307, 359, 411, 474, 536, 611, 685, 772, 859, 960, 1060, 1176, 1291, 1422, 1553, 1701, 1848, 2014, 2179, 2363, 2547, 2751, 2954, 3179, 3403, 3649, 3895, 4164, 4432, 4725, 5017
Offset: 0

Views

Author

Herbert Kociemba, Oct 24 2016

Keywords

Examples

			a(6)=8. The aperiodic necklaces are BWWWWW, BBWWWW, BWBWWW, BBBWWW, BBWBWW, BBWWBW, BBBBWW, and BBBWBW.
		

Crossrefs

Cf. A001037 (k arbitrary), A008747 (k<=3).
Mathematica section of A032168 gives g.f. for k=m black beads and n-k white beads.

Programs

  • Mathematica
    (* The g.f. for the number of aperiodic necklaces (Lyndon words) with k<=m black beads and n-k white beads is *)
    gf[x_,m_]:=Sum[x^i/i Plus@@(MoebiusMu[#](1-x^#)^(-(i/#))&/@Divisors[i]),{i,1,m}]+x+1
    (* Here we have the case m=4 *)
  • PARI
    Vec((1+x-3*x^2-2*x^3+3*x^4+5*x^5-3*x^7+x^9)/((-1+x)^4*(1+x)^2*(1+x+x^2)) + O(x^60)) \\ Colin Barker, Oct 29 2016

Formula

G.f.: (1+x-3*x^2-2*x^3+3*x^4+5*x^5-3*x^7+x^9)/((-1+x)^4*(1+x)^2*(1+x+x^2)).
a(n) = a(n-1)+2*a(n-2)-a(n-3)-2*a(n-4)-a(n-5)+2*a(n-6)+a(n-7)-a(n-8) for n>7. - Colin Barker, Oct 29 2016

A277629 Number of aperiodic necklaces (Lyndon words) with k<=5 black beads and n-k white beads.

Original entry on oeis.org

1, 2, 1, 2, 3, 6, 9, 17, 26, 42, 62, 93, 130, 183, 246, 329, 428, 553, 698, 877, 1082, 1328, 1608, 1937, 2307, 2736, 3215, 3762, 4369, 5055, 5810, 6657, 7584, 8614, 9737, 10976, 12320, 13795, 15388, 17126, 18997, 21029, 23208, 25565, 28085, 30799, 33694, 36801, 40105, 43641, 47392
Offset: 0

Views

Author

Herbert Kociemba, Oct 24 2016

Keywords

Examples

			a(5)=6: The aperiodic necklaces are BWWWW, BBWWW, BWBWW, BBBWW, BBWBW, BBBBW.
		

Crossrefs

Cf. A001037 (k arbitrary), A008747 (k<=3), A277619 (k<=4). Mathematica section of A032168 gives g.f. for k=m black beads and n-k white beads.

Programs

  • Mathematica
    (* The g.f. for the number of aperiodic necklaces (Lyndon words) with k<=m black beads and n-k white beads is *)
    gf[x_, m_]:=Sum[x^i/i Plus@@(MoebiusMu[#](1-x^#)^(-(i/#))&/@Divisors[i]), {i, 1, m}]+x+1
    (* Here we have the case m=5 *)

Formula

G.f.: (-1 - x + 3*x^2 + 2*x^3 - 3*x^4 - 4*x^5 - 2*x^7 - 4*x^8 + 3*x^10 - 2*x^11 - 4*x^12 + x^14)/( (-1+x)^5*(1+x)^2*(1+x+x^2)*(1+x+x^2+x^3+x^4) ).

A008751 Expansion of (1+x^8)/((1-x)*(1-x^2)*(1-x^3)).

Original entry on oeis.org

1, 1, 2, 3, 4, 5, 7, 8, 11, 13, 16, 19, 23, 26, 31, 35, 40, 45, 51, 56, 63, 69, 76, 83, 91, 98, 107, 115, 124, 133, 143, 152, 163, 173, 184, 195, 207, 218, 231, 243, 256, 269, 283, 296, 311, 325, 340, 355
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • GAP
    Concatenation([1,1,2], List([3..50], n-> Int(((n-1)^2 +17)/6))); # G. C. Greubel, Aug 04 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 50); Coefficients(R!( (1+x^8)/((1-x)*(1-x^2)*(1-x^3)) )); // G. C. Greubel, Aug 04 2019
    
  • Mathematica
    CoefficientList[Series[(1+x^8)/((1-x)(1-x^2)(1-x^3)),{x,0,50}],x] (* Vincenzo Librandi, Feb 25 2012 *)
    Join[{1,1,2}, Floor[((Range[3, 50] -1)^2 +17)/6]] (* G. C. Greubel, Aug 04 2019 *)
  • PARI
    my(x='x+O('x^50)); Vec((1+x^8)/((1-x)*(1-x^2)*(1-x^3))) \\ G. C. Greubel, Aug 04 2019
    
  • Sage
    ((1+x^8)/((1-x)*(1-x^2)*(1-x^3))).series(x, 50).coefficients(x, sparse=False) # G. C. Greubel, Aug 04 2019
    

Formula

From Henry Bottomley, Sep 05 2000: (Start)
a(n) = floor((n^2 - 2*n + 18)/6) for n>2.
a(n) = a(n-2) + a(n-3) - a(n-5) + 2.
a(n) = A001399(n) + A001399(n-8).
a(n) = A008747(n-2) + 2 for n>2. (End)

A175812 Partial sums of ceiling(n^2/6).

Original entry on oeis.org

0, 1, 2, 4, 7, 12, 18, 27, 38, 52, 69, 90, 114, 143, 176, 214, 257, 306, 360, 421, 488, 562, 643, 732, 828, 933, 1046, 1168, 1299, 1440, 1590, 1751, 1922, 2104, 2297, 2502, 2718, 2947, 3188, 3442, 3709, 3990, 4284, 4593, 4916, 5254, 5607, 5976, 6360, 6761, 7178
Offset: 0

Views

Author

Mircea Merca, Dec 05 2010

Keywords

Comments

Partial sums of A008747.
There are several sequences of integers of the form ceiling(n^2/k) for whose partial sums we can establish identities as following (only for k = 2,...,8,10,11,12, 14,15,16,19,20,23,24).

Examples

			a(6) = 0 + 1 + 1 + 2 + 3 + 5 + 6 = 18.
		

Crossrefs

Cf. A008747.

Programs

  • Magma
    [Round((2*n+1)*(2*n^2+2*n+17)/72): n in [0..60]]; // Vincenzo Librandi, Jun 22 2011
    
  • Maple
    seq(floor((n+1)*(2*n^2+n+17)/36),n=0..50)
  • Mathematica
    Accumulate[Ceiling[Range[0,50]^2/6]] (* Harvey P. Dale, Jan 17 2016 *)
  • PARI
    a(n) = (n+1)*(2*n^2+n+17)\36; \\ Altug Alkan, Sep 21 2018

Formula

a(n) = round((2*n+1)*(2*n^2 + 2*n + 17)/72).
a(n) = floor((n+1)*(2*n^2 + n + 17)/36).
a(n) = ceiling((2*n^3 + 3*n^2 + 18*n)/36).
a(n) = round((2*n^3 + 3*n^2 + 18*n)/36).
a(n) = a(n-6) + (n+1)*(n-6) + 18, n > 5.
From Mircea Merca, Jan 09 2011: (Start)
a(n) = 2*a(n-1) - a(n-3) - a(n-4) + 2*a(n-6) - a(n-7), n > 6.
G.f.: x*(x^4+1) / ( (x+1)*(x^2+x+1)*(x-1)^4 ). (End)

A277631 Number of aperiodic necklaces (Lyndon words) with k<=6 black beads and n-k white beads.

Original entry on oeis.org

1, 2, 1, 2, 3, 6, 9, 18, 29, 51, 82, 135, 205, 315, 458, 662, 925, 1281, 1724, 2305, 3014, 3911, 4992, 6326, 7905, 9820, 12059, 14724, 17811, 21435, 25586, 30408, 35885, 42175, 49273, 57352, 66401, 76627, 88012, 100781, 114928, 130697, 148074, 167343, 188483, 211798, 237282, 265260, 295717, 329025, 365160
Offset: 0

Views

Author

Herbert Kociemba, Oct 24 2016

Keywords

Examples

			a(6)=9. The aperiodic necklaces are BWWWWW, BBWWWW, BWBWWW, BBBWWW, BBWBWW, BBWWBW, BBBBWW, BBBWBW and BBBBBW.
		

Crossrefs

Cf. A001037 (k arbitrary), A008747 (k<=3), A277619 (k<=4), A277629 (k<=5). Mathematica section of A032168 gives g.f. for k=m black beads and n-k white beads.

Programs

  • Mathematica
    (* The g.f. for the number of aperiodic necklaces (Lyndon words) with k<=m black beads and n-k white beads is *)
    gf[x_, m_]:=Sum[x^i/i Plus@@(MoebiusMu[#](1-x^#)^(-(i/#))&/@Divisors[i]), {i, 1, m}]+x+1
    (* Here we have the case m=6 *)

Formula

G.f.: (1 + x - 3*x^2 - 2*x^3 + 3*x^4 + 4*x^5-x^6 + 2*x^7 + 9*x^8 + 6*x^9 + 7*x^11 + 12*x^12 + 7*x^13 + 3*x^14 + 6*x^15 + 6*x^16 + x^17-3*x^18 + x^20)/( (-1+x)^6*(1+x)^3*(1-x+x^2)*(1+x+x^2)^2*(1+x+x^2+x^3+x^4) ).

A277633 Number of aperiodic necklaces (Lyndon words) with k<=8 black beads and n-k white beads.

Original entry on oeis.org

1, 2, 1, 2, 3, 6, 9, 18, 30, 56, 98, 180, 311, 546, 915, 1520, 2440, 3855, 5916, 8935, 13178, 19138, 27264, 38303, 52950, 72311, 97419, 129839, 171066, 223260, 288498, 369708, 469708, 592363, 741433, 921933, 1138761, 1398343, 1706956, 2072696, 2503513, 3009482, 3600515, 4289032, 5087253, 6010305, 7073122, 8293962
Offset: 0

Views

Author

Herbert Kociemba, Oct 24 2016

Keywords

Crossrefs

Cf. A001037 (k arbitrary), A008747 (k<=3), A277619 (k<=4), A277629 (k<=5), A277631 (k<=6).
The Mathematica section of A032168 gives the g.f. for k=m black beads and n-k white beads.

Programs

  • Mathematica
    (* The g.f. for the number of aperiodic necklaces (Lyndon words) with k<=m black beads and n-k white beads. Here we have the case m=8 *)
    gf[x_, m_]:=Sum[x^i/i Plus@@(MoebiusMu[#](1-x^#)^(-(i/#))&/@Divisors[i]), {i, 1, m}]+x+1

Formula

G.f.: 1 + x + x/(1-x) + 1/2*x^2*(1/(1-x)^2 - 1/(1-x^2)) + 1/3*x^3*(1/(1-x)^3 - 1/(1-x^3)) + 1/4*x^4*(1/(1-x)^4 - 1/(1-x^2)^2) + 1/5*x^5*(1/(1-x)^5 - 1/(1-x^5)) + 1/6*x^6*(1/(1-x)^6 - 1/(1-x^2)^3 - 1/(1-x^3)^2 + 1/(1-x^6)) + 1/7*x^7*(1/(1-x)^7 - 1/(1-x^7)) + 1/8*x^8*(1/(1-x)^8 - 1/(1-x^2)^4).
Showing 1-7 of 7 results.