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

A334001 The number of odd values in the n-th column of A279212.

Original entry on oeis.org

2, 2, 4, 4, 6, 8, 8, 10, 10, 12, 16, 12, 16, 14, 18, 12, 22, 24, 20, 16, 22, 22, 24, 26, 22, 26, 28, 16, 30, 30, 36, 24, 34, 36, 32, 30, 30, 44, 42, 44, 38, 44, 50, 34, 44, 46, 54, 36, 50, 60, 56, 30, 50, 56, 56, 46, 54, 56, 68, 36, 68, 54, 56, 46, 44, 66, 54
Offset: 1

Views

Author

Peter Kagey, Apr 12 2020

Keywords

Comments

All of the values in this sequence are even, as shown in Alec Jones's proof that each column of A279212 has a finite number of odd entries.
Conjecture: a(n) <= 2*n.

Examples

			For n = 3, the third column of A279212 is 11, 39, 119, 330, 870, 2209, 5454, 13176, 31280, 73200, ... which contains a(3) = 4 odd values.
		

Crossrefs

Cf. A279212.

A335903 Column 1 in the matrix of A279212 (whose indexing starts at 0).

Original entry on oeis.org

2, 6, 15, 37, 88, 204, 464, 1040, 2304, 5056, 11008, 23808, 51200, 109568, 233472, 495616, 1048576, 2211840, 4653056, 9764864, 20447232, 42729472, 89128960, 185597952, 385875968, 801112064, 1660944384, 3439329280, 7113539584, 14696841216, 30333206528, 62545461248, 128849018880, 265214230528, 545460846592
Offset: 1

Views

Author

Hartmut F. W. Hoft, Jun 29 2020

Keywords

Comments

Indexing for this sequence starts at 1 since then the index is the same as the number of the antidiagonal in the matrix for A279212 in which a number in column 1 of A279212 occurs.

Examples

			a(17) = a(A233328(2)) = 1048576 = 2^20 = T(16, 1) = T(21, 0) in terms of matrix T of A279212; 2^20 is in column 1 of the 17th antidiagonal and in column 0 of the 21st antidiagonal of the matrix of A279212.
A search for duplicates in A279212 through antidiagonal 2000 produced only pairs of powers of 2 in columns 0 and 1 of the matrix of A279212. Let k_0 and k_1 be the antidiagonals in columns 0 and 1, respectively, for the pair of the n-th duplicates. Since k_0 = 2 and k_1 = 1 for the duplicates of 2, the first pair in both columns, then k_0 = k_1 + 3*n - 2 for the n-th pair, n >=1.
Table of duplicates in column 1 of the matrix of A279212 (the values for k_0 are one larger than the exponents in the left column of the table below because column 0 is sequence A011782):
value of    number of        index in
number      antidiagonal     A279212
-------------------------------------
2^1               1               2
2^20             17             154
2^151           145           10586
2^1178         1169          683866
2^9373         9361        43818842
2^74912       74897      2804817754
2^599203     599185    179511631706
... ... ...
The central column of the table is A233328. The values for the first 4 antidiagonals were computed using sequence A279212, the ones larger than antidiagonal 2000 were determined by computing those n for which 7*n + 9 is a power of 2.
The right column is n*(n+1)/2 + 1, where n is the number in the central column.
		

Crossrefs

Programs

  • Mathematica
    a335903[1] = 2; a335903[2] = 6; a335903[n_] := (7n+9)*2^(n-4)
    Map[a335903, Range[35]]  (* data  *)
  • PARI
    Vec(x*(1 - x)*(2 - x^2) / (1 - 2*x)^2 + O(x^30)) \\ Colin Barker, Jun 29 2020

Formula

a(1) = 2, a(2) = 6, a(3) = 15, a(n) = 2 * a(n-1) + 7 * 2^(n-4), for n >= 4 (recursion for column 1 in the matrix of A279212).
a(1) = 2, a(2) = 6, a(n) = (7*n + 9) * 2^(n - 4), for n >= 3.
From Colin Barker, Jun 29 2020: (Start)
G.f.: x*(1 - x)*(2 - x^2) / (1 - 2*x)^2.
a(n) = 4*a(n-1) - 4*a(n-2) for n > 4.
(End)

A279967 Square array read by antidiagonals upwards in which each term is the sum of prior elements in the same row, column, diagonal, or antidiagonal that divide n; the array is seeded with an initial value a(1)=1.

Original entry on oeis.org

1, 1, 2, 2, 2, 7, 2, 9, 10, 15, 2, 10, 1, 13, 17, 8, 0, 13, 1, 14, 9, 8, 0, 13, 3, 30, 13, 10, 2, 16, 1, 23, 5, 7, 14, 15, 2, 8, 28, 32, 2, 23, 2, 9, 49, 12, 0, 48, 2, 11, 1, 20, 3, 18, 13, 28, 0, 4, 1, 56, 5, 8, 16, 35, 46, 4, 2, 6, 2, 10
Offset: 1

Views

Author

Alec Jones, Dec 24 2016

Keywords

Comments

From Hartmut F. W. Hoft, Jan 23 2017: (Start)
Shown by induction and direct (modular) computations for
column 1: Every number is even, except for the first two 1's; in addition to row 3, value 2 occurs in rows 4*k and 4*k+1, and every value in rows 4*k+2 and 4*k+3 is divisible by 4, for all k>=1.
column 2: The first four entries, 2, 2, 9 and 10, contain the only odd number; no nonzero entry in row k>3 has 9 as a factor, and value 0 occurs in rows 4*k+1 and 4*k+2, for all k>=1.
Conjecture:
a({1, 6, 8, 9, 10, 15, 26, 45, 48, 84, 96, 112, 115, 252, 336, 343}) =
{1, 7, 9,10, 15, 17, 30, 49, 48,104,117, 115, 122, 257, 343, 395} are the only numbers in the sequence with the property a(n) >= n (verified through n=500500, i.e., the triangle with 1000 antidiagonals).
This conjecture together with Bouniakowsky's conjecture that certain quadratic integer polynomials generate infinitely many primes (e.g. see A002496 for n^2+1 and A188382 for 2*n^2+n+1) implies that in every column in the triangle infinitely many prime sequence indices occur and therefore infinitely many 0's whenever the column contains no 1's. The proof is based on the fact that for a large enough prime sequence index p in whose prior column no 1 occurs then a(p)=0; therefore infinitely many 0's occur in that column. Obviously, once value 1 occurs in a column no 0 value can occur in a subsequent row.
Conjecture:
Every row in the triangle contains exactly two 1's.
(End)

Examples

			After 6 terms, the array looks like:
.
1   2   7
1   2
2
We have a(6) = 7 because a(1) = 1, a(3) = 2, a(4) = 2, and a(5) = 2 divide 6; 1 + 2 + 2 + 2 = 7.
From _Hartmut F. W. Hoft_, Jan 23 2017: (Start)
1   2   7  15  17   9  10  15  49  13   4  31  22
1   2  10  13  14  13  14   9  18  46  12  66
2   9   1   1  30   7   2   3  35  12   3
2  10  13   3   5  23  20  16  14  17
2   0  13  23   2   1   8  11   2
8   0   1  32  11   5   3   6
8  16  28   2  56  42   8
2   8  48   1   2 104
2   0   4  10   1
12   0   2  10
28   6   2
2  42
2
.
Expanded the triangle to the first 13 antidiagonals of the array, i.e. a(1) ... a(91), to show the start of the 2- and 0-value patterns in columns 1 and 2. The first 0 beyond column 2 is a(677) in row 27, column 11 of the triangle.
A188382(n)=2*n^2+n+1 for n>=0 are the alternate sequence indices for column 1 starting in row 1, 2*n^2+n+2 for n>=1 are the alternate sequence indices for column 2 starting in row 2, and 2*n^2+n+11 for n>=5 are the alternate sequence indices for column 11 starting in row 1.
The sequence indices in the triangle for row positions k>=1 in columns 1,..., 5 are given in sequences A000124(k), A152948(k+3), A152950(k+3), A145018(k+4) and A167499(k+4).
(End)
		

Crossrefs

Cf. A279966 for the related sequence which counts prior terms.
Cf. A269347 for a one-dimensional version of this sequence.
Cf. also A279211, A279212.

Programs

  • Mathematica
    (*  printing of the triangle is commented out of function a279967[]  *)
    pCol[{i_, j_}] := Map[{#, j}&, Range[1, i-1]]
    pDiag[{i_, j_}] := If[j>=i, Map[{#, j-i+#}&, Range[1, i-1]], Map[{i-j+#, #}&, Range[1, j-1]]]
    pRow[{i_, j_}] := Map[{i, #}&, Range[1, j-1]]
    pAdiag[{i_, j_}] := Map[{i+j-#, #}&, Range[1, j-1]]
    priorPos[{i_, j_}] := Join[pCol[{i, j}], pDiag[{i, j}], pRow[{i, j}], pAdiag[{i, j}]]
    seqPos[{i_, j_}] := (i+j-2)(i+j-1)/2+j
    antiDiag[k_] := Map[{k+1-#, #}&, Range[1, k]]
    upperTriangle[k_] := Flatten[Map[antiDiag, Range[1, k]], 1]
    a279967[k_] := Module[{ut=upperTriangle[k], ms=Table[" ", {i, 1, k}, {j, 1, k}], h, pos, val, seqL={1}}, ms[[1, 1]]=1; For[h=2, h<=Length[ut], h++, pos=ut[[h]]; val=Apply[Plus, Select[Map[ms[[Apply[Sequence, #]]]&, priorPos[pos]], #!=0 && Mod[seqPos[pos], #]==0&]]; AppendTo[seqL, val]; ms[[Apply[Sequence, pos]]]=val]; (* Print[TableForm[ms]]; *) seqL]
    a279967[13] (* values in first 13 antidiagonals *)
    (* Hartmut F. W. Hoft, Jan 23 2017 *)

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

A334016 Table read by antidiagonals upward: T(n,k) is the number of ways to move a chess queen from (1,1) to (n,k) in the first quadrant using only right, diagonal up-right, and diagonal up-left moves.

Original entry on oeis.org

1, 1, 1, 2, 4, 6, 4, 10, 21, 35, 8, 25, 65, 139, 237, 16, 60, 179, 451, 978, 1684, 32, 140, 470, 1337, 3339, 7239, 12557, 64, 320, 1189, 3725, 10325, 25559, 55423, 96605, 128, 720, 2926, 9958, 30018, 81716, 200922, 435550, 761938, 256, 1600, 7048, 25802, 83518
Offset: 1

Views

Author

Peter Kagey, Apr 12 2020

Keywords

Examples

			Table begins:
n\k|   1    2     3      4       5        6         7          8
---+------------------------------------------------------------
  1|   1    1     6     35     237     1684     12557      96605
  2|   1    4    21    139     978     7239     55423     435550
  3|   2   10    65    451    3339    25559    200922    1611624
  4|   4   25   179   1337   10325    81716    658918    5394051
  5|   8   60   470   3725   30018   245220   2027447   16935981
  6|  16  140  1189   9958   83518   703635   5961973   50811786
  7|  32  320  2926  25802  224831  1951587  16938814  147261146
  8|  64  720  7048  65241  589701  5269220  46826316  415175289
For example, the T(2,2) = 4 valid sequences of moves from (1,1) to (2,2) are:
(1,1) -> (2,1) -> (1,2) -> (2,2),
(1,1) -> (2,1) -> (3,1) -> (2,2),
(1,1) -> (2,2), and
(1,1) -> (3,1) -> (2,2).
		

Crossrefs

Cf. A035002 (up, right), A059450 (right, up-left), A132439 (up, right, up-right), A279212 (up, right, up-right, up-left), A334017 (up, right, up-left).
A071945 is the analog for king moves. For both king and queen moves, A094727 is the length of the longest sequence of moves.

Formula

T(n,k) = Sum_{i=1..k-1} T(n+i, k-i) + Sum_{i=1..min(n,k)-1} T(n-i, k-i) + Sum_{i=1..n-1} T(n-i, k).

A279968 Square array read by antidiagonals upwards in which each term is the number of prior elements in the same row, column, diagonal, or antidiagonal whose parity is not the same as the parity of n.

Original entry on oeis.org

0, 0, 2, 0, 4, 0, 3, 1, 4, 2, 3, 3, 5, 3, 4, 2, 3, 5, 5, 4, 7, 2, 4, 5, 5, 6, 8, 3, 5, 4, 5, 10, 7, 7, 7, 7, 5, 5, 5, 9, 6, 12, 6, 8, 9, 4, 5, 8, 6, 6, 10, 9, 9, 7, 10, 4, 6, 8, 8, 5, 13, 9, 9, 12, 12, 8, 7, 6, 7, 8, 10, 9, 10, 12, 7, 11, 14, 9
Offset: 1

Views

Author

Alec Jones, Dec 24 2016

Keywords

Examples

			The first six terms of this array are:
.
0 2 0
0 4
0
.
a(8) = 1 because the parity of 8 is different from the parity of a(7) = 1.
a(3) = 2 because the parity of 3 is different from the parity of a(2) = 0 and a(1) = 0.
		

Crossrefs

Cf. A279965 for the related sequence which counts same-parity prior elements.
Cf. also A279211, A279212.

Programs

  • Haskell
    a279968 n = genericIndex a279968_list (n - 1)
    a279968_list = map count [1..] where
      count n = genericLength $ filter (odd . (n+)) adjacentLabels where
        adjacentLabels = map a279968 (a274080_row n)

A334017 Table read by antidiagonals upward: T(n,k) is the number of ways to move a chess queen from (1,1) to (n,k) in the first quadrant using only up, right, and diagonal up-left moves.

Original entry on oeis.org

1, 1, 2, 2, 5, 10, 4, 13, 33, 63, 8, 32, 98, 240, 454, 16, 76, 269, 777, 1871, 3539, 32, 176, 702, 2295, 6420, 15314, 29008, 64, 400, 1768, 6393, 19970, 54758, 129825, 246255, 128, 896, 4336, 17088, 58342, 176971, 478662, 1129967, 2145722, 256, 1984, 10416
Offset: 1

Views

Author

Peter Kagey, Apr 12 2020

Keywords

Comments

First row is A175962.

Examples

			Table begins:
n\k|  1   2     3      4       5        6         7          8
---+----------------------------------------------------------
  1|  1   2    10     63     454     3539     29008     246255
  2|  1   5    33    240    1871    15314    129825    1129967
  3|  2  13    98    777    6420    54758    478662    4266102
  4|  4  32   269   2295   19970   176971   1593093   14532881
  5|  8  76   702   6393   58342   536080   4965056   46345046
  6| 16 176  1768  17088  163041  1550809  14765863  140982374
  7| 32 400  4336  44280  440602  4332221  42373370  413689403
  8| 64 896 10416 111984 1159580 11771312 118190333 1179448443
For example, the T(2,2) = 5 sequences of permissible queen's moves from (1,1) to (2,2) are:
(1,1) -> (1,2) -> (2,2),
(1,1) -> (2,1) -> (1,2) -> (2,2),
(1,1) -> (2,1) -> (2,2),
(1,1) -> (2,1) -> (3,1) -> (2,2), and
(1,1) -> (3,1) -> (2,2).
		

Crossrefs

Cf. A175962.
Cf. A035002 (up, right), A059450 (right, up-left), A132439 (up, right, up-right), A279212 (up, right, up-left), A334016 (right, up-right, up-left).
A033877 is the analog for king moves. For both king and queen moves, A094727 is the length of the longest sequence of moves.

A338276 a(n) is the number of odd terms in the n-th column of A334016.

Original entry on oeis.org

2, 2, 4, 6, 6, 6, 8, 10, 12, 14, 12, 10, 10, 10, 16, 22, 22, 22, 20, 18, 18, 18, 16, 14, 16, 18, 20, 22, 22, 22, 32, 42, 44, 46, 36, 26, 26, 26, 32, 38, 36, 34, 28, 22, 22, 22, 24, 26, 26, 26, 28, 30, 30, 30, 32, 34, 40, 46, 44, 42, 42, 42, 64, 86, 86, 86, 68
Offset: 1

Views

Author

Peter Kagey, Oct 20 2020

Keywords

Comments

All terms are even.
Conjecture: a(2^n - 1) = 2^n for n > 0. - Peter Kagey, Oct 22 2020

Examples

			Table for A334016 begins:
n\k|   1    2     3      4       5        6         7          8
---+------------------------------------------------------------
  1|   1    1     6     35     237     1684     12557      96605
  2|   1    4    21    139     978     7239     55423     435550
  3|   2   10    65    451    3339    25559    200922    1611624
  4|   4   25   179   1337   10325    81716    658918    5394051
  5|   8   60   470   3725   30018   245220   2027447   16935981
  6|  16  140  1189   9958   83518   703635   5961973   50811786
  7|  32  320  2926  25802  224831  1951587  16938814  147261146
  8|  64  720  7048  65241  589701  5269220  46826316  415175289
a(1) = 2 because the first column has two odd values: (1,1).
a(2) = 2 because the second column has two odd values: (1,25).
a(3) = 4 because the third column has four odd values: (35,139,451,1337).
		

Crossrefs

Cf. A334016.
Cf. A334001 is analogous for A279212.
Showing 1-9 of 9 results.