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.

A279212 Fill an array by antidiagonals upwards; in the top left cell enter a(0)=1; thereafter, in the n-th cell, enter the sum of the entries of those earlier cells that can be seen from that cell.

Original entry on oeis.org

1, 1, 2, 2, 6, 11, 4, 15, 39, 72, 8, 37, 119, 293, 543, 16, 88, 330, 976, 2364, 4403, 32, 204, 870, 2944, 8373, 20072, 37527, 64, 464, 2209, 8334, 26683, 74150, 176609, 331072, 128, 1040, 5454, 22579, 79534, 246035, 673156, 1595909, 2997466, 256, 2304, 13176, 59185, 226106, 762221, 2303159, 6231191, 14721429, 27690124
Offset: 0

Views

Author

N. J. A. Sloane, Dec 24 2016

Keywords

Comments

"That can be seen from" means "that are on the same row, column, diagonal, or antidiagonal as".
Inspired by A279967.
Conjecture: Every column has a finite number of odd entries, and every row and diagonal have an infinite number of odd entries. - Peter Kagey, Mar 28 2020. The conjecture about columns is true, see that attached pdf file from Alec Jones.
The "look" keyword refers to Peter Kagey's bitmap. - N. J. A. Sloane, Mar 29 2020
The number of sequences of queen moves from (1, 1) to (n, k) in the first quadrant moving only up, right, diagonally up-right, or diagonally up-left. - Peter Kagey, Apr 12 2020
Column 0 gives A011782. In the column 1, the only powers of 2 occur at positions A233328(k) with value a(k(k+1)/2 + 1), k >=1 (see A335903). Conjecture: Those are the only multiple occurrences of numbers greater than 1 in this sequence (checked through the first 2000 antidiagonals). - Hartmut F. W. Hoft, Jun 29 2020

Examples

			The array begins:
i/j|  0    1    2     3     4      5      6       7       8
-------------------------------------------------------------
0  |  1    2   11    72   543   4403  37527  331072 2997466 ...
1  |  1    6   39   293  2364  20072 176609 1595909 ...
2  |  2   15  119   976  8373  74150 673156 ...
3  |  4   37  330  2944 26683 246035 ...
4  |  8   88  870  8334 79534 ...
5  | 16  204 2209 22579 ...
6  | 32  464 5454 ...
7  | 64 1040 ...
8  |128 ...
  ...
For example, when we get to the antidiagonal that reads 4, 15, 39, ..., the reason for the 39 is that from that cell we can see one cell that has been filled in above it (containing 11), one cell to the northwest (2), two cells to the west (1, 6), and two to the southwest (4, 15), for a total of a(8) = 39.
The next pair of duplicates greater than 2 is 2^20 = 1048576 = a(154) = a(231), located in antidiagonals 17 = A233328(2) and 21, respectively. For additional duplicate numbers in this sequence see A335903.  - _Hartmut F. W. Hoft_, Jun 29 2020
		

Crossrefs

Cf. A064642 is analogous if a cell can only "see" its immediate neighbors.
See A280026, A280027 for similar sequences based on a spiral.

Programs

  • Mathematica
    s[0, 0] = 1; s[i_, j_] := s[i, j] = Sum[s[k, j], {k, 0, i-1}] + Sum[s[i, k], {k, 0, j-1}] + Sum[s[i+j-k, k], {k, 0, j-1}] + Sum[s[i-k-1, j-k-1], {k, 0, Min[i, j] - 1}]
    aDiag[m_] := Map[s[m-#, #]&, Range[0, m]]
    a279212[n_] := Flatten[Map[aDiag, Range[0, n]]]
    a279212[9] (* data - 10 antidiagonals;  Hartmut F. W. Hoft, Jun 29 2020 *)

Formula

T(0, 0) = 1; T(i, j) = Sum_{k=0..i-1} T(k, j) + Sum_{k=0..j-1} T(i, k) + Sum_{k=0..j-1} T(i+j-k, k) + Sum_{k=0..min(i, j)-1} T(i-k-1, j-k-1), with recursion upwards along antidiagonals. - Hartmut F. W. Hoft, Jun 29 2020

A279211 Fill an array by antidiagonals upwards; in the n-th cell, enter the number of earlier cells that can be seen from that cell.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Dec 24 2016

Keywords

Comments

"That can be seen from" means "that are on the same row, column, diagonal, or antidiagonal as".
Inspired by A279967.
Since the sum of row and column index is constant for elements in an antidiagonal, the entries along an antidiagonal on and above the diagonal equal twice the number of the antidiagonal. - Hartmut F. W. Hoft, Jun 29 2020

Examples

			The array begins:
x\y| 0  1  2  3  4  5  6 ...
---+--------------------
  0| 0  2  4  6  8 10 12 ...
  1| 1  4  6  8 10 12 ...
  2| 2  5  8 10 12 ...
  3| 3  6  9 12 ...
  4| 4  7 10 13 ...
  5| 5  8 11 14 ...
  6| ...
...
For example, when we get to the antidiagonal that reads 4, 6, 8 ..., the reason for the 8 is that from that cell we can see two cells that have been filled in above it (containing 4 and 6), two cells to the northwest (0, 4), two cells to the west (2, 5), and two to the southwest (4, 6), which is 8 cells, so a(12) = 8.
		

Crossrefs

See A280026, A280027 for similar sequences based on a spiral.

Programs

  • Mathematica
    countCells[i_, j_] := i + 2*j + Min[i, j]
    a279211[m_] := Map[countCells[m - #, #]&, Range[0, m]]
    Flatten[Map[a279211,Range[0,10]]]  (* antidiagonals 0..10 data - Hartmut F. W. Hoft, Jun 29 2020 *)

Formula

T(x,y) = x+3*y if x >= y; T(x,y) = 2*(x+y) if x <= y.
T(i, j) = i + 2*j + min(i, j). - Hartmut F. W. Hoft, Jun 29 2020

Extensions

More terms from Alec Jones, Dec 25 2016

A280026 Fill an infinite square array by following a spiral around the origin; in the n-th cell, enter the number of earlier cells that can be seen from that cell.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Dec 24 2016

Keywords

Comments

The spiral track being used here is the same as in A274640, except that the starting cell here is numbered 0 (as in A274641).
"Can be seen from" means "are on the same row, column, diagonal, or antidiagonal as".
The entry in a cell gives the number of earlier cells that are occupied in any of the eight cardinal directions. - Robert G. Wilson v, Dec 25 2016
First occurrence of k = 0,1,2,3,...: 0, 1, 2, 3, 5, 7, 8, 11, 14, 15, 19, 23, 24, 29, 34, 35, 41, 47, 48, 55, 62, ... - Robert G. Wilson v, Dec 25 2016

Examples

			The central portion of the spiral is:
.
    7---9---8---7---6
    |               |
    8   3---3---2   7
    |   |       |   |
    9   4   0---1   6
    |   |           |
   10   4---5---6---5
    |
    8---9--10--11--12 ...
		

Crossrefs

See A280027 for an additive version.
See A279211, A279212 for versions that follow antidiagonals in just one quadrant.

Programs

  • Mathematica
    a[n_] := a[n - 1] + If[ IntegerQ@ Sqrt@ n || IntegerQ@ Sqrt[4n +1], 2 - Select[{Sqrt@ n, (Sqrt[4n +1] -1)/2}, IntegerQ][[1]], 1]; a[0] = 0; Array[a, 76, 0] (* Robert G. Wilson v, Dec 25 2016 *)

Formula

Empirically: a(0)=0, a(n+1)=a(n)+d for n>0, when n=k^2 or n=k*(k+1) then d=2-k, else d=1.

Extensions

Corrected a(23) and more terms from Lars Blomberg, Dec 25 2016

A334741 Fill an infinite square array by following a spiral around the origin; in the central cell enter a(0)=1; thereafter, in the n-th cell, enter the sum of the entries of those earlier cells that are in the same row or column as that cell.

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 8, 11, 21, 40, 47, 93, 180, 203, 397, 796, 1576, 1675, 3305, 6636, 13192, 14004, 27607, 55029, 110192, 220024, 226740, 450123, 898661, 1798700, 3594248, 3704800, 7354303, 14681369, 29349536, 58710640, 117394896, 119196748, 237492079
Offset: 0

Views

Author

Alec Jones and Peter Kagey, May 09 2020

Keywords

Comments

The spiral track being used here is the same as in A274640, except that the starting cell here is indexed 0 (as in A274641).
The central cell gets index 0 (and we fill it in with the value a(0)=1).

Examples

			Spiral begins:
     3----2----1
     |         |
     5    1----1   47
     |              |
     8---11---21---40
a(11) = 47 = 1 + 1 + 5 + 40, the sum of the cells in its row and column.
		

Crossrefs

Cf. A280027.
x- and y-coordinates are given by A174344 and A274923, respectively.

Programs

  • PARI
    \\ here P(n) returns A174344 and A274923 as pair.
    P(n)={my(m=sqrtint(n), k=ceil(m/2)); n -= 4*k^2; if(n<0, if(n<-m, [k, 3*k+n], [-k-n, k]), if(nAndrew Howroyd, May 09 2020
Showing 1-4 of 4 results.