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: Ignacio Larrosa Cañestro

Ignacio Larrosa Cañestro's wiki page.

Ignacio Larrosa Cañestro has authored 13 sequences. Here are the ten most recent ones:

A283678 Number of possible draws of 2n pairs of consecutive cards from a set of 4n + 1 cards, so that the card that initially occupies the central position is not selected.

Original entry on oeis.org

1, 2, 54, 4500, 771750, 225042300, 99843767100, 62673358948200, 52880646612543750, 57733914846094987500, 79199384385873103852500, 133357363417740148141455000, 270426506783940730406180497500, 650063718230626755784087734375000, 1827886309419060919156885553671875000
Offset: 0

Author

Keywords

Comments

The probability that the middle card is not selected in a random draw of 2n consecutive card pairs between 4n + 1 cards is a(n)/(4n)!!.
Essentially a bisection of A001757. - Giovanni Resta, Mar 14 2017

Examples

			For n = 1, you have 5 cards (A, B, C, D, E) and you can make 2 draws of pairs of consecutive cards (AB, DE) and (DE, AB) without select C.
		

Crossrefs

Programs

  • Maple
    ogf := sqrt(x) * BesselI(0, sqrt(x)/4) * BesselK(0,sqrt(x)/4) / 2;
    simplify(subs(x=1/x, asympt(ogf, x, 20))); # Mark van Hoeij, Oct 24 2017
  • Mathematica
    Table[Binomial[2n, n] Product[2n + 1 - 2i, {i, 1, n}]^2, {n, 0, 15}] (* Indranil Ghosh, Mar 22 2017 *)
  • PARI
    a(n)=binomial(2*n, n)*prod(i=1,n,2*n+1-2*i)^2 \\ Charles R Greathouse IV, Mar 14 2017
    
  • Python
    from sympy import binomial, factorial2
    print([binomial(2*n, n) * factorial2(2*n - 1)**2 for n in range(15)]) # Indranil Ghosh, Mar 22 2017

Formula

a(n) = binomial(2n, n)*((2n-1)!!)^2 = A092563(n)*A001147(n).
n*a(n) -2*(2*n-1)^3*a(n-1)=0. - R. J. Mathar, Jul 15 2017
a(n) ~ 2^(4*n+1)*(n/e)^(2*n)/sqrt(n*Pi). - Stefano Spezia, Mar 28 2025

A120445 Number of different convex inscribed polygons with n pair of sides of lengths d1, d2, ..., dn all distinct. Or number of bracelets with n pairs of beads, each pair of one among n colors.

Original entry on oeis.org

1, 2, 11, 171, 5736, 312240, 24327000, 2554072920, 347351195520, 59397023589120, 12473374574505600, 3155763762320400000, 946729128624509260800, 332301924146113021900800, 134914581203304233287756800, 62735280259536165098353536000, 33124227977035089658775531520000
Offset: 1

Author

Keywords

Examples

			a(2) = 2 because there are two quadrilaterals with sides {1, 1, 2, 2}: a kite and a rectangle.
		

Programs

  • Magma
    [(Factorial(2*n)/2^n+(n+1)*Factorial(n)+n*Factorial(n))/(4*n): n in [1..20]]; // Vincenzo Librandi, Nov 22 2016
    
  • Mathematica
    Table[((2 n)! / 2^n + (n + 1) n! + n n!) / (4 n), {n, 20}] (* Vincenzo Librandi, Nov 22 2016 *)
  • PARI
    for(n=1,25, print1(((2*n)!/2^n + (2*n+1)*n!)/(4*n), ", ")) \\ G. C. Greubel, May 25 2017

Formula

a(n) = ((2n)!/2^n + (2n+1)*n!)/(4n).
a(n) ~ sqrt(Pi)*2^n*n^(2*n-1/2)/(2*exp(2*n)). - Ilya Gutkovskiy, Nov 21 2016

Extensions

Name clarified by Marko Riedel, Nov 22 2016

A098928 Number of cubes that can be formed from the points of a cubical grid of n X n X n points.

Original entry on oeis.org

0, 1, 9, 36, 100, 229, 473, 910, 1648, 2795, 4469, 6818, 10032, 14315, 19907, 27190, 36502, 48233, 62803, 80736, 102550, 128847, 160271, 197516, 241314, 292737, 352591, 421764, 501204, 592257, 696281, 814450, 948112, 1098607, 1267367
Offset: 1

Author

Ignacio Larrosa Cañestro, Oct 19 2004, Sep 29 2009

Keywords

Comments

Skew cubes are allowed.

Examples

			For n = 3 there are 8 cubes of volume 1 and 1 cube of volume 8; thus a(3)=9. - _José María Grau Ribas_, Mar 15 2014
a(6)=229 because we can place 15^2 cubes in a 6 X 6 X 6 cubical grid with their edges parallel to the faces of the grid, plus 4 cubes of edge 3 with a vertex in each face of the lattice and the other two vertices on a diagonal.
		

Crossrefs

Cf. A103158.
Cf. A000537 (without skew cubes), A002415 (number of squares with corners on an n X n grid), A108279, A102698.

Programs

  • Mathematica
    Needs["Quaternions`"];
    (* Initialize variables *)
    R = 20;
    NN = 1010;
    (* Quaternion operations *)
    test[q_Quaternion] :=
      Module[{unit, res, a, b, c, u, v, w, p},
       If[Round[Norm[q]] > R, Return[]];
       If[q == Quaternion[0, 0, 0, 0], Return[]];
       unit = Quaternion[0, 1, 0, 0];
       res = q ** unit ** Conjugate[q];
       a = Abs[res[[2]]] + Abs[res[[3]]] + Abs[res[[4]]];
       unit = Quaternion[0, 0, 1, 0];
       res = q ** unit ** Conjugate[q];
       b = Abs[res[[2]]] + Abs[res[[3]]] + Abs[res[[4]]];
       unit = Quaternion[0, 0, 0, 1];
       res = q ** unit ** Conjugate[q];
       c = Abs[res[[2]]] + Abs[res[[3]]] + Abs[res[[4]]];
       For[i = 1, i <= (R - 1)/Max[a, b, c], i++,
        If[SquareFreeQ[i], {u = a*i;
          v = b*i;
          w = c*i;
          p = Max[u, v, w] + 1;
          coe[[p + 1, 4]] += (1);
          coe[[p + 1, 3]] -= (u + v + w);
          coe[[p + 1, 2]] += (u*v + v*w + w*u);
          coe[[p + 1, 1]] -= (u*v*w)}]]];
    (* Set up coefficient matrix *)
    coe = ConstantArray[0, {NN, 4}];
    (* Loop through quaternions *)
    rt = Ceiling[Sqrt[R]] + 1;
    For[s = -rt, s <= rt, s++,
      For[x = -rt, x <= rt, x++,
       For[y = -rt, y <= rt, y++,
        For[z = -rt, z <= rt, z++, test[Quaternion[s, x, y, z]];
         test[Quaternion[s + 0.5, x + 0.5, y + 0.5, z + 0.5]];]]]];
    newCoe = coe;
    newCoe[[2 ;; ;; 2]] = coe[[2 ;; ;; 2]]/2;
    (* Calculate and output results *)
    For[i = 2, i <= R + 1, i++, ans = 0;
      For[j = 4, j >= 1, j--, newCoe[[i, j]] += newCoe[[i - 1, j]];
       ans = ans*(i - 1) + newCoe[[i, j]];
       ];
      Print[i - 1, " ", ans/24];];
    (* Haomin Yang, Aug 29 2023 *)

Extensions

Edited by Ray Chandler, Apr 05 2010
Further edited by N. J. A. Sloane, Mar 31 2016

A084231 Numbers k such that the root-mean-square value of 1, 2, ..., k, i.e., sqrt((1/k)*Sum_{j=1..k} j^2), is an integer.

Original entry on oeis.org

1, 337, 65521, 12710881, 2465845537, 478361323441, 92799630902161, 18002650033695937, 3492421306906109761, 677511730889751597841, 131433783371304903871537, 25497476462302261599480481, 4946378999903267445395341921, 959572028504771582145096852337
Offset: 1

Author

Keywords

Comments

Equivalently, numbers k such that sqrt((k+1)*(2*k+1)/6) is an integer.

Examples

			337 is in the sequence because sqrt((1/337)*Sum_{k=1..337} k^2) is an integer (195=A084232(1)).
		

Crossrefs

Cf. A084232.

Programs

  • Mathematica
    a[n_]:=Expand[((7-4 Sqrt[3])^(1+2n)+(7+4 Sqrt[3])^(1+2n)-6)/8] (* Peter Pein *)
    CoefficientList[Series[x (1+142x+x^2)/((1-x)(1-194x+x^2)),{x,0,30}],x] (* or *) Join[{0},LinearRecurrence[{195,-195,1},{1,337,65521},30]] (* Harvey P. Dale, Jul 14 2011 *)

Formula

a(n) = ((7/2 + 2*sqrt(3))*(97 + 56*sqrt(3))^n + (7/2 - 2*sqrt(3))*(97 - 56*sqrt(3))^n - 3)/4.
a(n) = (floor((7/2 + 2*sqrt(3))*(97 + 56*sqrt(3))^n) - 2)/4.
a(n+3) = 195*(a(n+2) - a(n+1)) + a(n).
G.f.: x*(1+142*x+x^2)/((1-x)*(1-194*x+x^2)).
a(n) = ((7 - 4*sqrt(3))^(1+2n) + (7 + 4*sqrt(3))^(1+2n) - 6)/8. - Peter Pein (peter.pein(AT)dordos.de), Mar 03 2005
a(n) = 195*a(n-1) - 195*a(n-2) + a(n-3), with a(0)=0, a(1)=1, a(2)=337, a(3)=65521. - Harvey P. Dale, Jul 14 2011

Extensions

One more term from Peter Pein (peter.pein(AT)dordos.de), Mar 03 2005

A084232 RMS values associated with A084231.

Original entry on oeis.org

1, 195, 37829, 7338631, 1423656585, 276182038859, 53577891882061, 10393834843080975, 2016350381665827089, 391161580208327374291, 75883330210033844785365, 14720974899166357560986519, 2855793247108063332986599321, 554009168964065120241839281755
Offset: 0

Author

Keywords

Comments

From Klaus Purath, Aug 20 2025: (Start)
Solutions to the Pell equation (7*b(n))^2 - 3*(4*a(n))^2 = 1. The corresponding b(n) are given by A302332.
For any two consecutive terms (x,y), x^2 - 194*x*y + y^2 - 196 = 0. By analogy to this, for three consecutive terms (x, y, z), y^2 - x*z - 196 = 0. (End)

Examples

			a(1)=195 because 195 = sqrt((Sum_{k=1..337}k^2)/337) and 337 = A084231(1).
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{194,-1},{1,195},20] (* Harvey P. Dale, Nov 10 2021 *)

Formula

a(n) = ((7+4*sqrt(3))^(2*n+1)-(7-4*sqrt(3))^(2*n+1))/(8*sqrt(3)). [simplified by Bruno Berselli, Oct 19 2012]
a(n) = floor(((7*sqrt(3) + 12)/24)*(56*sqrt(3) + 97)^n).
a(n+2) = 194*a(n+1) - a(n).
G.f.: (1-x)/(1-194*x+x^2). - Philippe Deléham, Nov 18 2008
a(n)^2 = (Sum_{i=1..A084231(n+1)}i^2)/A084231(n+1). - Bruno Berselli, Oct 17 2012

A057719 Prime factors of numbers in A006521 (numbers k that divide 2^k + 1).

Original entry on oeis.org

3, 19, 163, 571, 1459, 8803, 9137, 17497, 41113, 52489, 78787, 87211, 135433, 139483, 144667, 164617, 174763, 196579, 274081, 370009, 370387, 478243, 760267, 941489, 944803, 1041619, 1220347, 1236787, 1319323, 1465129, 1663579, 1994659
Offset: 1

Author

Keywords

Comments

A prime p is in this sequence iff all prime divisors of ord_p(2)/2 are in this sequence, where ord_p(2) is the order of 2 modulo p. - Max Alekseyev, Jul 30 2006

Examples

			2^171 + 1 == 0 (mod 171), 171 = 3^2*19, 2^13203+1 == 0 (mod 13203), 13203 = 3^4*163.
		

Crossrefs

Programs

  • Mathematica
    S = {2}; Reap[For[p = 3, p < 2 10^6, p = NextPrime[p], f = FactorInteger[ MultiplicativeOrder[2, p]]; If[f[[1, 1]] != 2 || f[[1, 2]] != 1, Continue[]]; f = f[[All, 1]]; If[Length[Intersection[S, f]] == Length[f], S = Union[S, {p}]; Print[p]; Sow[p]]]][[2, 1]] (* Jean-François Alcover, Nov 11 2018, from PARI *)
  • PARI
    { A057719() = local(S,f); S=Set([2]); forprime(p=3,10^7, f=factorint(znorder(Mod(2,p))); if(f[1,1]!=2||f[1,2]!=1,next); f=f[,1]; if(length(setintersect(S,Set(f)))==length(f), S=setunion(S,[p]); print1(p,", "))) }

Extensions

Edited by Max Alekseyev, Jul 30 2006

A053306 Number of letters in n-th number in Galego.

Original entry on oeis.org

2, 4, 4, 5, 5, 4, 4, 4, 4, 3, 4, 4, 5, 7, 6, 8, 8, 8, 8, 5, 7, 9, 9, 10, 10, 9, 9, 9, 9, 6, 9, 11, 11, 12, 12, 11, 11, 11, 11, 7, 10, 12, 12, 13, 13, 12, 12, 12, 12, 9, 12, 14, 14, 15, 15, 14, 14, 14, 14, 7, 10, 12, 12, 13, 13, 12, 12, 12, 12, 7, 10, 12, 12, 13, 13, 12, 12, 12, 12, 7, 10
Offset: 1

Author

Keywords

Comments

Galego is the co-official language of Galicia, in the NW corner of Spain.

Examples

			In Galego: un, dous, tres, catro, cinco, seis, sete, oito, nove, dez, once, doce, trece, catorce, quince, dezaseis, dezasete, dezaoito, dezanove, vinte, ...
		

A054320 Expansion of g.f.: (1 + x)/(1 - 10*x + x^2).

Original entry on oeis.org

1, 11, 109, 1079, 10681, 105731, 1046629, 10360559, 102558961, 1015229051, 10049731549, 99482086439, 984771132841, 9748229241971, 96497521286869, 955226983626719, 9455772314980321, 93602496166176491, 926569189346784589, 9172089397301669399, 90794324783669909401
Offset: 0

Author

Keywords

Comments

Chebyshev's even-indexed U-polynomials evaluated at sqrt(3).
a(n)^2 is a star number (A003154).
Any k in the sequence has the successor 5*k + 2*sqrt(3(2*k^2 + 1)). - Lekraj Beedassy, Jul 08 2002
{a(n)} give the values of x solving: 3*y^2 - 2*x^2 = 1. Corresponding values of y are given by A072256(n+1). x + y = A001078(n+1). - Richard R. Forberg, Nov 21 2013
The aerated sequence (b(n))n>=1 = [1, 0, 11, 0, 109, 0, 1079, 0, ...] is a fourth-order linear divisibility sequence; that is, if n | m then b(n) | b(m). It is the case P1 = 0, P2 = -8, Q = -1 of the 3-parameter family of divisibility sequences found by Williams and Guy. See A100047. - Peter Bala, Mar 22 2015

Examples

			a(1)^2 = 121 is the 5th star number (A003154).
		

Crossrefs

A member of the family A057078, A057077, A057079, A005408, A002878, A001834, A030221, A002315, A033890, A057080, A057081, A054320, which are the expansions of (1+x) / (1-kx+x^2) with k = -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. - Philippe Deléham, May 04 2004
Cf. A138281. Cf. A100047.
Cf. A142238.

Programs

  • GAP
    a:=[1,11];; for n in [3..30] do a[n]:=10*a[n-1]-a[n-2]; od; a; # G. C. Greubel, Jul 22 2019
  • Magma
    I:=[1,11]; [n le 2 select I[n] else 10*Self(n-1)-Self(n-2): n in [1..30]]; // Vincenzo Librandi, Mar 22 2015
    
  • Mathematica
    CoefficientList[Series[(1+x)/(1-10x+x^2), {x,0,30}], x] (* Vincenzo Librandi, Mar 22 2015 *)
    a[c_, n_] := Module[{},
       p := Length[ContinuedFraction[ Sqrt[ c]][[2]]];
       d := Numerator[Convergents[Sqrt[c], n p]];
       t := Table[d[[1 + i]], {i, 0, Length[d] - 1, p}];
       Return[t];
    ] (* Complement of A142238 *)
    a[3/2, 20] (* Gerry Martens, Jun 07 2015 *)
  • PARI
    a(n)=subst(poltchebi(n+1)-poltchebi(n),x,5)/4;
    

Formula

(a(n)-1)^2 + a(n)^2 + (a(n)+1)^2 = b(n)^2 + (b(n)+1)^2 = c(n), where b(n) is A031138 and c(n) is A007667.
a(n) = 10*a(n-1) - a(n-2).
a(n) = (sqrt(6) - 2)/4*(5 + 2*sqrt(6))^(n+1) - (sqrt(6) + 2)/4*(5 - 2*sqrt(6))^(n+1).
a(n) = U(2*(n-1), sqrt(3)) = S(n-1, 10) + S(n-2, 10) with Chebyshev's U(n, x) and S(n, x) := U(n, x/2) polynomials and S(-1, x) := 0. S(n, 10) = A004189(n+1), n >= 0.
6*a(n)^2 + 3 is a square. Limit_{n->oo} a(n)/a(n-1) = 5 + 2*sqrt(6). - Gregory V. Richardson, Oct 13 2002
Let q(n, x) = Sum_{i=0..n} x^(n-i)*binomial(2*n-i, i), then (-1)^n*q(n, -12) = a(n). - Benoit Cloitre, Nov 10 2002
a(n) = L(n,-10)*(-1)^n, where L is defined as in A108299; see also A072256 for L(n,+10). - Reinhard Zumkeller, Jun 01 2005
From Reinhard Zumkeller, Mar 12 2008: (Start)
(sqrt(2) + sqrt(3))^(2*n+1) = a(n)*sqrt(2) + A138288(n)*sqrt(3);
a(n) = A138288(n) + A001078(n).
a(n) = A001079(n) + 3*A001078(n). (End)
a(n) = A142238(2n) = A041006(2n)/2 = A041038(2n)/4. - M. F. Hasler, Feb 14 2009
a(n) = sqrt(A006061(n)). - Zak Seidov, Oct 22 2012
a(n) = sqrt((3*A072256(n)^2 - 1)/2). - T. D. Noe, Oct 23 2012
(sqrt(3) + sqrt(2))^(2*n+1) - (sqrt(3) - sqrt(2))^(2*n+1) = a(n)*sqrt(8). - Bruno Berselli, Oct 29 2019
a(n) = A004189(n)+A004189(n+1). - R. J. Mathar, Oct 01 2021
E.g.f.: exp(5*x)*(2*cosh(2*sqrt(6)*x) + sqrt(6)*sinh(2*sqrt(6)*x))/2. - Stefano Spezia, May 16 2023
From Peter Bala, May 09 2025: (Start)
a(n) = Dir(n, 5), where Dir(n, x) denotes the n-th row polynomial of the triangle A244419.
a(n)^2 - 10*a(n)*a(n+1) + a(n+1)^2 = 12.
More generally, for arbitrary x, a(n+x)^2 - 10*a(n+x)*a(n+x+1) + a(n+x+1)^2 = 12 with a(n) := (sqrt(6) - 2)/4*(5 + 2*sqrt(6))^(n+1) - (sqrt(6) + 2)/4*(5 - 2*sqrt(6))^(n+1) as given above.
a(n+1/2) = sqrt(3) * A001078(n+1).
a(n+3/4) + a(n+1/4) = sqrt(6)*sqrt(sqrt(3) + 1) * A001078(n+1).
a(n+3/4) - a(n+1/4) = sqrt(sqrt(3) - 1) * A001079(n+1).
Sum_{n >= 1} (-1)^(n+1)/(a(n) - 1/a(n)) = 1/12 (telescoping series: for n >= 1, 1/(a(n) - 1/a(n)) = 1/A004291(n) + 1/A004291(n+1)).
Product_{n >= 1} (a(n) + 1)/(a(n) - 1) = sqrt(3/2) (telescoping product: Product_{n = 1..k} ((a(n) + 1)/(a(n) - 1))^2 = 3/2 * (1 - 1/A171640(k+2))). (End)

Extensions

Chebyshev comments from Wolfdieter Lang, Oct 31 2002

A054318 a(n)-th star number (A003154) is a square.

Original entry on oeis.org

1, 5, 45, 441, 4361, 43165, 427285, 4229681, 41869521, 414465525, 4102785725, 40613391721, 402031131481, 3979697923085, 39394948099365, 389969783070561, 3860302882606241, 38213059042991845, 378270287547312205
Offset: 1

Author

Keywords

Comments

A two-way infinite sequence which is palindromic.
Also indices of centered hexagonal numbers (A003215) which are also centered square numbers (A001844). - Colin Barker, Jan 02 2015
Also positive integers y in the solutions to 4*x^2 - 6*y^2 - 4*x + 6*y = 0. - Colin Barker, Jan 02 2015

Examples

			a(2) = 5 because the 5th Star number (A003154) 121=11^2 is the 2nd that is a square.
		

Crossrefs

A031138 is 3*a(n)-2. Cf. A003154, A006061, A182432, A211955.
Quintisection of column k=2 of A233427.

Programs

  • GAP
    a:=[1,5,45];; for n in [4..30] do a[n]:=11*a[n-1]-11*a[n-2]+a[n-3]; od; a; # G. C. Greubel, Jul 23 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 30); Coefficients(R!( x*(1-6*x+x^2)/((1-x)*(1-10*x+x^2)) )); // G. C. Greubel, Jul 23 2019
    
  • Mathematica
    CoefficientList[Series[x(1-6x+x^2)/((1-x)(1-10x+x^2)), {x,0,30}], x] (* Michael De Vlieger, Aug 11 2016 *)
    LinearRecurrence[{11,-11,1},{1,5,45},30] (* Harvey P. Dale, Nov 05 2016 *)
  • PARI
    a(n)=if(n<1,a(1-n),1/2+subst(poltchebi(n)+poltchebi(n-1),x,5)/12)
    
  • PARI
    Vec(x*(1-6*x+x^2)/((1-x)*(1-10*x+x^2)) + O(x^30)) \\ Colin Barker, Jan 02 2015
    
  • Sage
    (x*(1-6*x+x^2)/((1-x)*(1-10*x+x^2))).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Jul 23 2019
    

Formula

a(n) = 11*(a(n-1) - a(n-2)) + a(n-3).
a(n) = 1/2 + (3 - sqrt(6))/12*(5 + 2*sqrt(6))^n + (3 + sqrt(6))/12*(5 - 2*sqrt(6))^n.
From Michael Somos, Mar 18 2003: (Start)
G.f.: x*(1-6*x+x^2)/((1-x)*(1-10*x+x^2)).
12*a(n)*a(n-1) + 4 = (a(n) + a(n-1) + 2)^2.
a(n) = a(1-n) = 10*a(n-1) - a(n-2) - 4.
a(n) = 12*a(n-1)^2/(a(n-1) + a(n-2)) - a(n-1).
a(n) = (a(n-1) + 4)*a(n-1)/a(n-2). (End)
From Peter Bala, May 01 2012: (Start)
a(n+1) = 1 + (1/2)*Sum_{k = 1..n} 8^k*binomial(n+k,2*k).
a(n+1) = R(n,4), where R(n,x) is the n-th row polynomial of A211955.
a(n+1) = (1/u)*T(n,u)*T(n+1,u) with u = sqrt(3) and T(n,x) the Chebyshev polynomial of the first kind.
Sum {k>=0} 1/a(k) = sqrt(3/2). (End)
A003154(a(n)) = A006061(n). - Zak Seidov, Oct 22 2012
a(n) = (4*a(n-1) + a(n-1)^2) / a(n-2), n >= 3. - Seiichi Manyama, Aug 11 2016
2*a(n) = 1+A072256(n). - R. J. Mathar, Feb 07 2022

Extensions

More terms from James Sellers, Mar 01 2000

A045996 Number of triangles in an n X n grid (or geoplane).

Original entry on oeis.org

0, 4, 76, 516, 2148, 6768, 17600, 40120, 82608, 157252, 280988, 477012, 775172, 1214768, 1844512, 2725000, 3930384, 5550844, 7692300, 10482124, 14066996, 18619128, 24337056, 31449200, 40212160, 50921316, 63907468, 79542108
Offset: 1

Keywords

Comments

The triangles must have nonzero area -- their vertices must not be collinear.
The degenerate (i.e., collinear) triangles are counted in A000938. The 1000-term b-file there could be used to produce a 1000-term b-file for the present sequence. - N. J. A. Sloane, Jun 19 2020

Examples

			a(2)=4 because 4 isosceles right triangles can be placed on a 2 X 2 grid.
		

Crossrefs

Cf. A000938.

Programs

  • Mathematica
    a[n_] := ((n - 1)^2*n^2*(n + 1)^2)/6 - 2*Sum[(n - k + 1)*(n - l + 1)*GCD[k - 1, l - 1], {k, 2, n}, {l, 2, n}]; Array[a, 28] (* Robert G. Wilson v, May 23 2010 *)

Formula

a(n) = ((n-1)^2*n^2*(n+1)^2)/6 - 2*Sum_{m=2..n} Sum_{k=2..n} (n-k+1)*(n-m+1)*gcd(k-1, m-1).
a(n) = binomial(n^2,3) - A000938(n). - R. J. Mathar, May 21 2010