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 61-70 of 92 results. Next

A247587 Number of obtuse triangles with integer sides at most n.

Original entry on oeis.org

0, 0, 1, 2, 4, 8, 13, 20, 30, 42, 57, 74, 95, 120, 149, 182, 219, 261, 309, 362, 420, 485, 556, 632, 715, 806, 906, 1012, 1125, 1247, 1377, 1517, 1666, 1824, 1993, 2170, 2358, 2555, 2765, 2986
Offset: 1

Views

Author

Vladimir Letsko, Sep 20 2014

Keywords

Examples

			a(4) = 2 because there are 2 obtuse triangles with integer sides less than or equal to 4: (2,2,3); (2,3,4).
		

Crossrefs

Programs

  • Maple
    tr_o:=proc(n) local a, b, c, t, d; t:=0:
      for a to n do
      for b from a to n do
      for c from b to min(a+b-1, n) do
      d:=a^2+b^2-c^2:
      if d<0 then t:=t+1 fi
      od od od;
      [n, t]; end;
  • PARI
    a(n)=sum(a=2,n-1,sum(b=a,n-1,max(0,min(n,a+b-1)-sqrtint(a^2+b^2)))) \\ Charles R Greathouse IV, Sep 20 2014
    
  • PARI
    obtuse(n)=sum(a=2,n-1, max(0, sqrtint(n^2-1-a^2)-max(a,n-a+1)+1))
    s=0; vector(100,n, s+=obtuse(n)) \\ Charles R Greathouse IV, Sep 20 2014

A057884 A square array based on tetrahedral numbers (A000292) with each term being the sum of 2 consecutive terms in the previous row.

Original entry on oeis.org

1, 0, 1, 4, 1, 1, 0, 4, 2, 1, 10, 4, 5, 3, 1, 0, 10, 8, 7, 4, 1, 20, 10, 14, 13, 10, 5, 1, 0, 20, 20, 22, 20, 14, 6, 1, 35, 20, 30, 34, 35, 30, 19, 7, 1, 0, 35, 40, 50, 56, 55, 44, 25, 8, 1, 56, 35, 55, 70, 84, 91, 85, 63, 32, 9, 1, 0, 56, 70, 95, 120, 140, 146, 129, 88, 40, 10, 1
Offset: 0

Views

Author

Henry Bottomley, Nov 20 2000

Keywords

Examples

			Rows are (1,0,4,0,10,0,20,...), (1,1,4,4,10,10,20,...), (1,2,5,8,14,20,30,...), (1,3,7,13,22,34,50,...), (1,4,10,20,35,56,84,...) etc.
		

Crossrefs

Rows are A000292 with zeros, A058187 (A000292 with terms duplicated), A006918, A002623, A000292, A000330, A005900, A001845, A008412.

Formula

T(n, k)=T(n-1, k-1)+T(n, k-1) with T(0, k)=1, T(4, 1)=4, T(0, 2n)=T(4, n) and T(0, 2n+1)=0. Coefficient of x^n in expansion of (1+x)^k/(1-x^2)^4.

A078126 Negative determinant of n X n matrix M_{i,j}=1 if i=j or i+j=1 (mod 2).

Original entry on oeis.org

-1, -1, 0, 1, 3, 5, 8, 11, 15, 19, 24, 29, 35, 41, 48, 55, 63, 71, 80, 89, 99, 109, 120, 131, 143, 155, 168, 181, 195, 209, 224, 239, 255, 271, 288, 305, 323, 341, 360, 379, 399, 419, 440, 461, 483, 505, 528, 551, 575, 599, 624, 649, 675, 701, 728, 755, 783, 811
Offset: 0

Views

Author

Michael Somos, Nov 18 2002

Keywords

Comments

Apparently, also 6(n+3) times the Dedekind sum s(2,n+3). - Ralf Stephan, Sep 16 2013

Examples

			G.f. = -1 - x + x^3 + 3*x^4 + 5*x^5 + 8*x^6 + 11*x^7 + 15*x^8 + 19*x^9 + ...
		

Crossrefs

Programs

  • Maple
    A078126:=n->floor((n + 2)*(n - 2)/4); seq(A078126(n), n=0..100); # Wesley Ivan Hurt, Jan 30 2014
  • Mathematica
    Table[Floor[(n + 2)(n - 2)/4], {n, 0, 100}] (* Wesley Ivan Hurt, Jan 30 2014 *)
    LinearRecurrence[{2,0,-2,1},{-1,-1,0,1},60] (* Harvey P. Dale, Sep 10 2015 *)
    a[n_]:=-Det[Table[If[i==j ||Mod[i+j,2]==1,1,0],{i,n},{j,n}]]; Join[{-1},Array[a,57]] (* Stefano Spezia, Aug 06 2024 *)
  • PARI
    a(n)=-matdet(matrix(n,n,i,j,i==j||((i+j)%2))) /* Ralf Stephan, Sep 16 2013 */
    
  • PARI
    a(n)=sumdedekind(2,n+3)*6*(n+3) /* Ralf Stephan, Sep 16 2013 */

Formula

G.f.: (-1 + x + 2*x^2 - x^3) / ((1 - x^2) * (1 - x)^2).
a(n) = A002620(n) - 1.
a(n) = A002623(n-2) - A002623(n-3) - 1.
a(n) = A024206(n-1) for all n in Z.
a(n) = floor( (n+2)(n-2)/4 ). - Wesley Ivan Hurt, Jun 16 2013
A004526(n) = a(n) - a(n-1) for all n in Z. - Michael Somos, Aug 22 2016
a(n) = Sum_{i=1..n+2} floor((n-i+1)/2). - Wesley Ivan Hurt, Sep 12 2017
E.g.f.: ((x^2 + x - 4)*cosh(x) + (x^2 + x - 5)*sinh(x))/4. - Stefano Spezia, Aug 06 2024

Extensions

A-number twister corrected in cross-refs by R. J. Mathar, Feb 11 2010

A095941 Number of subsets of {1,2,...,n} such that every number in the set is no larger than the sum of the other numbers in the set.

Original entry on oeis.org

0, 0, 1, 4, 13, 35, 85, 194, 425, 904, 1885, 3878, 7904, 16008, 32282, 64913, 130280, 261145, 523036, 1047017, 2095222, 4191927, 8385695, 16773663, 33550117, 67103645, 134211440, 268427907, 536861880, 1073731053, 2147470842, 4294952115, 8589916646, 17179848025
Offset: 1

Views

Author

Michael Rieck and W. Edwin Clark, Jul 13 2004

Keywords

Comments

These are the lengths of the sides of a (possibly degenerate) polygon.
Might be called "coalition sets": no member of the set can outnumber all of the others, so a coalition is needed in order to get a majority. - Jaap Spies, Jul 14 2004

Crossrefs

See A095944 for formula. Cf. A002623.

Programs

  • Maple
    b:= proc(n, s) option remember; `if`(s<1, 2^n,
         `if`(n*(n+1)/2 add(b(j-1, j), j=1..n):
    seq(a(n), n=1..37);  # Alois P. Heinz, Feb 13 2021
  • Mathematica
    max = 30; -Accumulate[ Accumulate[q = PartitionsQ[ Range[max]]] + 1] + Accumulate[q] + 2^Range[max] - 1 (* Jean-François Alcover, Aug 01 2013, after A095944 *)

Extensions

Extended by Alexander D. Healy using data from A095944, Nov 18 2005

A128494 Coefficient table for sums of Chebyshev's S-Polynomials.

Original entry on oeis.org

1, 1, 1, 0, 1, 1, 0, -1, 1, 1, 1, -1, -2, 1, 1, 1, 2, -2, -3, 1, 1, 0, 2, 4, -3, -4, 1, 1, 0, -2, 4, 7, -4, -5, 1, 1, 1, -2, -6, 7, 11, -5, -6, 1, 1, 1, 3, -6, -13, 11, 16, -6, -7, 1, 1, 0, 3, 9, -13, -24, 16, 22, -7, -8, 1, 1, 0, -3, 9, 22, -24, -40, 22, 29, -8, -9, 1, 1, 1, -3, -12, 22, 46, -40, -62, 29, 37, -9, -10, 1, 1, 1, 4, -12
Offset: 0

Views

Author

Wolfdieter Lang, Apr 04 2007

Keywords

Comments

See A049310 for the coefficient table of Chebyshev's S(n,x)=U(n,x/2) polynomials.
This is a 'repetition triangle' based on a signed version of triangle A059260: a(2*p,2*k) = a(2*p+1,2*k) = A059260(p+k,2*k)*(-1)^(p+k) and a(2*p+1,2*k+1) = a(2*p+2,2*k+1) = A059260(p+k+1,2*k+1)*(-1)^(p+k), k >= 0.

Examples

			The triangle a(n,m) begins:
  n\m  0   1   2   3   4   5   6   7   8   9  10
   0:  1
   1:  1   1
   2:  0   1   1
   3:  0  -1   1   1
   4:  1  -1  -2   1   1
   5:  1   2  -2  -3   1   1
   6:  0   2   4  -3  -4   1   1
   7:  0  -2   4   7  -4  -5   1   1
   8:  1  -2  -6   7  11  -5  -6   1   1
   9:  1   3  -6 -13  11  16  -6  -7   1   1
  10:  0   3   9 -13 -24  16  22  -7  -8   1   1
... reformatted by _Wolfdieter Lang_, Oct 16 2012
Row polynomial S(1;4,x) = 1 - x - 2*x^2 + x^3 + x^4 = Sum_{k=0..4} S(k,x).
S(4,y)*S(5,y)/y = 3 - 13*y^2 + 16*y^4 - 7*y^6 + y^8, with y=sqrt(2+x) this becomes S(1;4,x).
From _Wolfdieter Lang_, Oct 16 2012: (Start)
S(1;4,x) = (1 - (S(5,x) - S(4,x)))/(2-x) = (1-x)*(2-x)*(1+x)*(1-x-x^2)/(2-x) = (1-x)*(1+x)*(1-x-x^2).
S(5,x) - S(4,x) = R(11,sqrt(2+x))/sqrt(2+x) = -1 + 3*x + 3*x^2 - 4*x^3 - x^4 + x^5. (End)
		

Crossrefs

Row sums (signed): A021823(n+2). Row sums (unsigned): A070550(n).
Cf. A128495 for S(2; n, x) coefficient table.
The column sequences (unsigned) are, for m=0..4: A021923, A002265, A008642, A128498, A128499.
For m >= 1 the column sequences (without leading zeros) are of the form a(m, 2*k) = a(m, 2*k+1) = ((-1)^k)*b(m, k) with the sequences b(m, k), given for m=1..11 by A008619, A002620, A002623, A001752, A001753, A001769, A001779, A001780, A001781, A001786, A001808.

Formula

S(1;n,x) = Sum_{k=0..n} S(k,x) = Sum_{m=0..n} a(n,m)*x^m, n >= 0.
a(n,m) = [x^m](S(n,y)*S(n+1,y)/y) with y:=sqrt(2+x).
G.f. for column m: (x^m)/((1-x)*(1+x^2)^(m+1)), which shows that this is a lower diagonal matrix of the Riordan type, named (1/((1+x^2)*(1-x)), x/(1+x^2)).
From Wolfdieter Lang, Oct 16 2012: (Start)
a(n,m) = [x^m](1- (S(n+1,x) - S(n,x)))/(2-x). From the Binet - de Moivre formula for S and use of the geometric sum.
a(n,m) = [x^m](1- R(2*n+3,sqrt(2+x))/sqrt(2+x))/(2-x) with the monic integer T-polynomials R with coefficient triangle given in A127672. From the odd part of the bisection of the T-polynomials. (End)

A247586 Number of acute triangles with integer sides less than or equal to n.

Original entry on oeis.org

1, 3, 6, 11, 17, 25, 36, 49, 64, 81, 102, 127, 154, 185, 219, 258, 301, 349, 401, 457, 520, 587, 660, 740, 824, 914, 1010, 1114, 1225, 1342, 1468, 1600, 1740, 1887, 2041, 2206, 2378, 2561, 2750, 2948
Offset: 1

Views

Author

Vladimir Letsko, Sep 20 2014

Keywords

Examples

			a(2) = 3 because there are 3 acute triangles with integer sides less than or equal to 2: (1,1,1); (1,2,2); (2,2,2).
		

Crossrefs

Programs

  • Maple
    tr_a:=proc(n) local a,b,c,t,d;t:=0:
      for a to n do
      for b from a to n do
      for c from b to min(a+b-1,n) do
      d:=a^2+b^2-c^2:
      if d>0 then t:=t+1 fi
      od od od;
      [n,t]; end;
  • Mathematica
    a[n_] := Module[{a, b, c, d, t = 0}, Do[d = a^2 + b^2 - c^2; If[d>0, t++], {a, n}, {b, a, n}, {c, b, Min[a+b-1, n]}]; t]; Array[a, 40] (* Jean-François Alcover, Jun 19 2019, from Maple *)
  • Python
    import itertools
    def A247586(n):
        I = itertools.combinations_with_replacement(range(1,n+1),3)
        F = filter(lambda c: c[0]**2 + c[1]**2 > c[2]**2, I)
        return len(list(F))
    print([A247586(n) for n in range(41)]) # Peter Luschny, Sep 22 2014

A248851 a(n) = ( 2*n*(2*n^2 + 9*n + 14) + (-1)^n - 1 )/16.

Original entry on oeis.org

0, 3, 10, 22, 41, 68, 105, 153, 214, 289, 380, 488, 615, 762, 931, 1123, 1340, 1583, 1854, 2154, 2485, 2848, 3245, 3677, 4146, 4653, 5200, 5788, 6419, 7094, 7815, 8583, 9400, 10267, 11186, 12158, 13185, 14268, 15409, 16609, 17870, 19193, 20580, 22032
Offset: 0

Views

Author

Luce ETIENNE, Mar 03 2015

Keywords

Comments

Consider a grid of small triangles of side 1 forming a regular polygon with side n*(n+2); a(n) is the number of equilateral triangles of side length >= 1 in this figure which are oriented with the sides of the figure.
This sequence gives the number of triangles of all sizes in a (n^2+2*n)-iamond with a 4*n-gon configuration.
Equals (1/2)*Sum_{j=0..n-1} (n-j)*(n+1-j) + (-1 + (1/8)*Sum_{j=0..(2*n+1-(-1)^n)/4} (2*n+3+(-1)^n-4*j)*(2*n+3-(-1)^n-4*j)) numbers of triangles in a direction and in the opposite direction.

Examples

			From third comment: a(0)=0, a(1)=1+2, a(2)=4+6, a(3)=10+12, a(4)=20+21, a(5)=35+33.
		

Crossrefs

Programs

  • Magma
    [(4*n^3+18*n^2+28*n-(1-(-1)^n)) div 16: n in [0..50]]; // Vincenzo Librandi, Mar 21 2015
  • Mathematica
    CoefficientList[Series[x (x^3 - 2 x^2 + x + 3) / ((x - 1)^4(x + 1)), {x, 0, 50}], x] (* Vincenzo Librandi, Mar 21 2015 *)
    LinearRecurrence[{3,-2,-2,3,-1},{0,3,10,22,41},50] (* Harvey P. Dale, Jan 17 2023 *)
  • PARI
    concat(0, Vec(x*(x^3-2*x^2+x+3)/((x-1)^4*(x+1)) + O(x^100))) \\ Colin Barker, Mar 03 2015
    

Formula

G.f.: x*(x^3-2*x^2+x+3) / ((x-1)^4*(x+1)). - Colin Barker, Mar 03 2015
a(n) = 3*a(n-1)-2*a(n-2)-2*a(n-3)+3*a(n-4)-a(n-5). - Colin Barker, Mar 03 2015

Extensions

Typo in formula fixed by Vincenzo Librandi, Mar 21 2015
Name rewritten using the closed form by Bruno Berselli, Apr 19 2015

A007518 a(n) = floor(n*(n+2)*(2*n-1)/8).

Original entry on oeis.org

0, 3, 9, 21, 39, 66, 102, 150, 210, 285, 375, 483, 609, 756, 924, 1116, 1332, 1575, 1845, 2145, 2475, 2838, 3234, 3666, 4134, 4641, 5187, 5775, 6405, 7080, 7800, 8568, 9384, 10251, 11169, 12141, 13167, 14250, 15390, 16590, 17850, 19173, 20559, 22011, 23529, 25116, 26772, 28500, 30300
Offset: 1

Views

Author

Keywords

References

  • From a problem on p. 151 of J. Rec. Math., 7 (1975).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Column 4 of triangle A094953.

Programs

  • GAP
    List([1..50],n->Int(n*(n+2)*(2*n-1)/8)); # Muniru A Asiru, Mar 22 2018
  • Magma
    [Floor(n*(n+2)(2*n-1)/8): n in [1..50]]; // G. C. Greubel, Mar 21 2018
    
  • Maple
    [seq(floor(n*(n+2)*(2*n-1)/8),n=1..50)]; # Muniru A Asiru, Mar 22 2018
  • Mathematica
    Table[Floor[(n(n+2)(2n-1))/8],{n,50}] (* or *) LinearRecurrence[{3,-2,-2,3,-1},{0,3,9,21,39},40] (* Harvey P. Dale, Oct 06 2014 *)
  • PARI
    vector(50, n, n*(n+2)*(2*n-1)\8) \\ Michel Marcus, Oct 12 2014
    

Formula

a(n) = 3*A002623(n) for n>0. - M. F. Hasler, Sep 15 2009
G.f.: 3*x/((x+1)*(x-1)^4). [Maksym Voznyy (voznyy(AT)mail.ru), Aug 10 2009]
a(n) = 3*a(n-1) -2*a(n-2) -2*a(n-3) +3*a(n-4) -a(n-5) with a(1)=0, a(2)=3, a(3)=9, a(4)=21, a(5)=39. - Harvey P. Dale, Oct 06 2014

Extensions

Offset corrected by Harvey P. Dale, Oct 06 2014
Terms a(40) onward added by G. C. Greubel, Mar 21 2018

A052267 Number of 2 X n matrices over GF(3) under row and column permutations.

Original entry on oeis.org

1, 6, 27, 92, 267, 678, 1561, 3312, 6582, 12372, 22194, 38232, 63594, 102564, 160974, 246576, 369567, 543114, 784069, 1113684, 1558557, 2151578, 2933151, 3952416, 5268796, 6953544, 9091668, 11783856, 15148836, 19325736, 24476940, 30790944, 38485773, 47812398
Offset: 0

Views

Author

Vladeta Jovovic, Feb 04 2000

Keywords

Crossrefs

Programs

  • PARI
    Vec((3*x^2+1) / ((1-x^2)^3*(1-x)^6) + O(x^40)) \\ Colin Barker, Jan 16 2017

Formula

G.f.: (3*x^2+1) /((1-x^2)^3*(1-x)^6).
a(n) = ((315*(475+37*(-1)^n) + 6*(54959+945*(-1)^n)*n + (298618+630*(-1)^n)*n^2 + 150528*n^3 + 46788*n^4 + 9156*n^5 + 1092*n^6 + 72*n^7 + 2*n^8)) / 161280. - Colin Barker, Jan 16 2017

A111746 Number of squares in the interior of the square with vertices (n,0), (0,n), (-n,0) and (0,-n) in a square (x,y)-grid.

Original entry on oeis.org

0, 5, 17, 42, 82, 143, 227, 340, 484, 665, 885, 1150, 1462, 1827, 2247, 2728, 3272, 3885, 4569, 5330, 6170, 7095, 8107, 9212, 10412, 11713, 13117, 14630, 16254, 17995, 19855, 21840, 23952, 26197, 28577, 31098, 33762, 36575, 39539, 42660, 45940
Offset: 0

Views

Author

Floor van Lamoen, Nov 19 2005

Keywords

Crossrefs

Programs

  • Magma
    [n*(4*n^2+12*n+11)/6+1/4-(-1)^n/4: n in [0..60]]; // Vincenzo Librandi, May 12 2015
  • Maple
    seq(n*(4*n^2-1)/6 - 1/4 + 1/4*(-1)^n,n=1..50);
  • Mathematica
    Table[n (4 n^2 + 12 n + 11)/6 + 1/4 - (-1)^n/4, {n, 0, 60}] (* Vincenzo Librandi, May 12 2015 *)

Formula

a(n) = n*(4*n^2 + 12*n + 11)/6 + 1/4 - (-1)^n/4 = floor(A000447(n+1)/2).
a(n) = 4*A002623(n-1) + A000330(n), with A002623(-1)=0. - Luce ETIENNE, May 12 2015
G.f.: x*(5 + 2*x + x^2)/((1-x)^4*(1+x)). - Vincenzo Librandi, May 12 2015

Extensions

Closed formula adapted to the offset by Bruno Berselli, May 12 2015
Previous Showing 61-70 of 92 results. Next