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

A117662 a(n) = n*(n-1)*(n-2)*(n+3)/12.

Original entry on oeis.org

0, 0, 0, 3, 14, 40, 90, 175, 308, 504, 780, 1155, 1650, 2288, 3094, 4095, 5320, 6800, 8568, 10659, 13110, 15960, 19250, 23023, 27324, 32200, 37700, 43875, 50778, 58464, 66990, 76415, 86800, 98208, 110704, 124355, 139230, 155400, 172938, 191919
Offset: 0

Views

Author

Roger L. Bagula, Apr 11 2006

Keywords

Comments

Also, the number of external intersections of the diagonals of a general n-gon = (A176145) - (A000332). - Michel Lagneau, Apr 21 2010

Crossrefs

Essentially the same as A050297 and A005701.

Programs

  • Magma
    [n*(n-1)*(n-2)*(n+3)/12: n in [0..50]]; // Vincenzo Librandi, Oct 10 2013
  • Maple
    seq(n*(n-1)*(n-2)*(n+3)/12, n=0..40); # Wesley Ivan Hurt, Oct 10 2013
  • Mathematica
    Table[n(n-1)(n-2)(n+3)/12, {n,0,100}] (* Wesley Ivan Hurt, Sep 26 2013 *)
    CoefficientList[Series[x^3 (3 - x)/(1 - x)^5, {x, 0, 80}], x] (* Vincenzo Librandi, Oct 10 2013 *)
    LinearRecurrence[{5,-10,10,-5,1},{0,0,0,3,14},80] (* Harvey P. Dale, Jan 01 2025 *)

Formula

G.f.: x^3*(3-x)/(1-x)^5. - Colin Barker, Jan 31 2012
From Amiram Eldar, May 17 2025: (Start)
Sum_{n>=3} 1/a(n) = 137/300.
Sum_{n>=3} (-1)^(n+1)/a(n) = 32*log(2)/5 - 1247/300. (End)

Extensions

Edited by N. J. A. Sloane, Apr 23 2006

A211380 Number of pairs of intersecting diagonals in the interior and exterior of a regular n-gon.

Original entry on oeis.org

0, 1, 5, 15, 42, 94, 189, 340, 572, 903, 1365, 1981, 2790, 3820, 5117, 6714, 8664, 11005, 13797, 17083, 20930, 25386, 30525, 36400, 43092, 50659, 59189, 68745, 79422, 91288, 104445, 118966, 134960, 152505, 171717, 192679, 215514, 240310, 267197, 296268, 327660
Offset: 3

Views

Author

Martin Renner, Feb 07 2013

Keywords

Crossrefs

Programs

  • Maple
    a:=n->piecewise(n mod 2 = 0,1/8*n*(n^3-11*n^2+43*n-58),n mod 2 = 1,1/8*n*(n-3)*(n^2-8*n+19),0);
  • Mathematica
    Drop[CoefficientList[Series[x^4(2x^5-3x^4-7x^3-x^2-2x-1)/((x-1)^5(x+1)^2),{x,0,50}],x],3] (* or *) LinearRecurrence[{3,-1,-5,5,1,-3,1},{0,1,5,15,42,94,189},50] (* Harvey P. Dale, Dec 03 2022 *)
  • Python
    def A211380(n): return n*(n*(n*(n-11)+43)-58+(n&1))>>3 # Chai Wah Wu, Nov 22 2023

Formula

a(n) = 1/8*n*(n^3-11*n^2+43*n-58) for n even;
a(n) = 1/8*n*(n-3)*(n^2-8*n+19) for n odd.
a(n) = A176145(n) - A211379(n).
G.f.: x^4*(2*x^5-3*x^4-7*x^3-x^2-2*x-1) / ((x-1)^5*(x+1)^2). [Colin Barker, Feb 14 2013]

A294259 a(n) = n*(n^3 + 2*n^2 - 5*n + 10)/8.

Original entry on oeis.org

0, 1, 4, 15, 43, 100, 201, 364, 610, 963, 1450, 2101, 2949, 4030, 5383, 7050, 9076, 11509, 14400, 17803, 21775, 26376, 31669, 37720, 44598, 52375, 61126, 70929, 81865, 94018, 107475, 122326, 138664, 156585, 176188, 197575, 220851, 246124, 273505, 303108, 335050, 369451
Offset: 0

Views

Author

Bruno Berselli, Oct 30 2017

Keywords

Comments

a(n) is even for n in A047481.
Also, a(n) is divisible by 5 if and only if n belongs to A047218.

Examples

			After 0:
1   =                     -(0) + (1);
4   =                 -(0 + 1) + (2 + 2*3/2);
15  =             -(0 + 1 + 2) + (3 + 4 + 5 + 3*4/2);
43  =         -(0 + 1 + 2 + 3) + (4 + 5 + 6 + 7 + 8 + 9 + 4*5/2);
100 =     -(0 + 1 + 2 + 3 + 4) + (5 + 6 + 7 + 8 + ... + 14 + 5*6/2);
201 = -(0 + 1 + 2 + 3 + 4 + 5) + (6 + 7 + 8 + 9 + ... + 20 + 6*7/2), etc.
		

Crossrefs

Cf. A101374: the sums in the Example section end in squares.
Subsequence of A047207.

Programs

  • GAP
    List([0..50], n -> n*(n^3+2*n^2-5*n+10)/8);
  • Magma
    [n*(n^3+2*n^2-5*n+10)/8: n in [0..50]];
    
  • Maple
    a := n -> n*(n*(n*(n+2)-5)+10)/8: seq(a(n),n=0..41); # Peter Luschny, Nov 06 2017
  • Mathematica
    Table[n (n^3 + 2 n^2 - 5 n + 10)/8, {n, 0, 50}]
    LinearRecurrence[{5,-10,10,-5,1},{0,1,4,15,43},50] (* Harvey P. Dale, Jan 08 2024 *)
  • Maxima
    makelist(n*(n^3+2*n^2-5*n+10)/8, n, 0, 50);
    
  • PARI
    vector(50, n, n--; n*(n^3+2*n^2-5*n+10)/8)
    
  • Sage
    [n*(n^3+2*n^2-5*n+10)/8 for n in range(50)]
    

Formula

O.g.f.: x*(1 - x + 5*x^2 - 2*x^3)/(1 - x)^5.
E.g.f.: x*(8 + 8*x + 8*x^2 + x^3)*exp(x)/8.
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5) for n>4.
a(n) = 2*n + Sum_{i=0..n} i*(i^2 - 3)/2.

A211381 Number of pairs of intersecting diagonals in the exterior of a regular n-gon.

Original entry on oeis.org

0, 0, 0, 0, 7, 24, 63, 130, 242, 408, 650, 980, 1425, 2000, 2737, 3654, 4788, 6160, 7812, 9768, 12075, 14760, 17875, 21450, 25542, 30184, 35438, 41340, 47957, 55328, 63525, 72590, 82600, 93600, 105672, 118864, 133263, 148920, 165927, 184338, 204250, 225720
Offset: 3

Views

Author

Martin Renner, Feb 07 2013

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> `if`(n mod 2 = 0, 1/24*n*(n-4)*(n-6)*(2*n-7), 1/24*n*(n-3)*(n-5)*(2*n-11)): seq (a(n), n=3..40);

Formula

a(n) = 1/24*n*(n-4)*(n-6)*(2*n-7) for n even.
a(n) = 1/24*n*(n-3)*(n-5)*(2*n-11) for n odd.
a(n) = A211380(n) - A000332(n).
G.f.: x^7*(2*x^2-3*x-7) / ((x-1)^5*(x+1)^2). [Colin Barker, Feb 14 2013]

A257925 a(n) = (n^2 - n + 1)*(n^2 + n - 1).

Original entry on oeis.org

1, 15, 77, 247, 609, 1271, 2365, 4047, 6497, 9919, 14541, 20615, 28417, 38247, 50429, 65311, 83265, 104687, 129997, 159639, 194081, 233815, 279357, 331247, 390049, 456351, 530765, 613927, 706497, 809159, 922621
Offset: 1

Views

Author

Matthew Ryan, Apr 17 2016

Keywords

Comments

Subsequence of a(m,n)=(m^2 + n).(n^2 + m)/(m - n)^3 with m=n-1. Q N4 of the 2012 International Mathematical Olympiad paper poses the problem of proving more than 500 solutions exist below 2012 for the equation: a(m,n).(m - n)^3=(m^2 + n).(n^2 + m). Such solutions a(m,n) were called 'Friendly'. If m=2k-1 and n=k-1, solutions of the form a=4k-3 for some integer k, satisfy this requirement although others do exist for other (m,n) pairs e.g. if (m,n)=(1,2), a(m,n)=15.
If m=n-2, a(n)=(n^2 - 3*n + 4)*(n^2 + n - 2)/8. This is the sequence A176145 [t*(t-3)*(t^2-7*t+14)/8] with t=n+2.
Satisfies a linear recurrence having signature (5, -10, 10, -5, 1). - Harvey P. Dale, Apr 18 2019

Examples

			For n=1, a(1) = 1;
For n=2, a(2) = 15;
For n=3, a(3) = 77.
		

Crossrefs

Programs

  • Mathematica
    Table[(n^2-n+1)(n^2+n-1),{n,40}] (* Harvey P. Dale, Apr 18 2019 *)
  • PARI
    a(n) = (n^2 - n + 1)*(n^2 + n - 1); \\ Michel Marcus, Apr 17 2016

Formula

a(n) = (n^2 - n + 1)*(n^2 + n - 1).
a(n) = A002061(n)*A028387(n-1). - Michel Marcus, Apr 17 2016
Showing 1-5 of 5 results.