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.

A173033 Second diagonal under the main diagonal in A172119 written in a square (see comment).

Original entry on oeis.org

1, 4, 12, 28, 60, 124, 252, 508, 1020, 2044, 4092, 8188, 16380, 32764, 65532, 131068, 262140, 524284, 1048572, 2097148, 4194300, 8388604, 16777212, 33554428, 67108860, 134217724, 268435452, 536870908, 1073741820, 2147483644, 4294967292, 8589934588, 17179869180
Offset: 0

Views

Author

Richard Choulet, Feb 07 2010

Keywords

Comments

The Granvik array of A172119 is here written in "square": 1 :: 1 :: 1 :: 1 :: 1 :: 1 :: 1 :: 1 :: 1 :: 1 // 1 :: 2 :: 2 :: 2 :: 2 :: 2 :: 2 :: 2 :: 2 :: 2 // 1 :: 3 :: 4 :: 4 :: 4 :: 4 :: 4 :: 4 :: 4 :: 4 // 1 :: 4 :: 7 :: 8 :: 8 :: 8 :: 8 :: 8 :: 8 :: 8 // 1 :: 5 :: 12 :: 15 :: 16 :: 16 :: 16 :: 16 :: 16 :: 16 // 1 :: 6 :: 20 :: 28 :: 31 :: 32 :: 32 :: 32 :: 32 :: 32 // 1 :: 7 :: 33 :: 52 :: 60 :: 63 :: 64 :: 64 :: 64 :: 64 // 1 :: 8 :: 54 :: 96 :: 116 :: 124 :: 127 :: 128 :: 128 :: 128 // 1 :: 9 :: 88 :: 177 :: 224 :: 244 :: 252 :: 255 :: 256 :: 256 //
For n>0 a(n) is also the number of ways to place n^2 non-attacking kings on a 2n X 2n toroidal chessboard. - Vaclav Kotesovec, Aug 28 2011
The number of n-step self-avoiding walks on a 2D square lattice where no step is to a lattice point closer to the origin than the current point. - Scott R. Shannon, Dec 15 2023

Examples

			a(3) = 2^5 - 4 = 32 - 4 = 28.
		

Crossrefs

Programs

  • Maple
    taylor(4/(1-2*z)-4/(1-z)+1,z=0,31);
  • Mathematica
    CoefficientList[Series[4 / (1 - 2 x) - 4 / (1 - x) + 1, {x, 0, 60}], x] (* Vincenzo Librandi, May 29 2013 *)
  • PARI
    my(x='x+O('x^50)); Vec(4/(1-2*x)-4/(1-x)+1) \\ Altug Alkan, Nov 02 2015
    
  • Sage
    def a(n): return 1 if 0==n else 2**(n+2) - 4 # Torlach Rush, Jan 09 2025

Formula

G.f.: 4/(1-2*x) - 4/(1-x) + 1.
a(n) = 2^(n+2) - 4 for n>=1, a(0)=1.
a(n) = A028399(n+2), n>0. - R. J. Mathar, Feb 21 2010
a(n) = A240951(n+3) - 4. - Omar E. Pol, Feb 17 2015
a(n) = 2*a(n-1) + 4 for n>1. - J. Conrad, Nov 01 2015
a(n) = 3*a(n-1)-2*a(n-2) for n>2. - Colin Barker, Nov 03 2015
E.g.f.: (1 - 2*exp(x))^2. - Stefano Spezia, May 03 2023