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

A323724 a(n) = n*(2*(n - 2)*n + (-1)^n + 3)/4.

Original entry on oeis.org

0, 0, 2, 6, 20, 40, 78, 126, 200, 288, 410, 550, 732, 936, 1190, 1470, 1808, 2176, 2610, 3078, 3620, 4200, 4862, 5566, 6360, 7200, 8138, 9126, 10220, 11368, 12630, 13950, 15392, 16896, 18530, 20230, 22068, 23976, 26030, 28158, 30440, 32800, 35322, 37926, 40700
Offset: 0

Views

Author

Stefano Spezia, Jan 25 2019

Keywords

Comments

For n > 1, a(n) is the superdiagonal sum of the matrix M(n) whose permanent is A322277(n).
All the terms of this sequence are even numbers (A005843), but do not end with 4.

Crossrefs

Programs

  • GAP
    Flat(List([0..50], n->(1/2)*(-1 + n)^2*n - (-1 + n)*Int(n/2) + 2*(Int(n/2))^2));
    
  • Magma
    [(1/2)*(-1 + n)^2*n - (-1 + n)*Floor(n/2) + 2*(Floor(n/2))^2: n in [0..50]];
    
  • Maple
    a:=n->(1/2)*(-1 + n)^2*n - (-1 + n)*floor(n/2) + 2*(floor(n/2))^2: seq(a(n), n=0..50);
  • Mathematica
    a[n_] := 1/2 (-1 + n)^2 n - (-1 + n) Floor[n/2] + 2 Floor[n/2]^2; Array[a, 50, 0];
    Table[n (2 (n - 2) n + (-1)^n + 3)/4, {n, 0, 50}] (* Bruno Berselli, Feb 06 2019 *)
    LinearRecurrence[{2,1,-4,1,2,-1},{0,0,2,6,20,40},50] (* Harvey P. Dale, Jan 13 2024 *)
  • Maxima
    makelist((1/2)*(-1 + n)^2*n - (-1 + n)*floor(n/2) + 2*(floor(n/2))^2, n, 0, 50);
    
  • PARI
    a(n) = (1/2)*(-1 + n)^2*n - (-1 + n)*floor(n/2) + 2*(floor(n/2))^2;
    
  • PARI
    T(i,j,n) = if (i %2, j + n*(i-1), n*i - j + 1);
    a(n) = sum(k=1, n-1, T(k,k+1,n)); \\ Michel Marcus, Feb 06 2019
    
  • Python
    [int((1/2)*(-1 + n)**2*n - (-1 + n)*int(n/2) + 2*(int(n/2))**2) for n in range(0,50)]

Formula

O.g.f.: 2*x^2*(1 + x + 3*x^2 + x^3)/((1 - x)^4*(1 + x)^2).
E.g.f.: (1/2)*x*(exp(x)*x*(1 + x) + sinh(x)).
a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + a(n-4) + 2*a(n-5) - a(n-6) for n > 5.
a(n) = (1/2)*(-1 + n)^2*n - (-1 + n)*floor(n/2) + 2*floor(n/2)^2.
a(n) = (1/2)*(-1 + n)^2*n - (-1 + n)*A004526(n) + 2*A000290(A004526(n)).
a(n) = (n/2)*((n - 1)^2 + 1) for even n; a(n) = (n/2)*(n - 1)^2 otherwise. - Bruno Berselli, Feb 06 2019
a(n) = 2*A004526(n*A000982(n-1)). [Found by Christian Krause's LODA miner] - Stefano Spezia, Dec 12 2021
a(n) = 2*A005997(n-1) for n >= 2. - Hugo Pfoertner, Dec 13 2021

Extensions

Definition by Bruno Berselli, Feb 06 2019

A309131 Triangle read by rows: T(n, k) = (n - k)*prime(1 + k), with 0 <= k < n.

Original entry on oeis.org

2, 4, 3, 6, 6, 5, 8, 9, 10, 7, 10, 12, 15, 14, 11, 12, 15, 20, 21, 22, 13, 14, 18, 25, 28, 33, 26, 17, 16, 21, 30, 35, 44, 39, 34, 19, 18, 24, 35, 42, 55, 52, 51, 38, 23, 20, 27, 40, 49, 66, 65, 68, 57, 46, 29, 22, 30, 45, 56, 77, 78, 85, 76, 69, 58, 31
Offset: 1

Views

Author

Stefano Spezia, Jul 14 2019

Keywords

Comments

T(n, k) is the k-superdiagonal sum of an n X n Toeplitz matrix M(n) whose first row consists of successive prime numbers prime(1), ..., prime(n).
The h-th subdiagonal of the triangle T gives the primes multiplied by (h + 1).
The k-th column of the triangle T gives the multiples of prime(1 + k).
Also array A(n, k) = n*prime(1 + k) read by ascending antidiagonals, with 0 <= k < n. - Michel Marcus, Jul 15 2019

Examples

			The triangle T(n, k) begins:
---+-----------------------------------------------------
n\k|    0     1     2     3     4     5     6     7     8
---+-----------------------------------------------------
1  |    2
2  |    4     3
3  |    6     6     5
4  |    8     9    10     7
5  |   10    12    15    14    11
6  |   12    15    20    21    22    13
7  |   14    18    25    28    33    26    17
8  |   16    21    30    35    44    39    34    19
9  |   18    24    35    42    55    52    51    38    23
...
For n = 3 the matrix M(3) is
          2,         3,         5
    M_{2,1},         2,         3
    M_{3,1},   M_{3,2},         2
and therefore T(3, 0) = 2 + 2 + 2 = 6, T(3, 1) = 3 + 3 = 6, and T(3, 2) = 5.
		

Crossrefs

Cf. A000040: diagonal; A001747: 1st subdiagonal; A001748: 2nd subdiagonal; A001749: 3rd subdiagonal; A001750: 4th subdiagonal; A005843: 0th column; A008585: 1st column; A008587: 2nd column; A008589: 3rd column; A008593: 4th column; A008595: 5th column; A008599: 6th column; A008601: 7th column; A014148: row sums; A138636: 5th subdiagonal; A272470: 6th subdiagonal.

Programs

  • Magma
    [[(n-k)*NthPrime(1+k): k in [0..n-1]]: n in [1..11]]; // triangle output
    
  • Maple
    a:=(n, k)->(n-k)*ithprime(1+k): seq(seq(a(n, k), k=0..n-1), n=1..11);
  • Mathematica
    Flatten[Table[(n-k)*Prime[1+k],{n,1,11},{k,0,n-1}]]
  • PARI
    T(n, k) = (n - k)*prime(1 + k);
    tabl(nn) = for(n=1, nn, for(k=0, n-1, print1(T(n, k), ", ")); print); \\ triangle output
    
  • Sage
    [[(n-k)*Primes().unrank(k) for k in (0..n-1)] for n in (1..11)] # triangle output

Formula

T(n, k) = A025581(n, k)*A000040(1 + k).

A322844 a(n) = (1/12)*n^2*(3*(1 + n^2) - 2*(2 + n^2)*(n mod 2)).

Original entry on oeis.org

0, 0, 5, 6, 68, 50, 333, 196, 1040, 540, 2525, 1210, 5220, 2366, 9653, 4200, 16448, 6936, 26325, 10830, 40100, 16170, 58685, 23276, 83088, 32500, 114413, 44226, 153860, 58870, 202725, 76880, 262400, 98736, 334373, 124950, 420228, 156066, 521645, 192660, 640400, 235340
Offset: 0

Views

Author

Stefano Spezia, Dec 28 2018

Keywords

Comments

Conjectures: (Start)
For n > 1, a(n) is the absolute value of the trace of the 2nd exterior power of an n X n square matrix M(n) defined as M[i,j,n] = j + n*(i-1) if i is odd and M[i,j,n] = n*i - j + 1 if i is even (see A317614). Equivalently, a(n) is the absolute value of the coefficient of the term [x^(n-2)] in the characteristic polynomial of the matrix M(n), or the absolute value of the sum of all principal minors of M(n) of size 2.
For k > 2, the trace of the k-th exterior power of the matrix M(n) is equal to zero.
(End)

Crossrefs

Cf. A317614 (trace of matrix M(n)).
Cf. A002415, A037270, A074147 (antidiagonals of M matrices), A241016 (row sums of M matrices), A317617 (column sums of M matrices), A322277 (permanent of matrix M(n)), A323723 (subdiagonal sum of M matrices), A323724 (superdiagonal sum of M matrices), A325516 (k-superdiagonal sum of M matrices), A325655 (k-subdiagonal sum of M matrices).

Programs

  • GAP
    Flat(List([0..50], n->(1/12)*n^2*(3*(1 + n^2) - 2*(2 + n^2)*(n mod 2))));
    
  • Magma
    [IsEven(n) select (1/4)*n^2*(1 + n^2) else (1/12)*(- 1 + n)*n^2*(1 + n): n in [0..50]];
    
  • Maple
    a:=n->(1/12)*n^2*(3*(1 + n^2) - 2*(2 + n^2)*modp(n,2)): seq(a(n), n=0..50);
  • Mathematica
    a[n_]:=(1/12)*n^2*(3*(1 + n^2) - 2*(2 + n^2)*Mod[n,2]); Array[a,50,0]
    LinearRecurrence[{0,5,0,-10,0,10,0,-5,0,1},{0,0,5,6,68,50,333,196,1040,540},50] (* Harvey P. Dale, Aug 23 2025 *)
  • Maxima
    a(n):=(1/12)*n^2*(3*(1 + n^2) - 2*(2 + n^2)*mod(n,2))$ makelist(a(n), n, 0, 50);
    
  • PARI
    a(n) = (1/12)*n^2*(3*(1 + n^2) - 2*(2 + n^2)*(n % 2));
    
  • PARI
    a(n) = abs(polcoeff(charpoly(matrix(n, n, i, j, if (i %2, j + n*(i-1), n*i - j + 1))), n-2)); \\ Michel Marcus, Feb 06 2019
    
  • Python
    [int(n**2*(3*(1 + n**2) - 2*(2 + n**2)*pow(n, 1, 2))/12) for n in range(0,50)]

Formula

O.g.f.: -x^2*(5 + 6*x + 43*x^2 + 20*x^3 + 43*x^4 + 6*x^5 + 5*x^6)/((-1 + x)^5*(1 + x)^5).
E.g.f.: (1/(12*x^2))*exp(-x)*(24 - 60*exp(x) + 21*x + 9*x^2 + 2*x^3 + x^4 + exp(2*x)*(36 - 33*x + 15*x^2 - 4*x^3 + 2*x^4)).
a(n) = (1/4)*n^2*(1 + n^2) for n even.
a(n) = (1/2)*A037270(n) for n even.
a(n) = (1/12)*(-1 + n)*n^2*(1 + n) for n odd.
a(n) = A002415(n) for n odd.
a(2*n+1) = 5*a(2*n-1) - 10*a(2*n-3) + 10*a(2*n-5) - 5*a(2*n-7) + a(2*n-9), for n > 4.
a(2*n) = 5*a(2*n-2) - 10*a(2*n-4) + 10*a(2*n-6) - 5*a(2*n-8) + a(2*n-10), for n > 4.
O.g.f. for a(2*n+1): -x*(2*(3 + 10*x + 3*x^2))/(-1 + x)^5.
O.g.f. for a(2*n): x*(-5 - 43*x - 43*x^2 - 5*x^3)/(-1 + x)^5.
E.g.f. for a(2*n+1): (1/12)*(6*x*cosh(sqrt(x)) + sqrt(x)*(6 + x)*sinh(sqrt(x))).
E.g.f. for a(2*n): (1/4)*(x*(8 + x)*cosh(sqrt(x)) + 2*sqrt(x)*(1 + 3*x)*sinh(sqrt(x))).
Sum_{k>=1} 1/a(2*k) = (1/6)*(12 + Pi^2 - 6*Pi*coth(Pi/2)) = 0.21955691692893092525407699347398665248691900...
Sum_{k>=1} 1/a(2*k+1) = 3*(5 - Pi^2/2) = 0.1955933983659620717482635001857732970...
Sum_{k>=2} 1/a(k) = 17 - (4*Pi^2)/3 - Pi*coth(Pi/2) = 0.415150315294892997002340493659759949516369894...

A325517 a(n) = n*((2*n + 1)*(2*n^2 + 2*n + 3) - 3*(-1)^n)/24.

Original entry on oeis.org

0, 1, 6, 24, 64, 145, 282, 504, 832, 1305, 1950, 2816, 3936, 5369, 7154, 9360, 12032, 15249, 19062, 23560, 28800, 34881, 41866, 49864, 58944, 69225, 80782, 93744, 108192, 124265, 142050, 161696, 183296, 207009, 232934, 261240, 292032, 325489, 361722, 400920, 443200
Offset: 0

Views

Author

Stefano Spezia, May 07 2019

Keywords

Comments

For n > 0, a(n) is the n-th row sum of the triangle A325516.

Crossrefs

Programs

  • GAP
    Flat(List([0..50], n->n*((2*n + 1)*(2*n^2 + 2*n + 3) - 3*(-1)^n)/24));
    
  • Magma
    [n*((2*n + 1)*(2*n^2 + 2*n + 3) - 3*(-1)^n)/24: n in [0..50]];
    
  • Maple
    a:=n->n*((2*n + 1)*(2*n^2 + 2*n + 3) - 3*(-1)^n)/24: seq(a(n), n=0..50);
  • Mathematica
    a[n_]:=n*((2*n + 1)*(2*n^2 + 2*n + 3) - 3*(-1)^n)/24; Array[a,50,0]
  • PARI
    a(n) = n*((2*n + 1)*(2*n^2 + 2*n + 3) - 3*(-1)^n)/24;

Formula

O.g.f.: x*(1 + 3*x + 7*x^2 + 3*x^3 + 2*x^4)/((1 - x)^5*(1 + x)^2).
E.g.f.: (1/24)*exp(-x)*x*(3 + 21*exp(2*x) + 54*exp(2*x)*x + 30*exp(2*x)*x^2 + 4*exp(2*x)*x^3).
a(n) = 3*a(n-1) - a(n-2) - 5*a(n-3) + 5*a(n-4) + a(n-5) - 3*a(n-6) + a(n-7) for n > 6.
a(n) = n^2*(2*n^2 + 3*n + 4)/12 if n is even.
a(n) = n*(n + 1)*(2*n^2 + n + 3)/12 if n is odd.
a(n) = n*A131941(n). - Stefano Spezia, Dec 21 2021
Showing 1-4 of 4 results.