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-20 of 36 results. Next

A358575 Triangle read by rows where T(n,k) is the number of unlabeled n-node rooted trees with k = 0..n-1 internal (non-leaf) nodes.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 4, 1, 0, 1, 4, 8, 6, 1, 0, 1, 5, 14, 18, 9, 1, 0, 1, 6, 21, 39, 35, 12, 1, 0, 1, 7, 30, 72, 97, 62, 16, 1, 0, 1, 8, 40, 120, 214, 212, 103, 20, 1, 0, 1, 9, 52, 185, 416, 563, 429, 161, 25, 1
Offset: 1

Views

Author

Gus Wiseman, Nov 23 2022

Keywords

Examples

			Triangle begins:
    1
    0    1
    0    1    1
    0    1    2    1
    0    1    3    4    1
    0    1    4    8    6    1
    0    1    5   14   18    9    1
    0    1    6   21   39   35   12    1
    0    1    7   30   72   97   62   16    1
    0    1    8   40  120  214  212  103   20    1
    0    1    9   52  185  416  563  429  161   25    1
		

Crossrefs

Row sums are A000081.
Column k = n - 2 appears to be A002620.
Column k = 3 appears to be A006578.
The version for height instead of internal nodes is A034781.
Equals A055277 with rows reversed.
The ordered version is A090181 or A001263.
The central column is A185650, ordered A000891.
The left half sums to A358583, strict A358581.
The right half sums to A358584, strict A358582.

Programs

  • Mathematica
    art[n_]:=If[n==1,{{}},Join@@Table[Select[Tuples[art/@c],OrderedQ],{c,Join@@Permutations/@IntegerPartitions[n-1]}]];
    Table[Length[Select[art[n],Count[#,[_],{0,Infinity}]==k&]],{n,1,10},{k,0,n-1}]

A111384 a(n) = binomial(n,3) - binomial(floor(n/2),3) - binomial(ceiling(n/2),3).

Original entry on oeis.org

0, 0, 0, 1, 4, 9, 18, 30, 48, 70, 100, 135, 180, 231, 294, 364, 448, 540, 648, 765, 900, 1045, 1210, 1386, 1584, 1794, 2028, 2275, 2548, 2835, 3150, 3480, 3840, 4216, 4624, 5049, 5508, 5985, 6498, 7030, 7600, 8190, 8820, 9471, 10164, 10879, 11638, 12420, 13248
Offset: 0

Views

Author

N. J. A. Sloane, Nov 10 2005

Keywords

Comments

a(n) is the maximum number of open triangles in a simple, undirected graph with n vertices. - Eugene Lykhovyd, Oct 20 2018
a(n) is the maximum number of elements of the set T := {3} u (IN \ 3IN) that can be written as a sum of three distinct elements of an n-element subset of T, see arXiv link 2309.14840. - Markus Sigg, Sep 27 2023
a(n) is the maximum number of triples (i.e., 3-element subsets of {1..n}) such that there exists a 2-coloring of {1..n} in which no triple is monochromatic. For the contrasting minimum number of triples such that every 2-coloring of {1..n} results in at least one monochromatic triple, see A385403. - David Dewan, Jul 04 2025

Crossrefs

Programs

  • GAP
    a:=[0,0,0,1,4,9];; for n in [7..50] do a[n]:=2*a[n-1]+a[n-2]-4*a[n-3]+a[n-4]+2*a[n-5]-a[n-6]; od; a; # Muniru A Asiru, Oct 21 2018
  • Magma
    [Binomial(n, 3) - Binomial(Floor(n/2), 3) - Binomial(Ceiling(n/2), 3): n in [0..50]]; // Vincenzo Librandi, Oct 20 2018
    
  • Maple
    seq(floor(n/2)*ceil(n/2)*(n-2)/2,n=0..50); # James R. Buddenhagen, Nov 11 2009
  • Mathematica
    LinearRecurrence[{2, 1, -4, 1, 2, -1}, {0, 0, 0, 1, 4, 9}, 50] (* Vincenzo Librandi, Oct 20 2018 *)
  • PARI
    a(n)=floor(n/2)*ceil(n/2)*(n-2)/2 \\ Charles R Greathouse IV, Oct 16 2015
    

Formula

a(n) = floor(n/2)*ceiling(n/2)*(n-2)/2. - James R. Buddenhagen, Nov 11 2009
From R. J. Mathar, Mar 18 2010: (Start)
a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + a(n-4) + 2*a(n-5) - a(n-6).
G.f.: x^3*(1+2*x)/ ((1+x)^2 * (x-1)^4). (End)
a(n) = A006918(n-2) + 2*A006918(n-3). - R. J. Mathar, Jan 20 2018
a(n) = (n-2)*n^2/8 for even n, a(n) = (n-2)*(n^2-1)/8 for odd n. - Markus Sigg, Sep 26 2023
Sum_{n>=3} 1/a(n) = 4/3 - Pi^2/6 + 8*log(2)/3. - Amiram Eldar, Oct 10 2023
E.g.f.: (x + 2)*(x*(x - 1)*cosh(x) + (x^2 - x + 1)*sinh(x))/8. - Stefano Spezia, Apr 08 2024

A070893 Let r, s, t be three permutations of the set {1,2,3,..,n}; a(n) = value of Sum_{i=1..n} r(i)*s(i)*t(i), with r={1,2,3,..,n}; s={n,n-1,..,1} and t={n,n-2,n-4,...,1,...,n-3,n-1}.

Original entry on oeis.org

1, 6, 19, 46, 94, 172, 290, 460, 695, 1010, 1421, 1946, 2604, 3416, 4404, 5592, 7005, 8670, 10615, 12870, 15466, 18436, 21814, 25636, 29939, 34762, 40145, 46130, 52760, 60080, 68136, 76976, 86649, 97206, 108699, 121182, 134710, 149340
Offset: 1

Views

Author

Wouter Meeussen, May 22 2002

Keywords

Comments

See A070735 for the minimal values for these products. This sequence is an upper bound. The third permutation 't'= ceiling(abs(range(n-1/2,-n,-2))) is such that it associates its smallest factor with the largest factor of the product 'r'*'s'.
We observe that is the transform of A002717 by the following transform T: T(u_0,u_1,u_2,u_3,...) = (u_0,u_0+u_1, u_0+u_1+u_2, u_0+u_1+u_2+u_3+u_4,...). In other words, v_p = Sum_{k=0..p} u_k and the g.f. phi_v of v is given by phi_v = phi_u/(1-z). - Richard Choulet, Jan 28 2010

Examples

			{1,2,3,4,5,6,7}*{7,6,5,4,3,2,1}*{7,5,3,1,2,4,6} gives {49,60,45,16,30,48,42}, with sum 290, so a(7)=290.
		

Crossrefs

Cf. A070735, A082289. a(n)=A082290(2n-2).
Cf. A002717 (first differences). - Bruno Berselli, Aug 26 2011
Column k=3 of A166278. - Alois P. Heinz, Nov 02 2012

Programs

  • Magma
    [(1/96)*(2*n*(n+2)*(3*n^2+10*n+4)+3*(-1)^n-3): n in [1..40]]; // Vincenzo Librandi, Aug 26 2011
  • Mathematica
    Table[Plus@@(Range[n]*Range[n, 1, -1]*Ceiling[Abs[Range[n-1/2, -n, -2]]]), {n, 49}];
    (* or *)
    CoefficientList[Series[ -(1+2x)/(-1+x)^5/(1+x), {x, 0, 48}], x]//Flatten
  • PARI
    a(n)=sum(i=1,n,i*(n+1-i)*ceil(abs(n+3/2-2*i)))
    
  • PARI
    a(n)=polcoeff(if(n<0,x^4*(2+x)/((1+x)*(1-x)^5),x*(1+2*x)/((1+x)*(1-x)^5))+x*O(x^abs(n)),abs(n))
    

Formula

G.f.: x*(1+2*x)/((1+x)*(1-x)^5). - Michael Somos, Apr 07 2003
a(n) = 3*a(n-1) - 2*a(n-2) - 2*a(n-3) + 3*a(n-4) - a(n-5) + 3. If sequence is also defined for n <= 0 by this equation, then a(n)=0 for -3 <= n <= 0 and a(n)=A082289(-n) for n <= -4. - Michael Somos, Apr 07 2003
a(n) = (1/96)*(2*n*(n+2)*(3*n^2+10*n+4)+3*(-1)^n-3). a(n) - a(n-2) = A002411(n). - Bruno Berselli, Aug 26 2011

A139592 A033585(n) followed by A139271(n+1).

Original entry on oeis.org

0, 2, 10, 20, 36, 54, 78, 104, 136, 170, 210, 252, 300, 350, 406, 464, 528, 594, 666, 740, 820, 902, 990, 1080, 1176, 1274, 1378, 1484, 1596, 1710, 1830, 1952, 2080, 2210, 2346, 2484, 2628, 2774, 2926, 3080, 3240, 3402, 3570, 3740
Offset: 0

Views

Author

Omar E. Pol, May 03 2008

Keywords

Comments

Sequence found by reading the line from 0, in the direction 0, 2,... and the same line from 0, in the direction 0, 10,..., in the square spiral whose vertices are the triangular numbers A000217.
a(n) = 2*A006578(n) - A002378(n)/2 = 2*A035608(n). [From Reinhard Zumkeller, Feb 07 2010]

Examples

			Array begins:
0, 2
10, 20
36, 54
78, 104
		

Crossrefs

Formula

Array read by rows: row n gives 8*n^2 + 2n, 8*(n+1)^2 - 6(n+1).
a(n) = 2*floor((n + 1/4)^2). [From Reinhard Zumkeller, Feb 07 2010]
G.f.: 2*x*(1+3*x)/((1-x)^3*(1+x)). [Colin Barker, Apr 26 2012]

A129819 Antidiagonal sums of triangular array T: T(j,k) = (k+1)/2 for odd k, T(j,k) = 0 for k = 0, T(j,k) = j+1-k/2 for even k > 0; 0 <= k <= j.

Original entry on oeis.org

0, 0, 1, 1, 3, 4, 7, 8, 12, 14, 19, 21, 27, 30, 37, 40, 48, 52, 61, 65, 75, 80, 91, 96, 108, 114, 127, 133, 147, 154, 169, 176, 192, 200, 217, 225, 243, 252, 271, 280, 300, 310, 331, 341, 363, 374, 397, 408, 432, 444, 469, 481, 507, 520, 547, 560, 588, 602, 631
Offset: 0

Views

Author

Paul Curtz, May 20 2007

Keywords

Comments

Interleaving of A077043 and A006578.
First differences are in A124072.
If the values of the second, fourth, sixth, ... column are replaced by the corresponding negative values, the antidiagonal sums of the resulting triangular array are 0, 0, 1, 1, -1, -2, -1, -2, -6, -8, -7, -9, ... .
Row sums of triangle A168316 = (1, 1, 3, 4, 7, 8, 12, ...). - Gary W. Adamson, Nov 22 2009

Examples

			First seven rows of T are
  0;
  0, 1;
  0, 1, 2;
  0, 1, 3, 2;
  0, 1, 4, 2, 3;
  0, 1, 5, 2, 4, 3;
  0, 1, 6, 2, 5, 3, 4;.
		

Crossrefs

Programs

  • Magma
    m:=59; M:=ZeroMatrix(IntegerRing(), m, m); for j:=1 to m do for k:=2 to j do if k mod 2 eq 0 then M[j, k]:= k div 2; else M[j, k]:=j-(k div 2); end if; end for; end for; [ &+[ M[j-k+1, k]: k in [1..(j+1) div 2] ]: j in [1..m] ]; // Klaus Brockhaus, Jul 16 2007
    
  • Magma
    A129819:= func< n | Floor(((n-1)*(3*n+1) +(2*n+5)*((n+1) mod 2))/16) >;
    [A129819(n): n in [0..70]]; // G. C. Greubel, Sep 19 2024
    
  • Mathematica
    CoefficientList[Series[x^2*(1+x^2+x^3)/((1-x)*(1-x^2)*(1-x^4)), {x, 0, 70}], x] (* G. C. Greubel, Sep 19 2024 *)
  • PARI
    {vector(59, n, (n-2+n%2)*(n+n%2)/8+floor((n-2-n%2)^2/16))} \\ Klaus Brockhaus, Jul 16 2007
    
  • SageMath
    def A129819(n): return ((n-1)*(3*n+1) + (2*n+5)*((n+1)%2))//16
    [A129819(n) for n in range(71)] # G. C. Greubel, Sep 19 2024

Formula

a(n) = a(n-1) + a(n-2) - a(n-3) + a(n-4) - a(n-5) - a(n-6) + a(n-7) for n > 6, with a(0) = 0, a(1) = 0, a(2) = 1, a(3) = 1, a(4) = 3, a(5) = 4, a(6) = 7.
G.f.: x^2*(1+x^2+x^3)/((1-x)^3*(1+x)^2*(1+x^2)).
a(n) = (3/16)*(n+2)*(n+1) - (5/8)*(n+1) + 7/32 + (3/32)*(-1)^n + (1/16)*(n+1)*(-1)^n - (1/8)*cos(n*Pi/2) + (1/8)*sin(n*Pi/2). - Richard Choulet, Nov 27 2008

Extensions

Edited and extended by Klaus Brockhaus, Jul 16 2007

A210977 A005475 and positive terms of A000566 interleaved.

Original entry on oeis.org

0, 1, 3, 7, 11, 18, 24, 34, 42, 55, 65, 81, 93, 112, 126, 148, 164, 189, 207, 235, 255, 286, 308, 342, 366, 403, 429, 469, 497, 540, 570, 616, 648, 697, 731, 783, 819, 874, 912, 970, 1010, 1071, 1113, 1177, 1221, 1288, 1334, 1404, 1452, 1525, 1575, 1651, 1703, 1782, 1836, 1918, 1974, 2059
Offset: 0

Views

Author

Omar E. Pol, Aug 03 2012

Keywords

Comments

Vertex number of a square spiral similar to A085787.
Partial sums of the sequence formed by A005843 and A016777 interleaved.

Crossrefs

Members of this family are A093005, this sequence, A006578, A210978, A181995, A210981, A210982.

Formula

G.f.: -x*(1+2*x+2*x^2) / ( (1+x)^2*(x-1)^3 ). - R. J. Mathar, Aug 07 2012
a(n) = (10*n^2+6*n-1-(2*n-1)*(-1)^n)/16. - Luce ETIENNE, Oct 04 2014

A210982 Zero together with A126264 and positive terms of A051624 interleaved.

Original entry on oeis.org

0, 1, 8, 12, 26, 33, 54, 64, 92, 105, 140, 156, 198, 217, 266, 288, 344, 369, 432, 460, 530, 561, 638, 672, 756, 793, 884, 924, 1022, 1065, 1170, 1216, 1328, 1377, 1496, 1548, 1674, 1729, 1862, 1920, 2060, 2121, 2268, 2332, 2486, 2553, 2714, 2784, 2952, 3025, 3200, 3276, 3458, 3537, 3726
Offset: 0

Views

Author

Omar E. Pol, Aug 03 2012

Keywords

Comments

Vertex number of a square spiral similar to A195162.
This is the case k=5 of the formula b(n,k) = ( 2*(k+5)*n^2+2*(k+3)*n-(k+1)+(2*(k-1)*n+k+1)*(-1)^n )/16. Sequences of the same family: A093025 (k=-1, with an initial 0), A210977 (k=0), A006578 (k=1), A210978 (k=2), A181995 (k=3, with one 0 only), A210981 (k=4). - Luce ETIENNE, Oct 30 2014

Crossrefs

Members of this family are A093005, A210977, A006578, A210978, A181995, A210981, this sequence.

Programs

  • Magma
    [(10*n^2+8*n-3+(4*n+3)*(-1)^n )/8: n in [0..60]]; // Vincenzo Librandi, Oct 31 2014
    
  • Mathematica
    Table[(10*n^2 + 8*n - 3 + (4*n + 3)*(-1)^n)/8, {n, 0, 50}] (* G. C. Greubel, Aug 23 2017 *)
  • PARI
    my(x='x+O('x^50)); Vec(x*(1+7*x+2*x^2)/((1+x)^2*(1-x)^3)) \\ G. C. Greubel, Aug 23 2017

Formula

G.f.: x*(1+7*x+2*x^2) / ( (1+x)^2*(1-x)^3 ). - R. J. Mathar, Aug 07 2012
a(n) = (10*n^2 +8*n -3 +(4*n+3)*(-1)^n)/8. - Luce ETIENNE, Oct 14 2014
E.g.f.: (1/8)*((10*x^3 + 18*x -3)*exp(x) - (4*x - 3)*exp(-x)). - G. C. Greubel, Aug 23 2017
Sum_{n>=1} 1/a(n) = 5/9 + (sqrt(1-2/sqrt(5))/6 + sqrt(1+2/sqrt(5))/8)*Pi + 7*log(phi)*sqrt(5)/24 - 5*log(5)/48, where phi is the golden ratio (A001622). - Amiram Eldar, Aug 21 2022

A181995 a(n) = if n mod 2 = 1 then n*(n - 1) else (n - 1)^2 + (n - 2)/2.

Original entry on oeis.org

0, 0, 1, 6, 10, 20, 27, 42, 52, 72, 85, 110, 126, 156, 175, 210, 232, 272, 297, 342, 370, 420, 451, 506, 540, 600, 637, 702, 742, 812, 855, 930, 976, 1056, 1105, 1190, 1242, 1332, 1387, 1482, 1540, 1640, 1701, 1806, 1870, 1980, 2047, 2162, 2232, 2352, 2425, 2550, 2626, 2756, 2835, 2970, 3052, 3192, 3277, 3422, 3510, 3660, 3751, 3906, 4000, 4160, 4257, 4422
Offset: 0

Views

Author

N. J. A. Sloane, Apr 05 2012

Keywords

Comments

Decagonal numbers (A001107) and twice second hexagonal numbers (A002943) interleaved. - Omar E. Pol, Aug 03 2012
Similar to A074377. Members of this family are A093005, A210977, A006578, A210978, this sequence, A210981, A210982. - Omar E. Pol, Aug 09 2012
Number of kites whose vertices are the vertices a regular 2n-gon. - Halil Ibrahim Kanpak, Nov 08 2018

Crossrefs

Programs

  • Magma
    [n*(4*n - 5 - (-1)^n)/4 : n in [0..80]]; // Wesley Ivan Hurt, Apr 11 2016
  • Maple
    f:=n->if n mod 2 = 1 then n*(n-1) else (n-1)^2+(n-2)/2; fi;
    [seq(f(n),n=0..130)];
  • Mathematica
    Table[n*(4*n - 5 - (-1)^n)/4, {n, 0, 80}] (* Wesley Ivan Hurt, Apr 11 2016 *)
  • PARI
    a(n)=n*(4*n-5-(-1)^n)/4 \\ Charles R Greathouse IV, Oct 07 2015
    

Formula

G.f.: -x^2*(1 + 5*x + 2*x^2)/((1 + x)^2*(x - 1)^3). - R. J. Mathar, Apr 06 2012
a(n) = n*(4*n - 5 - (-1)^n)/4. - Luce ETIENNE, Oct 04 2014
From Wesley Ivan Hurt, Apr 11 2016: (Start)
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n>4.
a(n) = Sum_{i=floor((n-1)/2)..floor(3*(n-1)/2)} i. (End)
E.g.f.: x^2*cosh(x) - x*(1 - 2*x)*sinh(x)/2. - Franck Maminirina Ramaharo, Nov 08 2018

A210978 A186029 and positive terms of A001106 interleaved.

Original entry on oeis.org

0, 1, 5, 9, 17, 24, 36, 46, 62, 75, 95, 111, 135, 154, 182, 204, 236, 261, 297, 325, 365, 396, 440, 474, 522, 559, 611, 651, 707, 750, 810, 856, 920, 969, 1037, 1089, 1161, 1216, 1292, 1350, 1430, 1491, 1575, 1639, 1727, 1794, 1886, 1956, 2052, 2125, 2225, 2301
Offset: 0

Views

Author

Omar E. Pol, Aug 03 2012

Keywords

Comments

Vertex number of a square spiral similar to A118277.

Crossrefs

Members of this family are A093005, A210977, A006578, this sequence, A181995, A210981, A210982.

Programs

  • PARI
    Vec(-x*(2*x^2+4*x+1)/((x-1)^3*(x+1)^2) + O(x^100)) \\ Colin Barker, Sep 15 2013

Formula

a(n) = (3*(-1+(-1)^n)+2*(5+(-1)^n)*n+14*n^2)/16. a(n) = a(n-1)+2*a(n-2)-2*a(n-3)-a(n-4)+a(n-5). G.f.: -x*(2*x^2+4*x+1) / ((x-1)^3*(x+1)^2). - Colin Barker, Sep 15 2013

Extensions

More terms from Colin Barker, Sep 15 2013

A210981 A062725 and positive terms of A051682 interleaved.

Original entry on oeis.org

0, 1, 7, 11, 23, 30, 48, 58, 82, 95, 125, 141, 177, 196, 238, 260, 308, 333, 387, 415, 475, 506, 572, 606, 678, 715, 793, 833, 917, 960, 1050, 1096, 1192, 1241, 1343, 1395, 1503, 1558, 1672, 1730, 1850, 1911, 2037, 2101, 2233, 2300, 2438, 2508, 2652, 2725, 2875, 2951, 3107, 3186, 3348
Offset: 0

Views

Author

Omar E. Pol, Aug 03 2012

Keywords

Comments

Vertex number of a square spiral similar to A195160.

Crossrefs

Members of this family are A093005, A210977, A006578, A210978, A181995, this sequence, A210982.

Programs

  • Mathematica
    LinearRecurrence[{1,2,-2,-1,1},{0,1,7,11,23},70] (* Harvey P. Dale, Jun 29 2023 *)

Formula

G.f.: -x*(1+6*x+2*x^2) / ( (1+x)^2*(x-1)^3 ). - R. J. Mathar, Aug 07 2012
a(n) = ( 18*n^2+14*n-5+(6*n+5)*(-1)^n )/16. - Luce ETIENNE, Oct 14 2014
Previous Showing 11-20 of 36 results. Next