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 11-18 of 18 results.

A056537 Mapping from the column-by-column reading to the half-antidiagonal reading of the triangular tables. Inverse of A056536.

Original entry on oeis.org

1, 2, 4, 3, 6, 9, 5, 8, 12, 16, 7, 11, 15, 20, 25, 10, 14, 19, 24, 30, 36, 13, 18, 23, 29, 35, 42, 49, 17, 22, 28, 34, 41, 48, 56, 64, 21, 27, 33, 40, 47, 55, 63, 72, 81, 26, 32, 39, 46, 54, 62, 71, 80, 90, 100, 31, 38, 45, 53, 61, 70, 79, 89, 99, 110, 121, 37, 44, 52, 60, 69
Offset: 1

Views

Author

Antti Karttunen, Jun 20 2000

Keywords

Comments

Moves triangular numbers (A000217) to squares (A000290), i.e., A056537(A000217(i)) = A000290(i) for i >= 1.
As a square array, this is the dispersion of the complement of the squares; see A082152. - Clark Kimberling, Apr 05 2003

Examples

			As a square array, a northwest corner:
1 ... 2 ... 3 ... 5 ... 7 ... 10
4 ... 6 ... 8 ... 11 .. 14 .. 18
9 ... 12 .. 15 .. 19 .. 23 .. 28
16 .. 20 .. 24 .. 29 .. 34 .. 40
25 .. 30 .. 35 .. 41 .. 47 .. 54
36 .. 42 .. 48 .. 55 .. 62 .. 70
49 .. 56 .. 63 .. 71 .. 79 .. 88
64 .. 72 .. 80 .. 89 .. 98 .. 108
- _Clark Kimberling_, Aug 08 2013
		

Crossrefs

Cf. A185787 (dispersion of complement of triangular numbers).
Cf. A082152 (dispersion of complement of pentagonal numbers).

Programs

  • Maple
    # using Maple procedure nthmember given in A054426:
    [seq(nthmember(j, A056536), j=1..105)];
  • Mathematica
    (* Program generates the dispersion array T of the increasing sequence f[n] *)
    r=40; r1=12; c=40; c1=12; f[n_] := n+Floor[1/2+Sqrt[n]] (* complement of column 1 *); mex[list_] := NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1, Length[Union[list]]]; rows = {NestList[f, 1, c]}; Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}]; t[i_, j_] := rows[[i, j]]; TableForm[Table[t[i, j], {i, 1, r1}, {j, 1, c1}]]  (* A056537 array *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A056537 sequence *)
    (* Clark Kimberling, Jun 06 2011 *)

Formula

Triangle T(n, k), 1<=k<=n, read by rows, defined by: T(n, k) = 0 for nA002620(n-k+1) + k*n + k - n if n>=k. T(n, n) = n^2; T(n, 1) = 1 + A002620(n) = A033638(n). - Philippe Deléham, Feb 16 2004
Square: t(n,k) = (n-1)(n+k) + k^2/4 + (1/8)(7+(-1)^k). - Clark Kimberling, Aug 08 2013

A185788 Sum of the first k-1 numbers in the k-th column of the natural number array A000027, by antidiagonals.

Original entry on oeis.org

0, 2, 12, 37, 84, 160, 272, 427, 632, 894, 1220, 1617, 2092, 2652, 3304, 4055, 4912, 5882, 6972, 8189, 9540, 11032, 12672, 14467, 16424, 18550, 20852, 23337, 26012, 28884, 31960, 35247, 38752, 42482, 46444, 50645, 55092, 59792, 64752, 69979, 75480, 81262, 87332, 93697, 100364, 107340, 114632, 122247, 130192, 138474
Offset: 1

Views

Author

Clark Kimberling, Feb 03 2011

Keywords

Comments

See A185787.

Examples

			Start from
  1.....2....4.....7...11...16...22...29...
  3.....5....8....12...17...23...30...38...
  6.....9...13....18...24...31...39...48...
  10...14...19....25...32...40...49...59...
  15...20...26....33...41...50...60...71...
  21...27...34....42...51...61...72...84...
  28...35...43....52...62...73...85...98...
Block out all terms starting at and below the main diagonal then sum up the remaining terms.
  .....2.....4.....7...11...16...22...29...
  ...........8....12...17...23...30...38...
  ................18...24...31...39...48...
  .....................32...40...49...59...
  ..........................50...60...71...
  ...............................72...84...
  ....................................98...
		

Crossrefs

Programs

  • Mathematica
    f[n_,k_]:=n+(n+k-2)(n+k-1)/2;
    s[k_]:=Sum[f[n,k],{n,1,k-1}];
    Factor[s[k]]
    Table[s[k],{k,1,70}]
    Table[(n - 1)*(7*n^2 - 11*n + 6)/6, {n, 1, 50}] (* G. C. Greubel, Jul 12 2017 *)
  • PARI
    for(n=1,50, print1((n-1)*(7*n^2 - 11*n + 6)/6, ", ")) \\ G. C. Greubel, Jul 12 2017

Formula

a(n) = (n-1)*(7*n^2 - 11*n + 6)/6. - Corrected by Manfred Arens, Mar 11 2016
G.f.: x^2*(2+4*x+x^2) / (x-1)^4 . - R. J. Mathar, Aug 23 2012

A380649 Rectangular array ((-1)*D(i,j,1,2)) read by descending antidiagonals: D(i,j,s,n) denotes the determinant of the matrix described in Comments.

Original entry on oeis.org

1, 4, 3, 8, 7, 6, 13, 12, 11, 10, 19, 18, 17, 16, 15, 26, 25, 24, 23, 22, 21, 34, 33, 32, 31, 30, 29, 28, 43, 42, 41, 40, 39, 38, 37, 36, 53, 52, 51, 50, 49, 48, 47, 46, 45, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66
Offset: 1

Views

Author

Clark Kimberling, Jan 31 2025

Keywords

Comments

Suppose that (m(i,j)) is a rectangular array of infinitely many rows and infinitely many columns. For integers s>=1 and n>=1, let M(i,j,s,n) be the nXn matrix (m(i+h*s,j+k*s)), where h=0..n-1, k=0..n-1.
Let D(i,j,s,n) and P(i,j,s,n) denote the determinant and permanent of M(i,j,s,n), respectively. For A380649, we take (m(i,j)) to be the natural number array (see A000027, A185787, and A144112), and ((-1)*D(i,j,1,2)) is as shown below in Example.
* D(i,j,1,1) = M(i,j,1,1) = m(i,j) has linearly recurrent row sequences, all with signature (3,-3,1).
* D(i,j,1,2) has linearly recurrent row sequences, all with signature (3,-3,1).
* (-1)*D(i,j,s,3) is the constant array in which every term is s^6, for all i,j,s.
* D(i,j,s,n) is the constant 0 array for all n>=4, for all i,j,s.
* P(i,j,s,n) depends only on n, and the rows all have the following linear recurrence signature:
b(2n+1,1), - b(2n+1,2), b(2n+1-3),..., -(2n+1,2n), 1, where b=binomial.
((-1)*D(i,j,1,2)) includes, exactly once, every positive integer not in A000096. The order array of ((-1)*D(i,j,1,2)) is the array in Example in A038722; see A333029 for the definition of order array.

Examples

			Corner of (-1)*D(i,j,1,2):
   1   4    8   13   19   26   34   43   53   64   76   89
   3   7   12   18   25   33   42   52   63   75   88  102
   6  11   17   24   32   41   51   62   74   87  101  116
  10  16   23   31   40   50   61   73   86  100  115  131
  15  22   30   39   49   60   72   85   99  114  130  147
  21  29   38   48   59   71   84   98  113  129  146  164
  28  37   47   58   70   83   97  112  128  145  163  182
  36  46   57   69   82   96  111  127  144  162  181  201
  45  56   68   81   95  110  126  143  161  180  200  221
  55  67   80   94  109  125  142  160  179  199  220  242
  66  79   93  108  124  141  159  178  198  219  241  264
  78  92  107  123  140  158  177  197  218  240  263  287
m(1,1) = 1, so M(1,1,1,2) is the matrix having (row 1) = (1,2) and (row 2) = (3,5), so (-1)*D(1,1,1,2) = -(1*5-2*3) = 1.
		

Crossrefs

Programs

  • Mathematica
    s = 1; n = 2; z = 12;
    r[n_, k_] := n + (n + k - 2)*(n + k - 1)/2;
    Grid[Table[r[n, k], {n, 1, z}, {k, 1, z}]]  (* Array A000027 *)
    FindLinearRecurrence[Table[r[1, k], {k, 1, 20}]]
    t[i_, j_] := Table[r[i, j + k*s], {k, 0, n - 1}];
    d[i_, j_] := -Det[Table[t[i + k*s, j], {k, 0, n - 1}]];  (* (-1)*D(i,j,s,n) *)
    Grid[Table[d[i, j], {i, 1, z}, {j, 1, z}]]  (* array *)
    FindLinearRecurrence[Table[d[12, k], {k, 1, 20}]]
    Table[d[k, m - k], {m, 2, z}, {k, 1, m - 1}] // Flatten (* sequence *)

A380660 Rectangular array pos(i,j,1,2) read by descending antidiagonals: pos( ) and neg() denote the positive part and negative part of a determinant; see Comments.

Original entry on oeis.org

5, 16, 27, 48, 65, 84, 119, 144, 171, 200, 253, 288, 325, 364, 405, 480, 527, 576, 627, 680, 735, 836, 897, 960, 1025, 1092, 1161, 1232, 1363, 1440, 1519, 1600, 1683, 1768, 1855, 1944, 2109, 2204, 2301, 2400, 2501, 2604, 2709, 2816, 2925, 3128, 3243, 3360
Offset: 1

Views

Author

Clark Kimberling, Feb 04 2025

Keywords

Comments

Suppose that (m(i,j)) is a rectangular array of infinitely many rows and infinitely many columns. For integers s>=1 and n>=1, let M(i,j,s,n) be the nXn matrix (m(i+h*s,j+k*s)), where h=0..n-1, k=0..n-1.
Let D(i,j,s,n) and P(i,j,s,n) denote the determinant and permanent of M(i,j,s,n), respectively. Define arrays pos(i,j,s,n) and neg(i,j,s,n) by pos(i,j,s,n) = (P(i,j,s,n)+D(i,j,s,n))/2 and neg(i,j,s,n) = (P(i,j,s,n)-D(i,j,s,n))/2, so that P(i,j,s,n) = pos(i,j,s,n)+neg(i,j,s,n) and D(i,j,s,n) = pos(i,j,s,n)-neg(i,j,s,n).
A definition of determinant of an nXn matrix (a(i,j)) is the sum of the products (-1)^p(u) a(1,j(1))*a(2,j(2))*...*a(n,j(n)) over the n! permutations u = (j(1),j(2),...,j(n)) of (1,2,...,n), where p(u) is the parity of u; i.e., p(u) = 0 or 1 according as u is an even or odd permutation; see Lang, pp. 452-3, especially Proposition 4.8.
We have:
pos(i,j,s,n) is the sum of the n!/2 products for which p(u) = 0, and
neg(i,j,s,n) is the sum of the n!/2 products for which p(u) = 1.
Here, the foundational array (m(i,j)) is the natural number array (see A000027, A185787, A144112). The row sequences of pos(i,j,s,n) and neg(i,j,s,n) are linearly recurrent with signature (5, -10, 10, -5, 1).

Examples

			Corner of pos(i,j,1,2):
     5     16     48    119    253    480    836   1363   2109
    27     65    144    288    527    897   1440   2204   3243
    84    171    325    576    960   1519   2301   3360   4756
   200    364    627   1025   1600   2400   3479   4897   6720
   405    680   1092   1683   2501   3600   5040   6887   9213
   735   1161   1768   2604   3723   5185   7056   9408  12319
  1232   1855   2709   3848   5332   7227   9605  12544  16128
  1944   2816   3975   5481   7400   9804  12771  16385  20736
  2925   4104   5632   7575  10005  13000  16644  21027  26245
  4235   5785   7752  10208  13231  16905  21320  26572  32763
  5940   7931  10413  13464  17168  21615  26901  33128  40404
  8112  10620  13699  17433  21912  27232  33495  40809  49288
M(1,1,1,2) is the matrix with (row 1) = (1,2), (row 2) =(3,5), so that
pos(1,1,1,2) = 1*5 = 5; neg(1,1,1,2) = 2*3 = 6; D(1,1,1,2) = -1; P(1,1,1,2) = 11.
		

References

  • S. Lang, Algebra, 2nd ed., Addison-Wesley, 1984, 452-453.

Crossrefs

Programs

  • Mathematica
    s = 1; n = 2; z = 12;
    r[n_, k_] := n + (n + k - 2)*(n + k - 1)/2 (* Array A000027 *)
    Grid[Table[r[n, k], {n, 1, z}, {k, 1, z}]]
    t[i_, j_] := Table[r[i, j + k*s], {k, 0, n - 1}];
    d[i_, j_] := Det[Table[t[i + k*s, j], {k, 0, n - 1}]];  (* D(i,j,s,n) *)
    p[i_, j_] := Permanent[Table[t[i + k*s, j], {k, 0, n - 1}]];  (* P(i,j,s,n) *)
    pos[i_, j_] := (p[i, j] + d[i, j])/2;
    neg[i_, j_] := (p[i, j] - d[i, j])/2;
    Grid[Table[pos[i, j], {i, 1, z}, {j, 1, z}]]  (* A380660 array *)
    Grid[Table[neg[i, j], {i, 1, z}, {j, 1, z}]]  (* A380661 array *)
    FindLinearRecurrence[Table[pos[1, k], {k, 1, 20}]] (* row recurrence, all rows *)
    FindLinearRecurrence[Table[neg[7, k], {k, 1, 20}]] (* row recurrence, all rows *)
    Table[pos[k, m - k], {m, 2, z}, {k, 1, m - 1}] // Flatten (* A380660 sequence *)
    Table[neg[k, m - k], {m, 2, z}, {k, 1, m - 1}] // Flatten (* A380661 sequence *)

A057060 a(n) = number of the row of (R(i,j)) that contains prime(n), where R(i,j) is the rectangle with descending antidiagonals 1; 2,3; 4,5,6; ...

Original entry on oeis.org

1, 2, 2, 1, 1, 3, 2, 4, 2, 1, 3, 1, 5, 7, 2, 8, 4, 6, 1, 5, 7, 1, 5, 11, 6, 10, 12, 2, 4, 8, 7, 11, 1, 3, 13, 15, 4, 10, 14, 2, 8, 10, 1, 3, 7, 9, 1, 13, 17, 19, 2, 8, 10, 20, 4, 10, 16, 18, 1, 5, 7, 17, 7, 11, 13, 17, 6, 12, 22, 24, 2, 8, 16, 22, 1, 5, 11
Offset: 1

Views

Author

Clark Kimberling, Jul 30 2000

Keywords

Comments

The rectangle has this corner:
1, 2, 4, 7, 11, 16, 22, 29, ...
3, 5, 8, 12, 17, 23, 30, 38, ...
6, 9, 13, 18, 24, 31, 39, 48, ...
10, 14, 19, 25, 32, 40, 49, 59, ...
15, 20, 26, 33, 41, 50, 60, 71, ...
21, 27, 34, 42, 51, 61, 72, 84, ...
28, 35, 43, 52, 62, 73, 85, 98, ...

Examples

			The 8th prime, 19, is in row 4, so a(8) = 4.
		

Crossrefs

See A057061 for primes in columns.

Programs

  • Mathematica
    s = Flatten[Table[Range[n], {n, 1, 40}]];
    Table[s[[Prime[n]]], {n, 1, 100}]
  • PARI
    f(n) = n-binomial((sqrtint(8*n)+1)\2, 2); \\ A002260
    a(n) = f(prime(n)); \\ Michel Marcus, Feb 24 2023

Formula

a(n) = A002260(prime(n)). - Kevin Ryde, Feb 12 2023

Extensions

Edited by Clark Kimberling, Feb 13 2023

A057061 a(n) = number of the column of (R(i,j)) that contains prime(n), where R(i,j) is the rectangle with antidiagonals 1; 2,3; 4,5,6; ...

Original entry on oeis.org

2, 1, 2, 4, 5, 3, 5, 3, 6, 8, 6, 9, 5, 3, 9, 3, 8, 6, 12, 8, 6, 13, 9, 3, 9, 5, 3, 14, 12, 8, 10, 6, 17, 15, 5, 3, 15, 9, 5, 18, 12, 10, 20, 18, 14, 12, 21, 9, 5, 3, 21, 15, 13, 3, 20, 14, 8, 6, 24, 20, 18, 8, 19, 15, 13, 9, 21, 15, 5, 3, 26, 20, 12, 6
Offset: 1

Views

Author

Clark Kimberling, Jul 30 2000

Keywords

Comments

The rectangle R(i,j) has this corner:
1, 2, 4, 7, 11, 16, 22, 29, ...
3, 5, 8, 12, 17, 23, 30, 38, ...
6, 9, 13, 18, 24, 31, 39, 48, ...
10, 14, 19, 25, 32, 40, 49, 59, ...
15, 20, 26, 33, 41, 50, 60, 71, ...
21, 27, 34, 42, 51, 61, 72, 84, ...
28, 35, 43, 52, 62, 73, 85, 98, ...

Examples

			The 8th prime, 19, is in column 3, so a(8) = 3.
		

Crossrefs

See A057060 for primes in rows.

Programs

  • PARI
    f(n) = 1 + binomial(1 + floor(1/2 + sqrt(2*n)), 2) - n; \\ A004736
    a(n) = f(prime(n)); \\ Michel Marcus, Feb 24 2023

Formula

a(n) = A004736(prime(n)). - Michel Marcus, Feb 24 2023

Extensions

Edited by Clark Kimberling, Feb 12 2013

A185786 Third accumulation array of A107985, by antidiagonals.

Original entry on oeis.org

1, 6, 6, 21, 35, 21, 56, 120, 120, 56, 126, 315, 405, 315, 126, 252, 700, 1050, 1050, 700, 252, 462, 1386, 2310, 2695, 2310, 1386, 462, 792, 2520, 4536, 5880, 5880, 4536, 2520, 792, 1287, 4290, 8190, 11466, 12740, 11466, 8190, 4290, 1287, 2002, 6930, 13860, 20580, 24696, 24696, 20580, 13860, 6930, 2002, 3003, 10725, 22275, 34650
Offset: 1

Views

Author

Clark Kimberling, Feb 03 2011

Keywords

Comments

See A185784. The pattern established by the formulas for A185785, A185786, A185787, suggests that the H-th accumulation array of A107985 may be given by
T(n,k)=(n+k+H)C(n+H,H+1)C(k+H,H+1)/(H+2).

Examples

			Northwest corner:
1....6.....21.....56.....126
6....35....120....315....700
21...120...405....1050...2310
56...315...1050...2695...5880
		

Crossrefs

Cf. A185784.

Programs

  • Mathematica
    (See A185784.)
    f[n_, k_] := Binomial[k + 3, 4]*Binomial[n + 3, 4]*(n + k + 3)/5; Table[f[n - k + 1, k], {n, 10}, {k, n, 1, -1}] // Flatten (* G. C. Greubel, Jul 12 2017 *)

Formula

T(n,k) = (n+k+3)*C(n+3,4)*C(k+3,4)/5.

A360533 a(n) = index of the diagonal of the natural number array, A000027, that includes prime(n). See Comments.

Original entry on oeis.org

1, -1, 0, 3, 4, 0, 3, -1, 4, 7, 3, 8, 0, -4, 7, -5, 4, 0, 11, 3, -1, 12, 4, -8, 3, -5, -9, 12, 8, 0, 3, -5, 16, 12, -8, -12, 11, -1, -9, 16, 4, 0, 19, 15, 7, 3, 20, -4, -12, -16, 19, 7, 3, -17, 16, 4, -8, -12, 23, 15, 11, -9, 12, 4, 0, -8, 15, 3, -17, -21
Offset: 1

Views

Author

Clark Kimberling, Feb 10 2023

Keywords

Comments

The natural number array, A000027 = (w(n,k)) = (n + (n + k - 2) (n + k - 1)/2), has corner:
1 2 4 7 ...
3 5 8 12 ...
6 9 13 18 ...
10 14 19 25 ...
The indexing of diagonals is given in A191360. Conjecture: Every odd-indexed diagonal contains infinitely many primes.

Examples

			Prime(1) = 2  is in the diagonal (w(n,n+1)), so a(1) = 1.
Prime(13) = 43 is in the diagonal (w(n,n-4)), so a(7) = -4.
		

Crossrefs

Programs

  • Mathematica
    Map[1 + #[[1]] - 2 #[[2]] &[{#[[2]], #[[1]] - ((#[[2]] - 1) + (#[[2]] - 1)^2)/
    2} &[{#, Floor[(1 + Sqrt[8 # - 7])/2]}] &[Prime[#]]] &, Range[1000]]
    (* Peter J. C. Moses, Feb 07 2023 *)
Previous Showing 11-18 of 18 results.