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.

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

A081347 First column in maze arrangement of natural numbers.

Original entry on oeis.org

1, 2, 3, 12, 13, 30, 31, 56, 57, 90, 91, 132, 133, 182, 183, 240, 241, 306, 307, 380, 381, 462, 463, 552, 553, 650, 651, 756, 757, 870, 871, 992, 993, 1122, 1123, 1260, 1261, 1406, 1407, 1560, 1561, 1722, 1723, 1892, 1893, 2070, 2071, 2256, 2257, 2450, 2451
Offset: 0

Views

Author

Paul Barry, Mar 19 2003

Keywords

Comments

Interleaves two times the hexagonal numbers A000384 with A054554.

Examples

			Starting with 1,2,3, turn (LL) and then repeat (RRR)(LLL) to get
1 6 7 20
2 5 8 19
3 4 9 18
12 11 10 17
		

Crossrefs

Programs

  • Magma
    [((1+2*n^2)+(1-2*n)*(-1)^n)/2: n in [0..50]]; // Vincenzo Librandi, Aug 08 2013
  • Mathematica
    CoefficientList[Series[(1 + x - x^2 + 7 x^3) / ((1 - x)^3 (1 + x)^2), {x, 0, 50}], x] (* Vincenzo Librandi, Aug 08 2013 *)
    LinearRecurrence[{1,2,-2,-1,1},{1,2,3,12,13},60] (* Harvey P. Dale, Aug 13 2025 *)

Formula

a(n) = ((1+2*n^2)+(1-2*n)*(-1)^n)/2.
a(2n) = A054554(n).
a(2n+1) = 2*A000384(n).
G.f.: (1+x-x^2+7*x^3)/((1-x)^3*(1+x)^2). [Colin Barker, Apr 17 2012]

A093650 Natural numbers arranged in a square maze beginning 1, 2, 3, then moving right, then up, right, down, left, down, right, etc., and read by antidiagonals upwards.

Original entry on oeis.org

1, 2, 6, 3, 5, 7, 12, 4, 8, 20, 13, 11, 9, 19, 21, 30, 14, 10, 18, 22, 42, 31, 29, 15, 17, 23, 41, 43, 56, 32, 28, 16, 24, 40, 44, 72, 57, 55, 33, 27, 25, 39, 45, 71, 73, 90, 58, 54, 34, 26, 38, 46, 70, 74, 110, 91, 89, 59, 53, 35, 37, 47, 69, 75, 109, 111
Offset: 1

Views

Author

Michael Joseph Halm, May 15 2004

Keywords

Examples

			a(3) = 6 because the maze begins 2 under 1, 3 under 2, 4 right of 3, 5 right of 2 and 6 right of 1.
Array begins:
   1   6---7  20 ...
   |   |   |   |
   2   5   8  19 ...
   |   |   |   |
   3---4   9  18 ...
           |   |
  12--11--10  17 ...
   |           |
  13--14--15--16 ...
  ...
		

Crossrefs

Other square mazes: A081344, A081349.

Extensions

More terms from Jinyuan Wang, Jun 15 2022

A226940 a(0)=0; if a(n-1) is odd, a(n) = n + a(n-1), otherwise a(n) = n - a(n-1).

Original entry on oeis.org

0, 1, 3, 6, -2, 7, 13, 20, -12, 21, 31, 42, -30, 43, 57, 72, -56, 73, 91, 110, -90, 111, 133, 156, -132, 157, 183, 210, -182, 211, 241, 272, -240, 273, 307, 342, -306, 343, 381, 420, -380, 421, 463, 506, -462, 507, 553, 600, -552, 601, 651, 702, -650, 703, 757
Offset: 0

Views

Author

Enrico Santilli, Jun 23 2013

Keywords

Crossrefs

Cf. A081348 (second bisection); A002939, A054554, A054569, A068377.

Programs

  • Magma
    [IsZero(n) select 0 else IsOdd(Self(n)) select n+Self(n) else n-Self(n): n in [0..60]]; // Bruno Berselli, Jul 01 2013
    
  • Mathematica
    LinearRecurrence[{0, 0, 0, 3, 0, 0, 0, -3, 0, 0, 0, 1}, {0, 1, 3, 6, -2, 7, 13, 20, -12, 21, 31, 42}, 60] (* Bruno Berselli, Jul 01 2013 *)
  • Maxima
    makelist(coeff(taylor(x*(1+3*x+6*x^2-2*x^3+4*x^4+4*x^5+2*x^6-6*x^7+3*x^8+x^9)/((1-x)^3*(1+x)^3*(1+x^2)^3), x, 0, n), x, n), n, 0, 60); /* Bruno Berselli, Jul 01 2013 */

Formula

G.f.: x*(1 +3*x +6*x^2 -2*x^3 +4*x^4 +4*x^5 +2*x^6 -6*x^7 +3*x^8 +x^9)/((1-x)^3*(1+x)^3*(1+x^2)^3). [Bruno Berselli, Jul 01 2013]
a(n) = 3*a(n-4) -3*a(n-8) +a(n-12). [Bruno Berselli, Jul 01 2013]
a(4n) = -A002939(n), a(4n+1) = A054569(n+1), a(4n+2) = A054554(n+2), a(4n+3) = A068377(n+2). [Bruno Berselli, Jul 02 2013]

Extensions

More terms from Bruno Berselli, Jul 01 2013
Showing 1-4 of 4 results.