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.

A269059 Construct a hollow square of 1's of side n and fill its interior with 0's to create a stack of n binary numbers. Express the sum of the stack in decimal.

Original entry on oeis.org

1, 6, 19, 48, 113, 258, 579, 1284, 2821, 6150, 13319, 28680, 61449, 131082, 278539, 589836, 1245197, 2621454, 5505039, 11534352, 24117265, 50331666, 104857619, 218103828, 452984853, 939524118, 1946157079, 4026531864, 8321499161, 17179869210, 35433480219, 73014444060
Offset: 1

Views

Author

Gil Broussard, Feb 18 2016

Keywords

Examples

			     1   1 1  3    1 1 1  7    1 1 1 1  15
a(1)=1   1 1 +3    1 0 1 +5    1 0 0 1 + 9
         a(2)=6    1 1 1 +7    1 0 0 1 + 9
                    a(3)=19    1 1 1 1 +15
                                   a(4)=48
		

Programs

  • Magma
    [1] cat [2*(2^n-1)+(n-2)*(2^(n-1)+1): n in [2..40]]; // Vincenzo Librandi, Feb 27 2016
    
  • Mathematica
    Join[{1}, LinearRecurrence[{6, -13, 12, -4}, {0, 6, 19, 48}, {2, 32}]] (* Jean-François Alcover, Feb 27 2016 *)
  • PARI
    a(n) = if (n==1, 1, 2*(2^n-1)+(n-2)*(2^(n-1)+1)); \\ Michel Marcus, Mar 24 2016
    
  • PARI
    Vec(x*(1-2*x^2)^2/((1-2*x)^2*(1-x)^2) + O(x^100)) \\ Altug Alkan, Mar 24 2016

Formula

a(n) = 2*(2^n-1)+(n-2)*(2^(n-1)+1), for n>1.
G.f.: x*(1-2*x^2)^2/((1-2*x)^2*(1-x)^2). - Robert Israel, Feb 18 2016