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.

A085046 a(n) = n^2 - (1 + (-1)^n)/2.

Original entry on oeis.org

1, 3, 9, 15, 25, 35, 49, 63, 81, 99, 121, 143, 169, 195, 225, 255, 289, 323, 361, 399, 441, 483, 529, 575, 625, 675, 729, 783, 841, 899, 961, 1023, 1089, 1155, 1225, 1295, 1369, 1443, 1521, 1599, 1681, 1763, 1849, 1935, 2025, 2115, 2209, 2303, 2401, 2499, 2601
Offset: 1

Views

Author

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 20 2003

Keywords

Comments

Sequence pattern looks like this 1*1, 1*3, 3*3, 3*5, 5*5, 5*7, 7*7, 7*9, 9*9, 9*11, 11*11, ... = A109613(n-1)*A109613(n).
a(n+1) is the determinant of the n X n matrix M_(i, i)=3, M_(i, j)=2 if (i+j) is even, M_(i, j)=0 if (i+j) is odd. - Benoit Cloitre, Aug 06 2003
a(n) is also the longest path, in number of cells, between diagonally opposite corners of an n X n matrix if diagonal movement between adjacent cells is not allowed and no cell is used more than once. - Ray G. Opao, Jul 02 2007
(-1)^n*a(n) appears to be the Hankel transform of A141222. - Paul Barry, Jun 14 2008
Take an n X n square grid and add unit squares along each side except for the corners --> do this repeatedly along each side with the same restriction until no squares can be added. 4*a(n) is the total number of unit edges in each figure (see example and cf. A255840, A255876). - Wesley Ivan Hurt, Mar 09 2015

Examples

			4*a(n) is the number of unit edges in the pattern below (see comments).
                                                                 _
                                                               _|_|_
                            _              _ _               _|_|_|_|_
                          _|_|_          _|_|_|_           _|_|_|_|_|_|_
              _ _       _|_|_|_|_      _|_|_|_|_|_       _|_|_|_|_|_|_|_|_
    _        |_|_|     |_|_|_|_|_|    |_|_|_|_|_|_|     |_|_|_|_|_|_|_|_|_|
   |_|       |_|_|       |_|_|_|      |_|_|_|_|_|_|       |_|_|_|_|_|_|_|
                           |_|          |_|_|_|_|           |_|_|_|_|_|
                                          |_|_|               |_|_|_|
                                                                |_|
   n=1        n=2          n=3             n=4                  n=5
- _Wesley Ivan Hurt_, Mar 09 2015
		

Crossrefs

Cf. A109613. [Bruno Berselli, Sep 17 2013]

Programs

Formula

a(1) = 1, a(2) = 3, then a(2n) = (a(2n-1)*a(2n+1))^1/2 and a(2n+1) = {a(2n) + a(2n+2)}/2. Even-indexed terms are the geometric mean, and odd-indexed terms are the arithmetic mean, of their neighbors.
a(2n+1) = (2n+1)^2 and a(2n) = 4n^2 - 1.
a(n) = A008811(2n) - 1. - N. J. A. Sloane, Jun 12 2004
From Bruno Berselli, Sep 17 2013: (Start)
G.f.: x*(1 + x + 3*x^2 - x^3)/((1+x)*(1-x)^3).
a(n) = n^2 - (1 + (-1)^n)/2. (End)
a(1)=1, a(2)=3, a(3)=9, a(4)=15, a(n) = 2*a(n-1) + 0*a(n-2) - 2*a(n-3) + a(n-4). - Harvey P. Dale, Oct 25 2015
E.g.f.: 1 - cosh(x) + x*(1 + x)*(cosh(x) + sinh(x)). - Stefano Spezia, May 26 2021
Sum_{n>=1} 1/a(n) = Pi^2/8 + 1/2. - Amiram Eldar, Aug 25 2022

Extensions

More terms from Benoit Cloitre, Aug 06 2003
Formula added in the first comment by Bruno Berselli, Sep 17 2013
Replaced name with Sep 17 2013 formula from Bruno Berselli [Wesley Ivan Hurt, May 17 2020]

A056640 At stage 1, start with a unit square. At each successive stage add 4*(n-1) new squares around outside with edge-to-edge contacts. Sequence gives number of squares (regardless of size) at n-th stage.

Original entry on oeis.org

1, 5, 18, 42, 83, 143, 228, 340, 485, 665, 886, 1150, 1463, 1827, 2248, 2728, 3273, 3885, 4570, 5330, 6171, 7095, 8108, 9212, 10413, 11713, 13118, 14630, 16255, 17995, 19856, 21840, 23953, 26197, 28578, 31098, 33763, 36575, 39540, 42660, 45941, 49385, 52998
Offset: 1

Views

Author

Robert G. Wilson v, Aug 21 2000

Keywords

Comments

Number of unit squares at n-th stage = n^2 + (n-1)^2 (A001844).
First differences are in A255840. - Wesley Ivan Hurt, Mar 13 2015

References

  • Anthony Gardiner, "Mathematical Puzzling," Dover Publications, Inc., Mineola, NY., 1987, page 88.

Crossrefs

Cf. A255840.

Programs

  • Maple
    A056640:=n->(8*n^3-2*n+3-3*(-1)^n)/12: seq(A056640(n), n=1..50);
  • Mathematica
    Table[(8*n^3 - 2*n + 3 - 3*(-1)^n)/12, {n, 30}] (* Wesley Ivan Hurt, Mar 13 2015 *)
  • PARI
    Vec(x*(5*x^2+2*x+1)/((x-1)^4*(x+1)) + O(x^100)) \\ Colin Barker, Sep 29 2014

Formula

G.f.: x(5x^2+2x+1)/((1-x^2)(1-x)^3).
a(n) = (8*n^3-2*n+3-3*(-1)^n)/12. - Luce ETIENNE, Aug 21 2014
a(n) = 3*a(n-1)-2*a(n-2)-2*a(n-3)+3*a(n-4)-a(n-5). - Colin Barker, Sep 29 2014
G.f.: x*(5*x^2+2*x+1) / ((x-1)^4*(x+1)). - Colin Barker, Sep 29 2014

Extensions

More terms from Colin Barker, Sep 29 2014

A255876 a(n) = (4*n^2 + 4*n - 3 - 3*(-1)^n)/2.

Original entry on oeis.org

4, 9, 24, 37, 60, 81, 112, 141, 180, 217, 264, 309, 364, 417, 480, 541, 612, 681, 760, 837, 924, 1009, 1104, 1197, 1300, 1401, 1512, 1621, 1740, 1857, 1984, 2109, 2244, 2377, 2520, 2661, 2812, 2961, 3120, 3277, 3444, 3609, 3784, 3957, 4140, 4321, 4512, 4701
Offset: 1

Views

Author

Wesley Ivan Hurt, Mar 08 2015

Keywords

Comments

Take an n X n square grid and add unit squares along each side except for the corners --> do this repeatedly along each side with the same restriction until no squares can be added. a(n) gives the number of vertices in each figure (see example and cf. A255840).

Examples

			                                                                 _
                                                               _|_|_
                            _              _ _               _|_|_|_|_
                          _|_|_          _|_|_|_           _|_|_|_|_|_|_
              _ _       _|_|_|_|_      _|_|_|_|_|_       _|_|_|_|_|_|_|_|_
    _        |_|_|     |_|_|_|_|_|    |_|_|_|_|_|_|     |_|_|_|_|_|_|_|_|_|
   |_|       |_|_|       |_|_|_|      |_|_|_|_|_|_|       |_|_|_|_|_|_|_|
                           |_|          |_|_|_|_|           |_|_|_|_|_|
                                          |_|_|               |_|_|_|
                                                                |_|
   n=1        n=2          n=3             n=4                  n=5
		

Crossrefs

Cf. A000290 (squares), A085046, A198442, A255840.

Programs

  • Magma
    [(4*n^2 + 4*n - 3 - 3*(-1)^n)/2 : n in [1..50]];
    
  • Maple
    A255876:=n->(4*n^2 + 4*n - 3 - 3*(-1)^n)/2: seq(A255876(n), n=1..50);
  • Mathematica
    CoefficientList[Series[(3 x^3 - 6 x^2 - x - 4)/((x + 1) (x - 1)^3), {x, 0, 50}], x]
    LinearRecurrence[{2,0,-2,1},{4,9,24,37},60] (* Harvey P. Dale, Dec 26 2024 *)
  • PARI
    vector(100,n,(4*n^2 + 4*n - 3 - 3*(-1)^n)/2) \\ Derek Orr, Mar 09 2015

Formula

G.f.: x*(3*x^3 - 6*x^2 - x - 4)/((x + 1)*(x - 1)^3).
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4).
a(n) = A000290(n+1) + 4*A198442(n).

A259486 a(n) = 3*n^2 - 3*n + 1 + 6*floor((n-1)*(n-2)/6).

Original entry on oeis.org

1, 7, 19, 43, 73, 109, 157, 211, 271, 343, 421, 505, 601, 703, 811, 931, 1057, 1189, 1333, 1483, 1639, 1807, 1981, 2161, 2353, 2551, 2755, 2971, 3193, 3421, 3661, 3907, 4159, 4423, 4693, 4969, 5257, 5551, 5851, 6163, 6481, 6805, 7141, 7483, 7831, 8191, 8557
Offset: 1

Views

Author

Wesley Ivan Hurt, Jun 28 2015

Keywords

Comments

Start with the geometric picture for the centered hex numbers (A003215). Here, each hexagonal figure in the sequence is the aggregate of smaller unit hexes (with n hexes along each side). Then, when possible, add additional unit hexes to each side except for the corners --> do this repeatedly with the same restriction until no hexes can be added. a(n) gives the area of each figure (see example).
a(n) == 1 mod 6. - Robert Israel, Jun 29 2015

Examples

			-----------------------------------------------------------------------
Figure 1
-----------------------------------------------------------------------
                                                  __    __    __
                                                 /  \__/  \__/  \
                                                 \_*/  \__/  \*_/
                              __               __/  \__/  \__/  \__
                           __/  \__           /  \__/  \__/  \__/  \
            __          __/  \__/  \__        \__/  \__/  \__/  \__/
         __/  \__      /  \__/  \__/  \     __/  \__/  \__/  \__/  \__
.__     /  \__/  \     \__/  \__/  \__/    / *\__/  \__/  \__/  \__/* \
/  \    \__/  \__/     /  \__/  \__/  \    \__/  \__/  \__/  \__/  \__/
\__/    /  \__/  \     \__/  \__/  \__/       \__/  \__/  \__/  \__/
        \__/  \__/     /  \__/  \__/  \       /  \__/  \__/  \__/  \
           \__/        \__/  \__/  \__/       \__/  \__/  \__/  \__/
                          \__/  \__/             \__/  \__/  \__/
                             \__/                / *\__/  \__/* \
                                                 \__/  \__/  \__/
n=1         n=2               n=3                       n=4
-----------------------------------------------------------------------
Table 1
-----------------------------------------------------------------------
a(1) = 1                              =  1
a(2) = 3  + 2(2)                      =  7
a(3) = 5  + 2(3+4)                    =  19
a(4) = 7  + 2(4+5+6)          + 6(1)  =  43
a(5) = 9  + 2(5+6+7+8)        + 6(2)  =  73
a(6) = 11 + 2(6+7+8+9+10)     + 6(3)  =  109
a(7) = 13 + 2(7+8+9+10+11+12) + 6(5)  =  157
...
		

Crossrefs

Cf. A003215 (hex numbers), A000969, A130518, A255840 (similar, with squares).

Programs

  • Magma
    [3*n^2 - 3*n + 1 + 6*Floor((n-1)*(n-2)/6) : n in [1..100]];
    
  • Magma
    I:=[1,7,19,43,73]; [n le 5 select I[n] else 2*Self(n-1)-Self(n-2)+Self(n-3)-2*Self(n-4)+Self(n-5): n in [1..60]]; // Vincenzo Librandi, Jul 14 2015
  • Maple
    A259486:=n->3*n^2 - 3*n + 1 + 6*floor((n-1)*(n-2)/6): seq(A259486(n), n=1..100);
  • Mathematica
    Table[3 n^2 - 3 n + 1 + 6 Floor[(n - 1) (n - 2)/6], {n, 50}] (* or *)
    CoefficientList[Series[(1 + 5 x + 6 x^2 + 11 x^3 + x^4)/((1 - x)^3 (1 + x + x^2)), {x, 0, 50}], x]
    LinearRecurrence[{2, -1, 1, -2, 1}, {1, 7, 19, 43, 73}, 50]; (* Vincenzo Librandi, Jul 14 2015 *)

Formula

G.f.: (1+5*x+6*x^2+11*x^3+x^4)/((1-x)^3*(1+x+x^2)).
a(n) = 2*a(n-1)-a(n-2)+a(n-3)-2*a(n-4)+a(n-5), n>5.
a(n) = A003215(n+1) + 6*A130518(n+1).
From Robert Israel, Jun 29 2015: (Start)
a(n) = 4*n^2 - 6*n + 1 if 3 divides n, 4*n^2 - 6*n + 3 otherwise.
a(n) = 1 + 6 * A000969(n-2) for n >= 2. (End)
a(n) = 4*n^2 - 6*n + 3^sign(n mod 3). - Wesley Ivan Hurt, Jul 13 2015
Showing 1-4 of 4 results.