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.

A285089 Rectangular array by antidiagonals: row n is the ordered sequence of numbers k that minimize |d(n+1-k) - d(k)|, where d(i) are the divisors of n.

Original entry on oeis.org

1, 4, 2, 9, 6, 3, 16, 12, 8, 10, 25, 20, 15, 18, 5, 36, 30, 24, 28, 21, 14, 49, 42, 35, 40, 32, 50, 7, 64, 56, 48, 54, 45, 66, 27, 44, 81, 72, 63, 70, 60, 84, 55, 78, 33, 100, 90, 80, 88, 77, 104, 91, 98, 65, 22, 121, 110, 99, 108, 96, 126, 112, 170, 105, 52
Offset: 1

Views

Author

Clark Kimberling, Apr 13 2017

Keywords

Comments

Every positive integer occurs exactly once, so that as a sequence, this is a permutation of the natural numbers, A000027.
Every prime (A000040) occurs in column 1.
Row 1: A000290 (squares)
Row 2: A002378 (oblong numbers)
Row 3: A005563
Row 4: A028552 (for n>=2)

Examples

			Taking n = 12, the divisors are 1,2,3,4,6,12, so that for k=1..6, the numbers d(n+1-k) - d(k) are 12-1, 6-2, 4-3, 3-4, 2-6, 1-12.  Thus, the number k that minimizes |d(n+1-k) - d(k)| is 1, so that 12 appears in row 1 (with the top row as row 0), consisting of numbers for which the minimal value is 1.
Northwest corner:
  1   4   9   16   25   36   49   64   81   10
  2   6   12  20   30   42   56   72   90   110
  3   8   15  24   35   48   63   80   99   120
  10  18  28  40   54   70   88   108  130  154
  5   21  32  45   60   77   96   117  140  165
  14  50  66  84   104  126  160  176  204  234
  7   27  55  91   112  135  160  187  216  247
  44  78  98  170  198  228  260  294  330  368
		

Crossrefs

Programs

  • Mathematica
    d[n_] := Divisors[n]; k[n_] := Length[d[n]]; x[n_, i_] := d[n][[i]];
    a[n_] := If[OddQ[k[n]], 0, x[n, k[n]/2 + 1] - x[n, k[n]/2]]
    t = Table[a[j], {j, 1, 30000}];
    r[n_] := Flatten[Position[t, n]]; v[n_, k_] := r[n][[k]];
    w = Table[v[n, k], {n, 0, 10}, {k, 1, 10}];
    TableForm[w] (* A285089, array *)
    Table[v[n - k, k], {n, 0, 60}, {k, n, 1, -1}] // Flatten (* A285089, sequence *)

Formula

row 1: k^2 for k>=1
row 2: k*(k+1) for k>=1
row 3: k*(k+2) for k>=3
row 4: k*(k+3) for k>=2
row 5: k*(k+4) for k>=3
row 6: k*(k+5) for k>=5
row 7: k*(k+6) for k>=7

A357279 a(n) is the hafnian of the 2n X 2n symmetric matrix defined by M[i, j] = i + j - 1.

Original entry on oeis.org

1, 2, 43, 2610, 312081, 61825050, 18318396195, 7586241152490, 4184711271725985, 2965919152834367730, 2626408950849351178875
Offset: 0

Views

Author

Stefano Spezia, Sep 25 2022

Keywords

Comments

The n X n matrix M is the n-th principal submatrix of A002024 considered as an array, and it is singular for n > 2.

Examples

			a(2) = 43 because the hafnian of
    1  2  3  4
    2  3  4  5
    3  4  5  6
    4  5  6  7
equals M_{1,2}*M_{3,4} + M_{1,3}*M_{2,4} + M_{1,4}*M_{2,3} = 43.
		

Crossrefs

Cf. A002024, A002415 (absolute value of the coefficient of x^(n-2) in the characteristic polynomial of M(n)), A095833 (k-th super- and subdiagonal sums of the matrix M(n)), A204248 (permanent of M(n)).

Programs

  • Mathematica
    M[i_, j_, n_]:=Part[Part[Table[r+c-1,{r,n},{c,n}], i], j]; a[n_]:=Sum[Product[M[Part[PermutationList[s, 2n], 2i-1], Part[PermutationList[s, 2n], 2i], 2n], {i, n}], {s, SymmetricGroup[2n]//GroupElements}]/(n!*2^n); Array[a, 6, 0]
  • PARI
    tm(n) = matrix(n, n, i, j, i+j-1);
    a(n) = my(m = tm(2*n), s=0); forperm([1..2*n], p, s += prod(j=1, n, m[p[2*j-1], p[2*j]]); ); s/(n!*2^n); \\ Michel Marcus, May 02 2023

Extensions

a(6) from Michel Marcus, May 02 2023
a(7)-a(10) from Pontus von Brömssen, Oct 14 2023

A285090 Rectangular array by antidiagonals: the array formed by arranging the rows of A285089 so that the first column is strictly increasing.

Original entry on oeis.org

1, 4, 2, 9, 6, 3, 16, 12, 8, 5, 25, 20, 15, 21, 7, 36, 30, 24, 32, 27, 10, 49, 42, 35, 45, 55, 18, 11, 64, 56, 48, 60, 91, 28, 39, 13, 81, 72, 63, 77, 112, 40, 75, 85, 14, 100, 90, 80, 96, 135, 54, 119, 133, 50, 17, 121, 110, 99, 117, 160, 70, 171, 189, 66
Offset: 1

Views

Author

Clark Kimberling, Apr 13 2017

Keywords

Comments

Every positive integer occurs exactly once, so that as a sequence, this is a permutation of the natural numbers, A000027. Every prime (A000040) occurs in column 1. For each row, there is a nonnegative integer h such that all but finitely many initial entries are of the form k*(k+h).

Examples

			Northwest corner:
1   4   9    16   25   36   49   64   81   10
2   6   12   20   30   42   56   72   90   110
3   8   15   24   35   48   63   80   99   120
5   21  32   45   60   77   96   117  140  165
7   27  55   91   112  135  160  187  216  247
10  18  28   40   54   70   88   108  130  154
11  39  75   119  171  200  231  264  299  375
13  85  133  189  253  325  364  405  448  493
		

Crossrefs

Programs

  • Mathematica
    d[n_] := Divisors[n]; k[n_] := Length[d[n]]; x[n_, i_] := d[n][[i]];
    a[n_] := If[OddQ[k[n]], 0, x[n, k[n]/2 + 1] - x[n, k[n]/2]]
    t = Table[a[j], {j, 1, 30000}];
    r[n_] := Flatten[Position[t, n]]; v[n_, k_] := r[n][[k]];
    w = Table[v[n, k], {n, 0, 20}, {k, 1, 20}];
    y = SortBy[w, First]; v[n_, k_] := y[[n, k]];
    w = TableForm[Table[v[n, k], {n, 1, 10}, {k, 1, 10}]]
    Table[v[n + 1 - k, k], {n, 1, 15}, {k, n, 1, -1}] // Flatten

A357419 a(n) is the hafnian of the 2n X 2n symmetric Pascal matrix defined by M[i, j] = A007318(i + j - 2, i - 1).

Original entry on oeis.org

1, 1, 17, 4929, 23872137, 1901611778409, 2469317979267366913, 52019468048773355156225921, 17726418489020770628047341494927089, 97518325438289444681986165275143492027985129, 8648473129650550498122567373327602114148485950241817345
Offset: 0

Views

Author

Stefano Spezia, Sep 27 2022

Keywords

Examples

			a(2) = 17 because the hafnian of
    1,  1,  1,   1
    1,  2,  3,   4
    1,  3,  6,  10
    1,  4, 10,  20
equals M_{1,2}*M_{3,4} + M_{1,3}*M_{2,4} + M_{1,4}*M_{2,3} = 17.
		

Crossrefs

Cf. A007318.
Cf. A006134 (trace of M(n)), A095833 (k-th super- and subdiagonal sums of M(n)), A320845 (permanent of M(n)).

Programs

  • Mathematica
    M[i_, j_, n_]:=Part[Part[Table[Binomial[r+c-2,r-1], {r, n}, {c, n}], i], j]; a[n_]:=Sum[Product[M[Part[PermutationList[s, 2n], 2i-1], Part[PermutationList[s, 2n], 2i], 2n], {i, n}], {s, SymmetricGroup[2n]//GroupElements}]/(n!*2^n); Array[a, 6, 0]

Extensions

a(6)-a(10) from Pontus von Brömssen, Oct 14 2023
Showing 1-4 of 4 results.