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.

User: Alec Jones

Alec Jones's wiki page.

Alec Jones has authored 37 sequences. Here are the ten most recent ones:

A335490 Isosceles triangle read by rows in which each term is the least positive integer satisfying the condition that no row, diagonal, or antidiagonal contains a repeated term.

Original entry on oeis.org

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

Author

Alec Jones and Peter Kagey, Sep 12 2020

Keywords

Comments

The n-th instance of 1 occurs at index A001844(n-1).
Records occur at 1, 2, 3, 7, 10, 12, 15, 20, 21, 27, 53, 54, 55, 65, ...

Examples

			Triangle begins:
       1
      2 3
     3 1 2
    4 2 3 5
   5 6 1 4 7
  6 4 X ...
The value for X is 5 because 1, 2, and 3 are on the diagonal; 4 and 6 are on the antidiagonal; and 4 and 6 are in the row. Therefore 5 is the smallest value that can be inserted so that no diagonal, antidiagonal, or row contains a repeated term.
		

Crossrefs

Analogs for other tilings: A269526 (square), A334049 (triangular).

Formula

a(n) = A296339(n-1) + 1. - Rémy Sigrist, Sep 13 2020

A337415 a(n) is the number of ways to tile a size n triangle in the triangular grid with n n-cell polyiamonds, up to rotation and reflection of the triangle.

Original entry on oeis.org

1, 0, 1, 3, 11, 314
Offset: 1

Author

Peter Kagey and Alec Jones, Aug 26 2020

Keywords

Comments

The initial values are computed via the program from Arnauld Chevallier in the Code Golf Stack Exchange link.

Examples

			An example of the a(4) = 3 essentially different ways of tiling a size 4 triangle with 4-iamonds can be found via the Code Golf Stack Exchange link.
		

Crossrefs

A328020 is the analog for square on the square grid.
Cf. A000577.

A334049 Triangular array read by rows in which each term is the least positive integer satisfying the condition that no row, diagonal, or antidiagonal contains a repeated term.

Original entry on oeis.org

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

Author

Alec Jones and Peter Kagey, Sep 06 2020

Keywords

Comments

An infinite Sudoku-type array.
Here, "diagonal" means a diagonal line with an inclination of -60 degrees, and "antidiagonal" means a diagonal line with an inclination of 60 degrees. Thus, the index-7 cell is in the same row as prior cells of indices 5 and 6, in the same diagonal as prior cells of indices 2 and 6, and in the same antidiagonal as the prior cell of index 4.
Triangular tiling is indexed as follows:
*
/ \
/ 1 \
*-----*
/ \ 3 / \
/ 2 \ / 4 \
*-----*-----*
/ \ 6 / \ 8 / \
/ 5 \ / 7 \ / 9 \
*-----*-----*-----*

Examples

			Triangle begins:
           *
          / \
         / 1 \
        *-----*
       / \ 3 / \
      / 2 \ / 4 \
     *-----*-----*
    / \ 5 / \ 2 / \
   / 4 \ / 1 \ / 6 \
  *-----*-----*-----*
		

Crossrefs

Triangular tiling analog of A269526.
Cf. A274821.

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

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

A334745 Starting with a(1) = a(2) = 1, proceed in a square spiral, computing each term as the sum of diagonally adjacent prior terms.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 3, 2, 3, 1, 1, 3, 2, 3, 1, 1, 3, 3, 3, 3, 1, 1, 3, 3, 3, 3, 1, 1, 4, 3, 6, 3, 4, 1, 1, 4, 3, 6, 3, 4, 1, 1, 4, 4, 6, 6, 4, 4, 1, 1, 4, 4, 6, 6, 4, 4, 1, 1, 5, 4, 10, 6, 10, 4, 5, 1, 1, 5, 4, 10, 6
Offset: 1

Author

Alec Jones and Peter Kagey, May 09 2020

Keywords

Examples

			Spiral begins:
... 3---3---3---3---1
                    |
1---1---2---2---1   1
|               |   |
2   1---1---1   1   3
|   |       |   |   |
2   1   1---1   2   2
|   |           |   |
1   1---2---1---1   3
|                   |
1---3---2---3---1---1
The last illustrated term above is a(35) = 3 = 2 + 1 because diagonally down-right is 2 and diagonally down-left is 1.
		

Crossrefs

The x- and y-coordinates at n-th step are A174344 and A274923 respectively.

Formula

Conjecture: a(2n-1) = A247976(n).

A334742 Pascal's spiral: starting with a(1) = 1, proceed in a square spiral, computing each term as the sum of horizontally and vertically adjacent prior terms.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 3, 4, 5, 5, 6, 7, 7, 8, 10, 12, 12, 14, 17, 20, 20, 23, 27, 32, 37, 37, 42, 48, 55, 62, 62, 69, 77, 87, 99, 111, 111, 123, 137, 154, 174, 194, 194, 214, 237, 264, 296, 333, 370, 370, 407, 449, 497, 552, 614, 676, 676, 738, 807, 884, 971, 1070
Offset: 1

Author

Alec Jones and Peter Kagey, May 09 2020

Keywords

Comments

This is the square spiral analogy of Pascal's triangle thought of as a table read by antidiagonals.

Examples

			Spiral begins:
  111--99--87--77--69--62
                        |
   12--12--10---8---7  62
    |               |   |
   14   2---2---1   7  55
    |   |       |   |   |
   17   3   1---1   6  48
    |   |           |   |
   20   3---4---5---5  42
    |                   |
   20--23--27--32--37--37
a(15) = 10 = 8 + 2, the sum of the cells immediately to the right and below. The term to the left is not included in the sum because it has not yet occurred in the spiral.
		

Crossrefs

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

Formula

a(A033638(n)) = a(A002620(n)) for n > 1.

A333401 a(n) is the distance between n and -n in A333400.

Original entry on oeis.org

2, 4, 3, 4, 3, 3, 3, 3, 3, 4, 3, 5, 3, 5, 3, 4, 2, 7, 3, 5, 3, 4, 2, 6, 4, 5, 3, 4, 2, 7, 3, 5, 4, 5, 4, 7, 2, 5, 4, 4, 2, 6, 4, 5, 6, 3, 4, 6, 2, 5, 3, 5, 3, 7, 3, 5, 5, 4, 4, 5, 4, 5, 4, 4, 2, 7, 3, 5, 3, 5, 4, 7, 3, 5, 4, 4, 2, 7, 3, 5, 6, 3, 4, 6, 2, 5, 3
Offset: 1

Author

Alec Jones, Mar 18 2020

Keywords

Comments

Records occur at n = 1, 2, 12, 18, 108, 216, 8856, ...
Interestingly, a(224) = a(225) = ... = a(441) = 3.

A333400 Lexicographically earliest infinite sequence of distinct integers whose partial sums are all distinct integers.

Original entry on oeis.org

0, -1, -2, 1, -3, -4, 2, 3, 5, 4, 6, -5, 7, -6, 8, -7, 9, -8, 10, -9, 11, 12, -10, -11, 13, 14, -12, -13, 15, 16, -14, -15, 18, -16, 17, 19, -17, 20, -19, -18, 21, 22, -20, -21, 24, -22, 23, 25, -23, 26, -24, -25, 27, 28, -26, -27, 30, -28, 29, 31, -29, 32
Offset: 1

Author

Alec Jones, Mar 18 2020

Keywords

Comments

This sequence is infinite. Consider first n partial sums; a distinct partial sum can always be formed by choosing a sufficiently large integer for a(n+1).
We organize lexicographically by magnitude, i.e., a precedes b if |a| < |b|; if |a| = |b|, then a precedes b if a < b.
Conjecture: This is a permutation of the integers.

Crossrefs

Cf. A333398, the partial sums of this sequence.
Cf. A328190 and A327460 for similar constructions.

A333398 Partial sums of A333400.

Original entry on oeis.org

0, -1, -3, -2, -5, -9, -7, -4, 1, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 33, 23, 12, 25, 39, 27, 14, 29, 45, 31, 16, 34, 18, 35, 54, 37, 57, 38, 20, 41, 63, 43, 22, 46, 24, 47, 72, 49, 75, 51, 26, 53, 81, 55, 28, 58, 30, 59, 90, 61, 93, 62, 32, 65, 99, 67
Offset: 1

Author

Alec Jones, Mar 18 2020

Keywords

Comments

Conjecture: This is a permutation of the integers.

Crossrefs

Cf. A333400.

A297025 Number of iterations of A220096 required to reach 0 starting from n.

Original entry on oeis.org

0, 1, 2, 3, 3, 4, 4, 5, 4, 4, 5, 6, 5, 6, 6, 5, 5, 6, 5, 6, 6, 6, 7, 8, 6, 5, 7, 5, 7, 8, 6, 7, 6, 7, 7, 6, 6, 7, 7, 7, 7, 8, 7, 8, 8, 6, 9, 10, 7, 6, 6, 7, 8, 9, 6, 7, 8, 7, 9, 10, 7, 8, 8, 7, 7, 7, 8, 9, 8, 9, 7, 8, 7, 8, 8, 6, 8, 7, 8, 9, 8, 6, 9, 10, 8, 7
Offset: 0

Author

Peter Kagey and Alec Jones, Dec 24 2017

Keywords

Comments

Records occur at indices 0, 1, 2, 3, 5, 7, 11, 22, 23, 46, 47, 94, ... (see A297026).

Examples

			For n = 14, a(14) = 6 because six iterations are required to reach zero:
A220096(14) = 7,
A220096(7)  = 6,
A220096(6)  = 3,
A220096(3)  = 2,
A220096(2)  = 1, and
A220096(1)  = 0.
		

Crossrefs

Cf. A220096. Positions of records at A297026.

Programs

  • Mathematica
    g[n_Integer] := If[n == 1, 0, Block[{fi = FactorInteger@ n}, If[Plus @@ (Last@# & /@ FactorInteger@n) == 1, n -1, n/fi[[1, 1]] ]]]; f[n_] := Length@ NestWhileList[g, n, # > 0 &] -1; Array[f, 86, 0] (* Robert G. Wilson v, Dec 24 2017 *)
  • PARI
    f(n) = if (n==1, 0, isprime(n), n-1, my(d=divisors(n)); d[#d-1]);
    a(n) = my(nb = 0); while (n, n = f(n); nb++); nb; \\ Michel Marcus, Dec 24 2017