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 21-30 of 59 results. Next

A093445 The triangular triangle.

Original entry on oeis.org

1, 3, 3, 6, 9, 6, 10, 18, 17, 10, 15, 30, 33, 27, 15, 21, 45, 54, 51, 39, 21, 28, 63, 80, 82, 72, 53, 28, 36, 84, 111, 120, 114, 96, 69, 36, 45, 108, 147, 165, 165, 150, 123, 87, 45, 55, 135, 188, 217, 225, 215, 190, 153, 107, 55, 66, 165, 234, 276, 294, 291, 270, 234
Offset: 1

Views

Author

Amarnath Murthy, Apr 02 2004

Keywords

Comments

The n-th row of the triangular table begins by considering n triangular numbers (A000217) in order. Now segregate them into n groups beginning with n members in the first group, n-1 members in the second group, etc. Now sum each group. Thus the first term is the sum of first n numbers = n(n+1)/2, the second term is the sum of the next n-1 terms (from n+1 to 2n-1), the third term is the sum of the next n-2 terms (2n to 3n-3), etc. and the last term is simply n(n+1)/2. This triangle can be called a triangular triangle. The sequence contains the triangle by rows.

Examples

			Triangle begins:
   1
   3,  3
   6,  9,   6
  10, 18,  17,  10
  15, 30,  33,  27,  15
  21, 45,  54,  51,  39, 21
  28, 63,  80,  82,  72, 53, 28
  36, 84, 111, 120, 114, 96, 69, 36
The row for n = 4 is (1+2+3+4), (5+6+7), (8+9), 10 => 10 18 17 10.
		

Crossrefs

Cf. A000217, A093446. TT(n, 2) = A045943. TT(n, n-1) = A014209. TT(0, k) = A027480.
Cf. A005920 (central terms), A002817 (row sums).

Programs

  • Haskell
    a093445 n k = a093445_row n !! (k-1)
    a093445_row n = f [n, n - 1 .. 1] [1 ..] where
       f [] _      = []
       f (x:xs) ys = sum us : f xs vs where (us,vs) = splitAt x ys
    a093445_tabl = map a093445_row [1 ..]
    -- Reinhard Zumkeller, Oct 03 2012
  • Maple
    A093445 := proc(n,k)
        A000217(k*n-A000217(k-1))-A000217((k-1)*n-A000217(k-2)) ;
    end proc:
    seq(seq(A093445(n,k),k=1..n),n=1..10) ; # R. J. Mathar, Dec 09 2015
  • Mathematica
    T[n_] := n(n + 1)/2; TT[n_, k_] := T[k*n - T[k - 1]] - T[(k - 1)*n - T[k - 2]]; Flatten[ Table[ TT[n, k], {n, 1, 11}, {k, 1, n}]] (* Robert G. Wilson v, Apr 24 2004 *)
    Table[Total/@TakeList[Range[(n(n+1))/2],Range[n,1,-1]],{n,20}]//Flatten (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Feb 15 2019 *)

Formula

T(n) = A000217(n) is the n-th Triangular number. TT(n, k) is the k-th term of the n-th row, 0 < k <= n.
TT(n, k) = T(k*n - T(k - 1)) - T((k - 1)*n - T(k - 2)).
TT(n, 1) = TT(n, n) = T(n) = A000217(n).

Extensions

Edited, corrected and extended by Robert G. Wilson v, Apr 24 2004

A129533 Array read by antidiagonals: T(n,k) = binomial(n+1,2)*binomial(n+k,n+1) for 0 <= k <= n.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 3, 3, 0, 0, 6, 12, 6, 0, 0, 10, 30, 30, 10, 0, 0, 15, 60, 90, 60, 15, 0, 0, 21, 105, 210, 210, 105, 21, 0, 0, 28, 168, 420, 560, 420, 168, 28, 0, 0, 36, 252, 756, 1260, 1260, 756, 252, 36, 0, 0, 45, 360, 1260, 2520, 3150, 2520, 1260, 360, 45, 0, 0, 55, 495
Offset: 0

Views

Author

Emeric Deutsch, Apr 22 2007

Keywords

Comments

Previous name was: Triangle read by rows: T(n,k)=derivative of the q-binomial coefficient [n,k] evaluated at q=1 (0<=k<=n). - N. J. A. Sloane, Jan 06 2016
For example, T(5,2)=30 because [5,2] = q^6 + q^5 + 2*q^4 + 2*q^3 + 2*q^2 + q + 1 with derivative 6q^5 + 5q^4 + 8q^3 + 6q^2 + 4q + 1, having value 30 at q=1. - Emeric Deutsch, Apr 22 2007
Sum of entries in n-th antidiagonal = n(n-1)2^(n-3) = A001788(n-1).
T(n,k) = A094305(n-2, k-1) for n >= 2, k >= 1.
T(n,k) is total number of pips on a set of generalized linear dominoes with n cells (rather than two) and with the number of pips in each cell running from 0 to k (rather than 6). T(2,6) = 168 gives the total number of pips on a standard set of dominoes. We regard a generalized linear domino with n cells and up to k pips per cell as an ordered n-tuple [i_1, i_2, ..., i_n] with 0 <= i_1 <= i_2 <= ... <= i_n <= k. - Alan Shore and N. J. A. Sloane, Jan 06 2016
T(n,k) can also be written more symmetrically as the trinomial coefficient (n+k; n-1, k-1, 2). - N. J. A. Sloane, Jan 06 2016
As a triangle read by rows, T(n,k) is the total number of inversions over all length n binary words having exactly k 1's. T(n,k) is also the total area above all North East lattice paths from the origin to the point (k,n-k). - Geoffrey Critzer, Mar 22 2018

Examples

			Array begins:
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... (A000004)
0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, ... (A000217)
0, 3, 12, 30, 60, 105, 168, 252, 360, 495, 660, 858, ... (A027480)
0, 6, 30, 90, 210, 420, 756, 1260, 1980, 2970, 4290, ... (A033487)
0, 10, 60, 210, 560, 1260, 2520, 4620, 7920, 12870, ... (A266732)
0, 15, 105, 420, 1260, 3150, 6930, 13860, 25740, ... (A240440)
0, 21, 168, 756, 2520, 6930, 16632, 36036, ... (A266733)
...
If regarded as a triangle, this begins:
  0;
  0,  0;
  0,  1,  0;
  0,  3,  3,  0;
  0,  6, 12,  6,  0;
  0, 10, 30, 30, 10,  0;
  0, 15, 60, 90, 60, 15, 0;
  ...
		

References

  • G. E. Andrews, The Theory of Partitions, Addison-Wesley, 1976.

Crossrefs

Cf. A001788.
A128503 and A094305 are very similar sequences.

Programs

  • Maple
    dd:=proc(n,m) if m=0 or n=0 then 0 else (m+n)!/(2*(m-1)!*(n-1)!); fi; end;
    f:=n->[seq(dd(n,m),m=0..30)];
    for n from 0 to 10 do lprint(f(n)); od: # produces sequence as square array
    T:=(n,k)->k*(k+1)*binomial(n,k+1)/2: for n from 0 to 12 do seq(T(n,k),k=0..n) od; # yields sequence in triangular form
  • Mathematica
    Table[Table[D[Expand[FunctionExpand[QBinomial[n, k, q]]], q] /. q -> 1, {k, 0, n}], {n, 0, 15}] // Grid (* Geoffrey Critzer, Mar 22 2018 *)

Formula

T(n,k) = (1/2)*k*(k+1)*binomial(n,k+1).
G.f.: G(q,z) = qz^2/(1-z-qz)^3.

Extensions

Entry revised by N. J. A. Sloane, Jan 06 2016

A267370 Partial sums of A140091.

Original entry on oeis.org

0, 6, 21, 48, 90, 150, 231, 336, 468, 630, 825, 1056, 1326, 1638, 1995, 2400, 2856, 3366, 3933, 4560, 5250, 6006, 6831, 7728, 8700, 9750, 10881, 12096, 13398, 14790, 16275, 17856, 19536, 21318, 23205, 25200, 27306, 29526, 31863, 34320, 36900, 39606, 42441, 45408, 48510
Offset: 0

Views

Author

Bruno Berselli, Jan 13 2016

Keywords

Comments

After 0, this sequence is the third column of the array in A185874.
Sequence is related to A051744 by A051744(n) = n*a(n)/3 - Sum_{i=0..n-1} a(i) for n>0.

Examples

			The sequence is also provided by the row sums of the following triangle (see the fourth formula above):
.  0;
.  1,  5;
.  4,  7, 10;
.  9, 11, 13, 15;
. 16, 17, 18, 19, 20;
. 25, 25, 25, 25, 25, 25;
. 36, 35, 34, 33, 32, 31, 30;
. 49, 47, 45, 43, 41, 39, 37, 35;
. 64, 61, 58, 55, 52, 49, 46, 43, 40;
. 81, 77, 73, 69, 65, 61, 57, 53, 49, 45, etc.
First column is A000290.
Second column is A027690.
Third column is included in A189834.
Main diagonal is A008587; other parallel diagonals: A016921, A017029, A017077, A017245, etc.
Diagonal 1, 11, 25, 43, 65, 91, 121, ... is A161532.
		

Crossrefs

Cf. similar sequences of the type n*(n+1)*(n+k)/2: A002411 (k=0), A006002 (k=1), A027480 (k=2), A077414 (k=3, with offset 1), A212343 (k=4, without the initial 0), this sequence (k=5).

Programs

  • Magma
    [n*(n+1)*(n+5)/2: n in [0..50]];
  • Mathematica
    Table[n (n + 1) (n + 5)/2, {n, 0, 50}]
    LinearRecurrence[{4,-6,4,-1},{0,6,21,48},50] (* Harvey P. Dale, Jul 18 2019 *)
  • PARI
    vector(50, n, n--; n*(n+1)*(n+5)/2)
    
  • Sage
    [n*(n+1)*(n+5)/2 for n in (0..50)]
    

Formula

O.g.f.: 3*x*(2 - x)/(1 - x)^4.
E.g.f.: x*(12 + 9*x + x^2)*exp(x)/2.
a(n) = n*(n + 1)*(n + 5)/2.
a(n) = Sum_{i=0..n} n*(n - i) + 5*i, that is: a(n) = A002411(n) + A028895(n). More generally, Sum_{i=0..n} n*(n - i) + k*i = n*(n + 1)*(n + k)/2.
a(n) = 3*A005581(n+1).
a(n+1) - 3*a(n) + 3*a(n-1) = 3*A105163(n) for n>0.
From Amiram Eldar, Jan 06 2021: (Start)
Sum_{n>=1} 1/a(n) = 163/600.
Sum_{n>=1} (-1)^(n+1)/a(n) = 4*log(2)/5 - 253/600. (End)

A330298 a(n) is the number of subsets of {1..n} that contain exactly 1 odd and 2 even numbers.

Original entry on oeis.org

0, 0, 0, 0, 2, 3, 9, 12, 24, 30, 50, 60, 90, 105, 147, 168, 224, 252, 324, 360, 450, 495, 605, 660, 792, 858, 1014, 1092, 1274, 1365, 1575, 1680, 1920, 2040, 2312, 2448, 2754, 2907, 3249, 3420, 3800, 3990, 4410, 4620, 5082, 5313, 5819, 6072, 6624, 6900, 7500, 7800, 8450, 8775, 9477
Offset: 0

Views

Author

Enrique Navarrete, Feb 29 2020

Keywords

Comments

The general formula for the number of subsets of {1..n} that contain exactly k odd and j even numbers is binomial(ceiling(n/2), k) * binomial(floor(n/2), j).

Examples

			For n=6, a(6) = 9 and the 9 subsets are: {1,2,4}, {1,2,6}, {1,4,6}, {2,3,4}, {2,3,6}, {2,4,5}, {2,5,6}, {3,4,6}, {4,5,6}.
		

Crossrefs

Interleaves the positive integers of A006002 and A027480.

Programs

  • Mathematica
    a[n_] := Ceiling[n/2] * Binomial[Floor[n/2], 2]; Array[a, 55, 0] (* Amiram Eldar, Mar 01 2020 *)
    Table[Length[Select[Subsets[Range[n],{3}],Total[Boole[OddQ[#]]]==1&]],{n,0,60}] (* Harvey P. Dale, Jul 26 2020 *)
  • PARI
    a(n) = ceil(n/2) * binomial(floor(n/2), 2) \\ Andrew Howroyd, Mar 01 2020
    
  • PARI
    concat([0,0,0,0], Vec(x^4*(2 + x) / ((1 - x)^4*(1 + x)^3) + O(x^40))) \\ Colin Barker, Mar 02 2020

Formula

a(n) = ceiling(n/2) * binomial(floor(n/2), 2).
From Colin Barker, Mar 01 2020: (Start)
G.f.: x^4*(2 + x) / ((1 - x)^4*(1 + x)^3).
a(n) = a(n-1) + 3*a(n-2) - 3*a(n-3) - 3*a(n-4) + 3*a(n-5) + a(n-6) - a(n-7) for n>6. (End)
E.g.f.: (x*(-3 + x + x^2)*cosh(x) + (3 - x + x^3)*sinh(x))/16. - Stefano Spezia, Mar 02 2020
a(n) = 3/32-5*n^2/32-n/32+n^3/16+(-)^n*(n-3+n^2)/32. - R. J. Mathar, Mar 31 2025

A161983 Irregular triangle read by rows: the group of 2n + 1 integers starting at A014105(n).

Original entry on oeis.org

0, 3, 4, 5, 10, 11, 12, 13, 14, 21, 22, 23, 24, 25, 26, 27, 36, 37, 38, 39, 40, 41, 42, 43, 44, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 136, 137
Offset: 0

Views

Author

Juri-Stepan Gerasimov, Jun 23 2009

Keywords

Comments

The squares of numbers in each row can be gathered in an equation with the first n terms on one side, the next n+1 terms on the other. The third row, for example, could be rendered as 10^2 + 11^2 + 12^2 = 13^2 + 14^2.
This sequence contains all nonnegative integers that are within a distance of n from 2n^2 + 2n where n is any nonnegative integer. The nonnegative integers that are not in this sequence are of the form 2n^2 + k where n is any positive integer and -n <= k <= n-1. Also, when n is the product of two consecutive integers, a(n) = 2n; for example, a(20) = 40. See explicit formulas for the sequence in the formula section below. - Dennis P. Walsh, Aug 09 2013
Numbers k with the property that the largest Dyck path of the symmetric representation of sigma(k) has a central valley, n > 0. (Cf. A237593.) - Omar E. Pol, Aug 28 2018

Examples

			Triangle begins:
   0;
   3,  4,  5;
  10, 11, 12, 13, 14;
  21, 22, 23, 24, 25, 26, 27;
  36, 37, 38, 39, 40, 41, 42, 43, 44;
  55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65;
  78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90;
...
		

Crossrefs

Union of A014105 and A317304.
The complement is A162917.
Column 1 gives A014105.
Right border gives A014106.
Row sums give the even-indexed terms of A027480.

Programs

  • Maple
    seq(seq(2*n^2+2*n+k,k=-n..n),n=0..10); # Dennis P. Walsh, Aug 09 2013
    seq(n+floor(sqrt(n))*(floor(sqrt(n))+1),n=0..100); # Dennis P. Walsh, Aug 09 2013

Formula

As a triangle, T(n,k) = 2n^2 + 2n + k where -n <= k <= n and n = 0,1,... - Dennis P. Walsh, Aug 09 2013
As sequence, a(n) = n + floor(sqrt(n))*(floor(sqrt(n)) + 1); equivalently, a(n) = n + A000196(n)*(A000196(n)+1). - Dennis P. Walsh, Aug 09 2013

Extensions

Definition clarified, 8th row terms corrected by R. J. Mathar, Jul 19 2009

A168641 Triangle read by rows: T(n,k) = [x^k] p(x,n), where p(x,n) = 3*(x + 1)^n - 2*(x^n + 1) - n*(x + x^(n - 1)) for n >= 2, p(x,0) = 1, and p(x,1) = x + 1.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 6, 6, 1, 1, 8, 18, 8, 1, 1, 10, 30, 30, 10, 1, 1, 12, 45, 60, 45, 12, 1, 1, 14, 63, 105, 105, 63, 14, 1, 1, 16, 84, 168, 210, 168, 84, 16, 1, 1, 18, 108, 252, 378, 378, 252, 108, 18, 1, 1, 20, 135, 360, 630, 756, 630, 360, 135, 20, 1
Offset: 0

Views

Author

Roger L. Bagula and Gary W. Adamson, Dec 01 2009

Keywords

Examples

			Triangle begins:
  1;
  1,  1;
  1,  2,   1;
  1,  6,   6,   1;
  1,  8,  18,   8,   1;
  1, 10,  30,  30,  10,   1;
  1, 12,  45,  60,  45,  12,   1;
  1, 14,  63, 105, 105,  63,  14,   1;
  1, 16,  84, 168, 210, 168,  84,  16,  1;
  1, 18, 108, 252, 378, 378, 252, 108,  18,  1;
  1, 20, 135, 360, 630, 756, 630, 360, 135, 20, 1;
  ...
		

Crossrefs

Columns (essentially): A005843 (k=1), A045943 (k=2), A027480 (k=3), A050534 (k=4), A253942 (k=5), A253943 (k=6), A253944 (k=7).

Programs

  • Magma
    function f(n,k)
       if n le 2 then return 1;
       elif k eq 0 or k eq n then return 1;
       elif k eq 1 or k eq n-1 then return 2;
       else return 3;
       end if;
    end function;
    A168641:= func< n,k | Binomial(n,k)*f(n,k) >;
    [A168641(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Mar 24 2025
    
  • Mathematica
    p[x_, n_]:= If[n==0, 1, If[n==1, 1+x, 3*(1+x)^n -(1+x^n) -(1+n*x +n*x^(n-1) + x^n)]];
    Flatten[Table[CoefficientList[p[x, n], x], {n, 0, 10}]]
    (* Second program *)
    f[n_, k_]:= With[{b=Boole}, If[k<=n/2, b[k==0] +2*b[k==1] +3*b[2<=k<=n/2], f[n, n-k]]];
    A168641[n_, k_]:= Binomial[n,k]*If[n<3,1,f[n,k]];
    Table[A168641[n,k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Mar 24 2025 *)
  • Maxima
    T(n,k) := ratcoef(if n <= 2 then (1 + x)^n else 3*(x + 1)^n - (x^n + 1) - (x^n + n*x^(n - 1) + n*x + 1), x, k);
    create_list(T(n, k), n, 0, 12, k, 0, n); /* Franck Maminirina Ramaharo, Jan 02 2019 */
    
  • SageMath
    def f(n,k):
        if (k<=n/2): return int(k==0) + 2*int(k==1) + 3*int(1A168641(n,k):
        if (n<3): return binomial(n,k)
        else: return binomial(n,k)*f(n,k)
    print(flatten([[A168641(n,k) for k in range(n+1)] for n in range(13)])) # G. C. Greubel, Mar 24 2025

Formula

From G. C. Greubel, Mar 24 2025: (Start)
T(n, k) = 3*binomial(n, k), for n >= 4 and 2 <= k <= n-2, otherwise T(n, 0) = T(n, n) = 1, T(n, 1) = T(n, n-1) = 2*A065475(n-1).
T(n, n-k) = T(n, k).
T(n, 1) = A005843(n) - [n=1] - 2*[n=2].
Columns: T(n, k) = 3*binomial(n,k) - 2*[n=k] - (k+1)*[n=k+1], k >= 2.
Sum_{k=0..n} T(n, k) = 2*A095151(n-1) - 2*[n=0] - 2*[n=1].
Sum_{k=0..n} (-1)^k*T(n, k) = (1+(-1)^n)*(n-2) + 5*[n=0]. (End)

Extensions

Edited by Franck Maminirina Ramaharo, Jan 02 2019

A057587 Nonnegative numbers of form n*(n^2+-1)/2.

Original entry on oeis.org

0, 1, 3, 5, 12, 15, 30, 34, 60, 65, 105, 111, 168, 175, 252, 260, 360, 369, 495, 505, 660, 671, 858, 870, 1092, 1105, 1365, 1379, 1680, 1695, 2040, 2056, 2448, 2465, 2907, 2925, 3420, 3439, 3990, 4010, 4620, 4641, 5313, 5335, 6072, 6095, 6900, 6924, 7800
Offset: 0

Views

Author

N. J. A. Sloane, Oct 05 2000

Keywords

Comments

Taking alternate terms gives A027480 and A006003. - Jeremy Gardiner, Apr 10 2005

Crossrefs

Programs

  • Magma
    [(2*n^3+9*n^2+15*n+5+(3*n^2+n-5)*(-1)^n)/32 : n in [0..50]]; // Wesley Ivan Hurt, Mar 27 2015
  • Maple
    A057587:=n->(2*n^3+9*n^2+15*n+5+(3*n^2+n-5)*(-1)^n)/32: seq(A057587(n), n=0..50); # Wesley Ivan Hurt, Mar 27 2015
  • Mathematica
    CoefficientList[Series[x*(1 + 2 x - x^2 + x^3)/((x - 1)^4*(x + 1)^3), {x, 0, 50}], x] (* Wesley Ivan Hurt, Mar 27 2015 *)
    Table[(2 n^3 + 9 n^2 + 15 n + 5 + (3 n^2 + n - 5) (-1)^n) / 32, {n, 0, 50}] (* Vincenzo Librandi, Mar 28 2015 *)
    LinearRecurrence[{1,3,-3,-3,3,1,-1},{0,1,3,5,12,15,30},50] (* Harvey P. Dale, Nov 29 2022 *)
  • PARI
    concat(0, Vec(x*(x^3-x^2+2*x+1)/((x-1)^4*(x+1)^3) + O(x^100))) \\ Colin Barker, Nov 18 2014
    

Formula

a(n) = (2*n^3+9*n^2+15*n+5+(3*n^2+n-5)*(-1)^n)/32. - Luce ETIENNE, Nov 18 2014
From Wesley Ivan Hurt, Mar 27 2015: (Start)
G.f.: x*(1 + 2 x - x^2 + x^3)/((x - 1)^4*(x + 1)^3).
a(n) = a(n-1)+3*a(n-2)-3*a(n-3)-3*a(n-4)+3*a(n-5)+a(n-6)-a(n-7). (End)
a(2*n+1) + a(2*n) = (a(2*n+1) - a(2*n))^3. - Greg Dresden, Feb 10 2022
a(2*n+1)^2 - a(2*n)^2 = (n+1)^4. - Adam Michael Bere, Feb 15 2024

A117560 a(n) = n*(n^2 - 1)/2 - 1.

Original entry on oeis.org

2, 11, 29, 59, 104, 167, 251, 359, 494, 659, 857, 1091, 1364, 1679, 2039, 2447, 2906, 3419, 3989, 4619, 5312, 6071, 6899, 7799, 8774, 9827, 10961, 12179, 13484, 14879, 16367, 17951, 19634, 21419, 23309, 25307, 27416, 29639, 31979, 34439, 37022, 39731, 42569
Offset: 2

Views

Author

Joseph Biberstine (jrbibers(AT)indiana.edu), Mar 29 2006

Keywords

Comments

a(n-1) is an approximation for the lower bound of the "antimagic constant" of an antimagic square of order n. The antimagic constant here is defined as the least integer in the set of consecutive integers to which the rows, columns and diagonals of the square sum. By analogy with the magic constant. This approximation follows from the observation that (2*Sum_{k=1..n^2} k) + (m) + (m+1) <= Sum_{k=0..2*n+1} (m + k) where m is the antimagic constant for an antimagic square of order n. a(n) = A027480(n+1) - 1. Stricter bounds seem likely to exist. See A117561 for the upper bounds. Note there exist no antimagic squares of order two or three, but the values are indexed here for completeness.

Examples

			a(3) = 29 because the antimagic constant of an antimagic square of order 4 must be at least 29 (see comments).
		

Crossrefs

Programs

  • Magma
    [n*(n^2-1)/2 - 1: n in [2..50]]; // Vincenzo Librandi, Jun 20 2011
  • Mathematica
    Table[n*(n^2-1)/2 - 1, {n, 2, 50}]

Formula

a(n) = n*(n^2 - 1)/2 - 1.
G.f.: x^2*(2 + 3*x - 3*x^2 + x^3)/(1-x)^4. - Colin Barker, Mar 29 2012
From Elmo R. Oliveira, Aug 19 2025: (Start)
E.g.f.: 1 + x + (1 + x)*(-2 + 2*x + x^2)*exp(x)/2.
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n >= 6. (End)

A126275 Moment of inertia of all magic squares of order n.

Original entry on oeis.org

5, 60, 340, 1300, 3885, 9800, 21840, 44280, 83325, 147620, 248820, 402220, 627445, 949200, 1398080, 2011440, 2834325, 3920460, 5333300, 7147140, 9448285, 12336280, 15925200, 20345000, 25742925, 32284980, 40157460, 49568540, 60749925, 73958560, 89478400
Offset: 2

Views

Author

Jonathan Vos Post, Dec 23 2006

Keywords

Crossrefs

Programs

  • Mathematica
    Array[(#^2*(#^4 - 1))/12 &, 31, 2] (* or *)
    Drop[CoefficientList[Series[-5 x^2*(x + 1) (x^2 + 4 x + 1)/(x - 1)^7, {x, 0, 32}], x], 2] (* Michael De Vlieger, Apr 13 2021 *)
    LinearRecurrence[{7,-21,35,-35,21,-7,1},{5,60,340,1300,3885,9800,21840},40] (* Harvey P. Dale, Apr 03 2023 *)
  • PARI
    a(n) = (n^2 * (n^4 - 1))/12 \\ Felix Fröhlich, May 31 2021
    
  • PARI
    Vec(-5*x^2*(x+1)*(x^2+4*x+1)/(x-1)^7 + O(x^30)) \\ Felix Fröhlich, May 31 2021

Formula

a(n) = (n^2 * (n^4 - 1))/12.
G.f.: -5*x^2*(x+1)*(x^2+4*x+1) / (x-1)^7. - Colin Barker, Dec 10 2012
a(n) = Sum_{i=0..n^2-1} (k+i)^2 - (k*n + A027480(n-1))^2. - Charlie Marion, May 08 2021
From Amiram Eldar, Jul 03 2025: (Start)
Sum_{n>=2} 1/a(n) = 3*Pi*coth(Pi) - 2*Pi^2 + 21/2.
Sum_{n>=2} (-1)^n/a(n) = 3*Pi*cosech(Pi) + Pi^2 - 21/2. (End)

Extensions

More terms from Colin Barker, Dec 10 2012

A338645 Expansion of Product_{k>=1} (1 + x^k)^binomial(k+2,2).

Original entry on oeis.org

1, 3, 9, 29, 78, 207, 526, 1284, 3054, 7084, 16071, 35748, 78167, 168195, 356754, 746772, 1544145, 3157056, 6387114, 12795366, 25397760, 49977262, 97542936, 188912466, 363196750, 693424803, 1315161528, 2478648920, 4643337213, 8648452782, 16019345259, 29515269060, 54104712129
Offset: 0

Views

Author

Ilya Gutkovskiy, May 09 2021

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 32; CoefficientList[Series[Product[(1 + x^k)^Binomial[k + 2, 2], {k, 1, nmax}], {x, 0, nmax}], x]
    a[n_] := a[n] = If[n == 0, 1, (1/n) Sum[Sum[(-1)^(k/d + 1) d Binomial[d + 2, 2], {d, Divisors[k]}] a[n - k], {k, 1, n}]]; Table[a[n], {n, 0, 32}]

Formula

a(0) = 1; a(n) = (1/n) * Sum_{k=1..n} ( Sum_{d|k} (-1)^(k/d+1) * A027480(d) ) * a(n-k).
a(n) ~ (7/15)^(1/8) * 2^(-21/8) * n^(-5/8) * exp((2/3)*(7/15)^(1/4)*Pi * n^(3/4) + 9*sqrt(15/7)*zeta(3) * sqrt(n) / (2*Pi^2) + ((5/7)^(1/4)*Pi / (2*3^(3/4)) - 1215*(15/7)^(1/4)*zeta(3)^2 / (28*Pi^5)) * n^(1/4) + 54675*zeta(3)^3 / (98*Pi^8) - 45*zeta(3) / (28*Pi^2)). - Vaclav Kotesovec, May 12 2021
Previous Showing 21-30 of 59 results. Next