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 21-30 of 30 results.

A080335 Diagonal in square spiral or maze arrangement of natural numbers.

Original entry on oeis.org

1, 5, 9, 17, 25, 37, 49, 65, 81, 101, 121, 145, 169, 197, 225, 257, 289, 325, 361, 401, 441, 485, 529, 577, 625, 677, 729, 785, 841, 901, 961, 1025, 1089, 1157, 1225, 1297, 1369, 1445, 1521, 1601, 1681, 1765, 1849, 1937, 2025, 2117, 2209, 2305, 2401, 2501
Offset: 0

Views

Author

Paul Barry, Mar 19 2003

Keywords

Comments

Interleaves the odd squares A016754 with (1+4n^2), A053755.
Squares of positive integers (plus 1 if n is odd). - Wesley Ivan Hurt, Oct 10 2013
a(n) is the maximum total number of queens that can coexist without attacking each other on an [n+3] X [n+3] chessboard, when the lone queen is in the most vulnerable position on the board. Specifically, the lone queen will placed in any center position, facing an opponent's "army" of size a(n)-1 == A137932(n+2). - Bob Selcoe, Feb 12 2015
a(n) is also the edge chromatic number of the complement of the (n+2) X (n+2) rook graph. - Eric W. Weisstein, Jan 31 2024

Crossrefs

Sequences on the four axes of the square spiral: Starting at 0: A001107, A033991, A007742, A033954; starting at 1: A054552, A054556, A054567, A033951.
Sequences on the four diagonals of the square spiral: Starting at 0: A002939 = 2*A000384, A016742 = 4*A000290, A002943 = 2*A014105, A033996 = 8*A000217; starting at 1: A054554, A053755, A054569, A016754.
Sequences obtained by reading alternate terms on the X and Y axes and the two main diagonals of the square spiral: Starting at 0: A035608, A156859, A002378 = 2*A000217, A137932 = 4*A002620; starting at 1: A317186, A267682, A002061, A080335.

Programs

Formula

a(n) = (3 + 4*n + 2*n^2 - (-1)^n)/2.
a(2*n) = A016754(n), a(2*n+1) = A053755(n+1).
E.g.f.: exp(x)*(2 + 3*x + x^2) - cosh(x). The sequence 1,1,5,9,... is given by n^2+(1+(-1)^n)/2 with e.g.f. exp(1+x+x^2)*exp(x)-sinh(x). - Paul Barry, Sep 02 2003 and Sep 19 2003
a(0)=1, a(1)=5, a(2)=9, a(3)=17, a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4). - Harvey P. Dale, Jan 29 2012
a(n)+(-1)^n = A137928(n+1). - Philippe Deléham, Feb 17 2012
G.f.: (1 + 3*x - x^2 + x^3)/((1-x)^3*(1+x)). - Colin Barker, Mar 18 2012
a(n) = A000035(n) + A000290(n+1). - Wesley Ivan Hurt, Oct 10 2013
From Bob Selcoe, Feb 12 2015: (Start)
a(n) = A137932(n+2) + 1.
a(n) = (n+1)^2 when n is even; a(n) = (n+1)^2 + 1 when n is odd.
a(n) = A002378(n+2) - A047238(n+3) + 1.
(End)
Sum_{n>=0} 1/a(n) = Pi*coth(Pi/2)/4 + Pi^2/8 - 1/2. - Amiram Eldar, Jul 07 2022

A137932 Terms in an n X n spiral that do not lie on its principal diagonals.

Original entry on oeis.org

0, 0, 0, 4, 8, 16, 24, 36, 48, 64, 80, 100, 120, 144, 168, 196, 224, 256, 288, 324, 360, 400, 440, 484, 528, 576, 624, 676, 728, 784, 840, 900, 960, 1024, 1088, 1156, 1224, 1296, 1368, 1444, 1520, 1600, 1680, 1764, 1848, 1936, 2024, 2116, 2208, 2304, 2400, 2500, 2600, 2704, 2808
Offset: 0

Views

Author

William A. Tedeschi, Feb 29 2008

Keywords

Comments

The count of terms not on the principal diagonals is always even.
The last digit is the repeating pattern 0,0,0,4,8,6,4,6,8,4, which is palindromic if the leading 0's are removed, 4864684.
The sum of the last digits is 40, which is the count of the pattern times 4.
A 4 X 4 spiral is the only spiral, aside from a 0 X 0, whose count of terms that do not lie on its principal diagonals equal the count of terms that do [A137932(4) = A042948(4)] making the 4 X 4 the "perfect spiral".
Yet another property is mod(a(n), A042948(n)) = 0 iff n is even. This is a large family that includes the 4 X 4 spiral.
a(n) is the maximum number of queens of one color that can coexist without attacking one queen of the opponent's color on an [n+1] X [n+1] chessboard, when the lone queen is in the most vulnerable position on the board, i.e., on a center square. - Bob Selcoe, Feb 12 2015
Also the circumference of the (n-1) X (n-1) grid graph for n > 2. - Eric W. Weisstein, Mar 25 2018
Also the crossing number of the complete bipartite graph K_{5,n}. - Eric W. Weisstein, Sep 11 2018

Examples

			a(0) = 0^2 - (2(0) - mod(0,2)) = 0.
a(3) = 3^2 - (2(3) - mod(3,2)) = 4.
		

Crossrefs

Cf. A042948.
Sequences on the four axes of the square spiral: Starting at 0: A001107, A033991, A007742, A033954; starting at 1: A054552, A054556, A054567, A033951.
Sequences on the four diagonals of the square spiral: Starting at 0: A002939 = 2*A000384, A016742 = 4*A000290, A002943 = 2*A014105, A033996 = 8*A000217; starting at 1: A054554, A053755, A054569, A016754.
Sequences obtained by reading alternate terms on the X and Y axes and the two main diagonals of the square spiral: Starting at 0: A035608, A156859, A002378 = 2*A000217, A137932 = 4*A002620; starting at 1: A317186, A267682, A002061, A080335.

Programs

Formula

a(n) = n^2 - (2*n - mod(n,2)) = n^2 - A042948(n).
a(n) = 2*A007590(n-1). - Enrique Pérez Herrero, Jul 04 2012
G.f.: -4*x^3 / ( (1+x)*(x-1)^3 ). a(n) = 4*A002620(n-1). - R. J. Mathar, Jul 06 2012
From Bob Selcoe, Feb 12 2015: (Start)
a(n) = (n-1)^2 when n is odd; a(n) = (n-1)^2 - 1 when n is even.
a(n) = A002378(n) - A047238(n+1). (End)
From Amiram Eldar, Mar 20 2022: (Start)
Sum_{n>=3} 1/a(n) = Pi^2/24 + 1/4.
Sum_{n>=3} (-1)^(n+1)/a(n) = Pi^2/24 - 1/4. (End)
E.g.f.: x*(x - 1)*cosh(x) + (x^2 - x + 1)*sinh(x). - Stefano Spezia, Oct 17 2022

A156859 The main column of a version of the square spiral.

Original entry on oeis.org

0, 3, 7, 14, 22, 33, 45, 60, 76, 95, 115, 138, 162, 189, 217, 248, 280, 315, 351, 390, 430, 473, 517, 564, 612, 663, 715, 770, 826, 885, 945, 1008, 1072, 1139, 1207, 1278, 1350, 1425, 1501, 1580, 1660, 1743, 1827, 1914, 2002, 2093, 2185, 2280, 2376, 2475, 2575
Offset: 0

Views

Author

Emilio Apricena (emilioapricena(AT)yahoo.it), Feb 17 2009

Keywords

Comments

This spiral is sometimes called an Ulam spiral, but square spiral is a better name. - N. J. A. Sloane, Jul 27 2018
It is easy to see that the only two primes in the sequence are 3, 7. Therefore the primes of the version of Ulam spiral are divided into four parts (see also A035608): northeast (NE), northwest (NW), southwest (SW), and southeast (SE).
Number of pairs (x,y) having x and y of opposite parity with x in {0,...,n} and y in {0,...,2n}. - Clark Kimberling, Jul 02 2012
Partial Sums of A014601(n). - Wesley Ivan Hurt, Oct 11 2013

Crossrefs

Cf. A000290, A000384, A004526, A014601 (first differences), A115258.
Sequences on the four axes of the square spiral: Starting at 0: A001107, A033991, A007742, A033954; starting at 1: A054552, A054556, A054567, A033951.
Sequences on the four diagonals of the square spiral: Starting at 0: A002939 = 2*A000384, A016742 = 4*A000290, A002943 = 2*A014105, A033996 = 8*A000217; starting at 1: A054554, A053755, A054569, A016754.
Sequences obtained by reading alternate terms on the X and Y axes and the two main diagonals of the square spiral: Starting at 0: A035608, A156859, A002378 = 2*A000217, A137932 = 4*A002620; starting at 1: A317186, A267682, A002061, A080335.

Programs

Formula

a(n) = n^2 + n + floor((n+1)/2) = A002378(n) + A004526(n+1) = A002620(n+1) + 3*A002620(n).
From R. J. Mathar, Feb 20 2009: (Start)
G.f.: x*(3+x)/((1+x)*(1-x)^3).
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4). (End)
a(n-1) = floor(n/(e^(1/n)-1)). - Richard R. Forberg, Jun 19 2013
a(n) = A000290(n+1) + A004526(-n-1). - Wesley Ivan Hurt, Jul 15 2013
a(n) + a(n+1) = A014105(n+1). - R. J. Mathar, Jul 15 2013
a(n) = floor(A000384(n+1)/2). - Bruno Berselli, Nov 11 2013
E.g.f.: (x*(5 + 2*x)*cosh(x) + (1 + 5*x + 2*x^2)*sinh(x))/2. - Stefano Spezia, Apr 24 2024
Sum_{n>=1} 1/a(n) = 4/9 + 2*log(2) - Pi/3. - Amiram Eldar, Apr 26 2024

Extensions

More terms added by Wesley Ivan Hurt, Oct 11 2013

A267682 a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4) for n > 3, with initial terms 1, 1, 4, 8.

Original entry on oeis.org

1, 1, 4, 8, 15, 23, 34, 46, 61, 77, 96, 116, 139, 163, 190, 218, 249, 281, 316, 352, 391, 431, 474, 518, 565, 613, 664, 716, 771, 827, 886, 946, 1009, 1073, 1140, 1208, 1279, 1351, 1426, 1502, 1581, 1661, 1744, 1828, 1915, 2003, 2094, 2186, 2281, 2377, 2476
Offset: 0

Views

Author

Robert Price, Jan 19 2016

Keywords

Comments

Also, total number of ON (black) cells after n iterations of the "Rule 201" elementary cellular automaton starting with a single ON (black) cell.

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.

Crossrefs

Cf. A267679.
Sequences on the four axes of the square spiral: Starting at 0: A001107, A033991, A007742, A033954; starting at 1: A054552, A054556, A054567, A033951.
Sequences on the four diagonals of the square spiral: Starting at 0: A002939 = 2*A000384, A016742 = 4*A000290, A002943 = 2*A014105, A033996 = 8*A000217; starting at 1: A054554, A053755, A054569, A016754.
Sequences obtained by reading alternate terms on the X and Y axes and the two main diagonals of the square spiral: Starting at 0: A035608, A156859, A002378 = 2*A000217, A137932 = 4*A002620; starting at 1: A317186, A267682, A002061, A080335.

Programs

  • Mathematica
    rule=201; rows=20; ca=CellularAutomaton[rule,{{1},0},rows-1,{All,All}]; (* Start with single black cell *) catri=Table[Take[ca[[k]],{rows-k+1,rows+k-1}],{k,1,rows}]; (* Truncated list of each row *) nbc=Table[Total[catri[[k]]],{k,1,rows}]; (* Number of Black cells in stage n *) Table[Total[Take[nbc,k]],{k,1,rows}] (* Number of Black cells through stage n *)
    LinearRecurrence[{2, 0, -2, 1}, {1, 1, 4, 8}, 60] (* Vincenzo Librandi, Jan 19 2016 *)
  • PARI
    Vec((1-x+2*x^2+2*x^3)/((1-x)^3*(1+x)) + O(x^100)) \\ Colin Barker, Jan 19 2016
    
  • Python
    print([n*(n-1)+n//2+1 for n in range(51)]) # Karl V. Keller, Jr., Jul 14 2021

Formula

G.f.: (1 - x + 2*x^2 + 2*x^3) / ((1-x)^3*(1+x)). - Colin Barker, Jan 19 2016
a(n) = n*(n-1) + floor(n/2) + 1. - Karl V. Keller, Jr., Jul 14 2021
E.g.f.: (exp(x)*(2 + x + 2*x^2) - sinh(x))/2. - Stefano Spezia, Jul 16 2021

Extensions

Edited by N. J. A. Sloane, Jul 25 2018, replacing definition with simpler formula provided by Colin Barker, Jan 19 2016.

A346864 Irregular triangle read by rows in which row n lists the row A014105(n) of A237591, n >= 1.

Original entry on oeis.org

2, 1, 6, 2, 1, 1, 11, 4, 3, 1, 1, 1, 19, 6, 4, 2, 2, 1, 1, 1, 28, 10, 5, 3, 3, 2, 1, 1, 1, 1, 40, 13, 7, 5, 3, 2, 2, 2, 1, 1, 1, 1, 53, 18, 10, 5, 4, 3, 3, 2, 1, 2, 1, 1, 1, 1, 69, 23, 12, 7, 5, 4, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 86, 29, 15, 9, 6, 5, 4, 2, 3, 2, 2, 1, 2, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Omar E. Pol, Aug 17 2021

Keywords

Comments

The characteristic shape of the symmetric representation of sigma(A014105(n)) consists in that in the main diagonal of the diagram the smallest Dyck path has a peak and the largest Dyck path has a valley.
So knowing this characteristic shape we can know if a number is a second hexagonal number (or not) just by looking at the diagram, even ignoring the concept of second hexagonal number.
Therefore we can see a geometric pattern of the distribution of the second hexagonal numbers in the stepped pyramid described in A245092.
T(n,k) is also the length of the k-th line segment of the largest Dyck path of the symmetric representation of sigma(A014105(n)), from the border to the center, hence the sum of the n-th row of triangle is equal to A014105(n).
T(n,k) is also the difference between the total number of partitions of all positive integers <= n-th second hexagonal number into exactly k consecutive parts, and the total number of partitions of all positive integers <= n-th second hexagonal number into exactly k + 1 consecutive parts.
1 together with the first column gives A317186. - Michel Marcus, Jan 12 2025

Examples

			Triangle begins:
   2,  1;
   6,  2,  1, 1;
  11,  4,  3, 1, 1, 1;
  19,  6,  4, 2, 2, 1, 1, 1;
  28, 10,  5, 3, 3, 2, 1, 1, 1, 1;
  40, 13,  7, 5, 3, 2, 2, 2, 1, 1, 1, 1;
  53, 18, 10, 5, 4, 3, 3, 2, 1, 2, 1, 1, 1, 1;
  69, 23, 12, 7, 5, 4, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1;
  86, 29, 15, 9, 6, 5, 4, 2, 3, 2, 2, 1, 2, 1, 1, 1, 1, 1;
...
Illustration of initial terms:
Column h gives the n-th second hexagonal number (A014105).
Column S gives the sum of the divisors of the second hexagonal numbers which equals the area (and the number of cells) of the associated diagram.
--------------------------------------------------------------------------------------
  n   h   S   Diagram
--------------------------------------------------------------------------------------
                  _             _                     _                             _
                 | |           | |                   | |                           | |
              _ _|_|           | |                   | |                           | |
  1   3   4  |_ _|1            | |                   | |                           | |
               2               | |                   | |                           | |
                            _ _| |                   | |                           | |
                           |  _ _|                   | |                           | |
                        _ _|_|                       | |                           | |
                       |  _|1                        | |                           | |
              _ _ _ _ _| | 1                         | |                           | |
  2  10  18  |_ _ _ _ _ _|2                          | |                           | |
                   6                          _ _ _ _|_|                           | |
                                             | |                                   | |
                                            _| |                                   | |
                                           |  _|                                   | |
                                        _ _|_|                                     | |
                                    _ _|  _|1                                      | |
                                   |_ _ _|1 1                                      | |
                                   |  3                               _ _ _ _ _ _ _| |
                                   |4                                |    _ _ _ _ _ _|
              _ _ _ _ _ _ _ _ _ _ _|                                 |   |
  3  21  32  |_ _ _ _ _ _ _ _ _ _ _|                              _ _|   |
                       11                                        |       |
                                                                _|    _ _|
                                                               |     |
                                                            _ _|    _|
                                                        _ _|      _|
                                                       |        _|1
                                                  _ _ _|    _ _|1 1
                                                 |         | 2
                                                 |  _ _ _ _|2
                                                 | |   4
                                                 | |
                                                 | |6
                                                 | |
              _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| |
  4  36  91  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|
                               19
.
		

Crossrefs

Row sums give A014105, n >= 1.
Row lengths give A005843.
For the characteristic shape of sigma(A000040(n)) see A346871.
For the characteristic shape of sigma(A000079(n)) see A346872.
For the characteristic shape of sigma(A000217(n)) see A346873.
For the visualization of Mersenne numbers A000225 see A346874.
For the characteristic shape of sigma(A000384(n)) see A346875.
For the characteristic shape of sigma(A000396(n)) see A346876.
For the characteristic shape of sigma(A008588(n)) see A224613.
For the characteristic shape of sigma(A174973(n)) see A317305.

Programs

  • PARI
    row(n) = my(m=n*(2*n + 1)); vector((sqrtint(8*m+1)-1)\2, k, ceil((m+1)/k - (k+1)/2) - ceil((m+1)/(k+1) - (k+2)/2)); \\ Michel Marcus, Jan 12 2025

A357745 Numbers on the 8 main spokes of a square spiral with 1 in the center.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 15, 17, 19, 21, 23, 25, 28, 31, 34, 37, 40, 43, 46, 49, 53, 57, 61, 65, 69, 73, 77, 81, 86, 91, 96, 101, 106, 111, 116, 121, 127, 133, 139, 145, 151, 157, 163, 169, 176, 183, 190, 197, 204, 211, 218, 225, 233, 241, 249, 257, 265, 273
Offset: 1

Views

Author

Karl-Heinz Hofmann, Dec 22 2022

Keywords

Comments

The 8 main spokes are (with 1 in the center, 2 to the east, 3 to the northeast): east: A054552; northeast: A054554; north: A054556; northwest: A053755; west: A054567; southwest: A054569; south: A033951; southeast: A016754.
Alternatively the 8 main spokes are pairwise part of the 4 main axes: horizontal: A317186; vertical: A267682; diagonal: A002061; antidiagonal: A080335.
And lastly the 4 main axes are giving two main crosses: Horizontal-vertical cross: A039823; Diagonal-antidiagonal cross: A200975.

Examples

			See visualization in links.
		

Crossrefs

Programs

  • Mathematica
    Rest@ CoefficientList[Series[x (1 - x^8 + x^9)/((1 - x)^3*(1 + x) (1 + x^2) (1 + x^4)), {x, 0, 63}], x] (* Michael De Vlieger, Dec 29 2022 *)
    a[n_] := BitShiftRight[(n + 3)^2, 4] + Boole[BitAnd[n, 7] != 1]; Array[a, 65] (* Amiram Eldar, Dec 30 2022, after the PARI code *)
    LinearRecurrence[{2,-1,0,0,0,0,0,1,-2,1},{1,2,3,4,5,6,7,8,9,11},70] (* Harvey P. Dale, Jul 13 2025 *)
  • PARI
    a(n) = sqr(n+3)>>4 + (bitand(n,7)!=1); \\ Kevin Ryde, Dec 30 2022
  • Python
    def A357745(n): return ((n+3)**2 >> 4) + 1 if n % 8 != 1 else (n+3)**2 >> 4
    

Formula

G.f.: x*(1-x^8+x^9)/((1-x)^3*(1+x)*(1+x^2)*(1+x^4)). - Joerg Arndt, Dec 29 2022
a(n) = floor((n+3)^2 / 16) + (1 if n != 1 mod 8). - Kevin Ryde, Dec 30 2022

A317187 Arrange primes along the square spiral; sequence lists primes on the X-axis.

Original entry on oeis.org

2, 3, 13, 31, 67, 107, 173, 241, 347, 443, 577, 709, 877, 1049, 1249, 1471, 1697, 1973, 2243, 2539, 2833, 3191, 3541, 3911, 4289, 4729, 5179, 5651, 6131, 6637, 7159, 7699, 8293, 8867, 9473, 10133, 10799, 11503, 12251, 12941, 13709, 14537, 15289
Offset: 1

Views

Author

N. J. A. Sloane, Jul 27 2018

Keywords

Comments

This is based on the square spiral with entries starting at 1 (see A317186, Examples).

References

  • David James Sycamore, Posting to Sequence Fans Mailing List, Jul 24 2018

Crossrefs

Cf. A317186.

Formula

a(n) = prime(A317186(n)).

A381703 Irregular triangle read by rows in which every row of length A071764(n) lists A(n,w,h) = the number of free polyominoes of size n, width w and height h (for w <= h, and all possible w,h pairs).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 3, 1, 2, 3, 6, 1, 1, 6, 5, 7, 15, 1, 2, 11, 5, 7, 39, 25, 18, 1, 1, 10, 19, 7, 3, 59, 96, 35, 77, 61, 1, 3, 22, 28, 7, 1, 42, 210, 188, 49, 181, 383, 97, 73, 1, 1, 15, 52, 40, 9, 21, 255, 550, 332, 63, 266, 1304, 822, 155, 529, 240, 1, 3, 45, 90, 53, 9, 4, 212, 954, 1231, 529, 81, 251, 2847, 3548, 1551, 220, 2413, 2366, 410, 255
Offset: 1

Views

Author

John Mason, Mar 04 2025

Keywords

Examples

			Triangle begins:
   n
   1:  1
   2:  1
   3:  1  1
   4:  1  1   3
   5:  1  2   3   6
   6:  1  1   6   5   7  15
   7:  1  2  11   5   7  39  25   18
   8:  1  1  10  19   7   3  59   96   35   77   61
   9:  1  3  22  28   7   1  42  210  188   49  181  383    97   73
  10:  1  1  15  52  40   9  21  255  550  332   63  266  1304  822  155  529  240
  ...
Any row contains an irregular array that shows the number of polyominoes having width w and height h. E.g., row 6 contains the array:
  h/w 1  2  3
  1
  2
  3      1  7
  4      6 15
  5      5
  6   1
.
There are 5 polyominoes of size 6 with width 2 and height 5, so A(6,2,5)=5:
.
  OO O  O  O  O
  O  OO O  O  O
  O  O  OO O  OO
  O  O  O  OO  O
  O  O  O   O  O
		

Crossrefs

Row sums give A000105.
Row lengths give A071764.

Extensions

More terms from John Mason, Mar 07 2025

A309573 a(n) is the sum of lattice points enumerated by the square number spiral falling on the circumference of circles centered at the origin of radii n.

Original entry on oeis.org

0, 16, 64, 144, 256, 912, 576, 784, 1024, 1296, 3648, 1936, 2304, 7312, 3136, 8208, 4096, 11824, 5184, 5776, 14592, 7056, 7744, 8464, 9216, 41232, 29248, 11664, 12544, 27568, 32832, 15376, 16384, 17424, 47296, 44688, 20736, 61104, 23104, 65808, 58368, 78096, 28224, 29584, 30976, 73872
Offset: 0

Views

Author

Torlach Rush, Aug 08 2019

Keywords

Comments

For this sequence the square spiral begins with 0 and is the second illustration in the comments of A317186, where 0 is the origin of our circles.
a(n) >= A001107(n) + A033991(n) + A007742(n) + A033954(n).
a(n) = A016802(n) iff A046109(n) = 4.
a(n) = A016802(n) iff n <> k * A002144(m), k,m >= 1.
a(n) is congruent to 0 mod 16 and is the sum of one or more terms of A016802.
Conjecture: a(n) is a term of A277699 iff a(n)/16 = A277699(n).

Examples

			16 is a term because 16 = 16*(1)^2.
912 is a term because 912 = 16*(5)^2 + (2*(16*(4)^2)).
41232 is a term because 41232 = 16*(25)^2 + (2*((16*(24)^2) + (16*(20)^2))).
		

Crossrefs

Programs

  • PARI
    Tb(n) = {return(16 * n * n)}
    llsum(n) = {my(x=0); for (i = 1, n - 2, for (ii = i+1, n - 1, if(n*n == (ii*ii) + (i*i), x+=(2 * Tb(ii))))); return(x)}
    Tx(n) = {my(x=0); forprimestep(x = 5, n, 4, if(n%x==0, return(llsum(n))))}
    Tn(n) = {for (i = 0, n, print1(Tb(i) + Tx(i), ", "))}
    Tn(45)

A317612 For k >= 1, fill a k X k square with the numbers 1 to k^2 by rows left to right and top to bottom; then read the square by a square clockwise spiral beginning at the top left and spiraling inwards.

Original entry on oeis.org

1, 1, 2, 4, 3, 1, 2, 3, 6, 9, 8, 7, 4, 5, 1, 2, 3, 4, 8, 12, 16, 15, 14, 13, 9, 5, 6, 7, 11, 10, 1, 2, 3, 4, 5, 10, 15, 20, 25, 24, 23, 22, 21, 16, 11, 6, 7, 8, 9, 14, 19, 18, 17, 12, 13, 1, 2, 3, 4, 5, 6, 12, 18, 24, 30, 36, 35, 34, 33, 32, 31, 25, 19, 13, 7, 8, 9, 10, 11, 17, 23, 29, 28, 27, 26, 20, 14, 15, 16, 22, 21, 1, 2, 3, 4, 5, 6, 7, 14, 21, 28, 35, 42, 49, 48, 47, 46, 45, 44, 43
Offset: 1

Views

Author

George E. Laham II and Robert G. Wilson v, Aug 01 2018

Keywords

Comments

Inspired by A317186.
The final term in the k X k spiral is A031878(k+1).

Examples

			  1 => 1;
.
  1---2
      |
  3---4  =>  1, 2, 4, 3;
.
  1---2---3
          |
  4---5   6
  |       |
  7---8---9  =>  1, 2, 3, 6, 9, 8, 7, 4, 5;
.
   1---2---3---4
               |
   5---6---7   8
   |       |   |
   9  10--11  12
   |           |
  13--14--15--16
.
  => 1, 2, 3, 4, 8, 12, 16, 15, 14, 13, 9, 5, 6, 7, 11, 10;
.
   1---2---3---4---5
                   |
   6---7---8---9  10
   |           |   |
  11  12--13  14  15
   |   |       |   |
  16  17--18--19  20
   |               |
  21--22--23--24--25
.
  => 1, 2, 3, 4, 5, 10, 15, 20, 25, 24, 23, 22, 21, 16, 11, 6, 7, 8, 9, 14, 19, 18, 17, 12, 13;
.
   1---2---3---4---5---6
                       |
   7---8---9--10--11  12
   |               |   |
  13  14--15--16  17  18
   |   |       |   |   |
  19  20  21--22  23  24
   |   |           |   |
  25  26--27--28--29  30
   |                   |
  31--32--33--34--35--36
.
  => 1, 2, 3, 4, 5, 6, 12, 18, 24, 30, 36, 35, 34, 33, 32, 31, 25, 19, 13, 7, 8, 9, 10, 11, 17, 23, 29, 28, 27, 26, 20, 14, 15, 16, 22, 21;
		

Crossrefs

Programs

  • Mathematica
    (* To form an n X n square table which begins left to right, then top to bottom *) a[i_, j_, n_] := j + n*(i - 1); f[n_] := Table[ a[i, j, n], {i, n}, {j, n}]
Previous Showing 21-30 of 30 results.