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-6 of 6 results.

A374098 a(n) = A112387(n)^2.

Original entry on oeis.org

1, 1, 4, 1, 16, 9, 64, 25, 256, 121, 1024, 441, 4096, 1849, 16384, 7225, 65536, 29241, 262144, 116281, 1048576, 466489, 4194304, 1863225, 16777216, 7458361, 67108864, 29822521, 268435456, 119311929, 1073741824, 477204025, 4294967296, 1908903481, 17179869184
Offset: 0

Views

Author

Paul Curtz, Jun 28 2024

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0, 3, 0, 6, 0, -8}, {1, 1, 4, 1, 16, 9}, 35] (* Amiram Eldar, Jul 01 2024 *)

Formula

a(2*n) = A000302(n); a(2*n+1) = A139818(n+1).
(a(2*n) + a(2*n-1))^2 = A084175(n+1)^2 + 16*A003683(n)^2, for n >= 1. - Thomas Scheuerle, Jun 28 2024
G.f. ( 1+x+x^2-2*x^3-2*x^4 ) / ( (x-1)*(2*x+1)*(2*x-1)*(1+x)*(2*x^2+1) ). - R. J. Mathar, Aug 02 2024

A048573 a(n) = a(n-1) + 2*a(n-2), a(0)=2, a(1)=3.

Original entry on oeis.org

2, 3, 7, 13, 27, 53, 107, 213, 427, 853, 1707, 3413, 6827, 13653, 27307, 54613, 109227, 218453, 436907, 873813, 1747627, 3495253, 6990507, 13981013, 27962027, 55924053, 111848107, 223696213, 447392427, 894784853, 1789569707, 3579139413, 7158278827, 14316557653
Offset: 0

Views

Author

Michael Somos, Jun 17 1999

Keywords

Comments

Number of positive integers requiring exactly n signed bits in the modified non-adjacent form representation. - Ralf Stephan, Aug 02 2003
The n-th entry (n>1) of the sequence is equal to the 1,1-entry of the n-th power of the unnormalized 4 X 4 Haar matrix: [1 1 1 0 / 1 1 -1 0 / 1 1 0 1 / 1 1 0 -1]. - Simone Severini, Oct 27 2004
Pisano period lengths: 1, 1, 6, 2, 2, 6, 6, 2, 18, 2, 10, 6, 12, 6, 6, 2, 8, 18, 18, 2, ... - R. J. Mathar, Aug 10 2012
For n >= 1, a(n) is the number of ways to tile a strip of length n+2 with blue squares and blue and red dominos, with the restriction that the first two tiles must be the same color. - Guanji Chen and Greg Dresden, Jul 15 2024

Examples

			G.f. = 2 + 3*x + 7*x^2 + 13*x^3 + 27*x^4 + 53*x^5 + 107*x^6 + 213*x^7 + 427*x^8 + ...
		

Crossrefs

Programs

  • Magma
    [(5*2^n+(-1)^n)/3: n in [0..35]]; // Vincenzo Librandi, Jul 05 2011
    
  • Mathematica
    LinearRecurrence[{1,2},{2,3},40] (* Harvey P. Dale, Dec 11 2017 *)
  • PARI
    {a(n) = if( n<0, 0, (5*2^n + (-1)^n) / 3)};
    
  • PARI
    {a(n) = if (n<0 ,0, if( n<2, n+2, a(n-1) + 2*a(n-2)))};
    
  • Sage
    [(5*2^n+(-1)^n)/3 for n in range(35)] # G. C. Greubel, Apr 10 2019

Formula

G.f.: (2 + x) / (1 - x - 2*x^2).
a(n) = (5*2^n + (-1)^n) / 3.
a(n) = 2^(n+1) - A001045(n).
a(n) = A084170(n)+1 = abs(A083581(n)-3) = A081254(n+1) - A081254(n) = A084214(n+2)/2.
a(n) = 2*A001045(n+1) + A001045(n) (note that 2 is the limit of A001045(n+1)/A001045(n)). - Paul Barry, Sep 14 2009
Let A be the Hessenberg matrix of order n, defined by: A[1,j]=1, A[i,i]:=-3, A[i,i-1]=-1, and A[i,j]=0 otherwise. Then, for n>=1, a(n-1)=-charpoly(A,-1). - Milan Janjic, Jan 27 2010
Equivalently, with different offset, a(n) = b(n+1) with b(0)=1 and b(n) = Sum_{i=0..n-1} (-1)^i (1 + (-1)^i b(i)). - Olivier Gérard, Jul 30 2012
a(n) = A000975(n-2)*10 + 5 + 2*(-1)^(n-2), a(0)=2, a(1)=3. - Yuchun Ji, Mar 18 2019
a(n+1) = Sum_{i=0..n} a(i) + 1 + (1-(-1)^n)/2, a(0)=2. - Yuchun Ji, Apr 10 2019
a(n) = 2^n + J(n+1) = J(n+2) + J(n+1) - J(n), where J is A001045. - Yuchun Ji, Apr 10 2019
a(n) = A001045(n+2) + A078008(n) = A062510(n+1) - A078008(n+1) = (A001045(n+2) + A062510(n+1))/2 = A014551(n) + 2*A001045(n). - Paul Curtz, Jul 14 2021
From Thomas Scheuerle, Jul 14 2021: (Start)
a(n) = A083322(n) + A024493(n).
a(n) = A127978(n) - A102713(n).
a(n) = A130755(n) - A166249(n).
a(n) = A007679(n) + A139763(n).
a(n) = A168642(n) XOR A007283(n).
a(n) = A290604(n) + A083944(n). (End)
From Paul Curtz, Jul 21 2021: (Start)
a(n) = 5*A001045(n) - A280560(n+1) = abs(A140360(n+1)) - A280560(n+1).
a(n) = 2^n + A001045(n+1) = A001045(n+3) - A000079(n).
a(n) = A001045(n+4) - A340627(n). (End)
a(n) = A001045(n+5) - A005010(n).
a(n+1) + a(n) = a(n+2) - a(n) = 5*2^n. - Michael Somos, Feb 22 2023
a(n) = A135318(2*n) + A135318(2*n+1) = A112387(2*n) + A112387(2*n+1). - Paul Curtz, Jun 26 2024
E.g.f.: (cosh(x) + 5*cosh(2*x) - sinh(x) + 5*sinh(2*x))/3. - Stefano Spezia, May 18 2025

Extensions

Formula of Milan Janjic moved here from wrong sequence by Paul D. Hanna, May 29 2010

A135318 The Kentucky-2 sequence: a(n) = a(n-2) + 2*a(n-4), with a[0..3] = [1, 1, 1, 2].

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 5, 8, 11, 16, 21, 32, 43, 64, 85, 128, 171, 256, 341, 512, 683, 1024, 1365, 2048, 2731, 4096, 5461, 8192, 10923, 16384, 21845, 32768, 43691, 65536, 87381, 131072, 174763, 262144, 349525, 524288, 699051, 1048576, 1398101, 2097152, 2796203
Offset: 0

Views

Author

Paul Curtz, Feb 16 2008

Keywords

Comments

Shifted Jacobsthal recurrence.
From L. Edson Jeffery, Apr 21 2011: (Start)
Let U be the unit-primitive matrix (see [Jeffery])
U=U_(6,2)=
(0 0 1)
(0 2 0)
(2 0 1),
let i in {0,1}, m>=0 an integer and n=2*m+i. Then a(n)=a(2*m+i)=Sum_{j=0..2} (U^m)_(i,j). (End)
a(n) is also the pebbling number of the cycle graph C_{n+1} for n > 1. - Eric W. Weisstein, Jan 07 2021
From Greg Dresden and Ziyi Xie, Aug 25 2023: (Start)
a(n) is the number of ways to tile a zig-zag strip of n cells using squares (of 1 cell) and triangles (of 3 cells). Here is the zig-zag strip corresponding to n=11, with 11 cells:
_ _
_| |_| |_
| |_| |_| |_
|_| |_| |_| |
| |_| |_| |_|
|_| |_| |_|,
and here are the two types of triangles (where one is just a reflection of the other):
_ _
| |_ _| |
| | | |
| _| and |_ |
|_| |_|.
As an example, here is one of the a(11) = 32 ways to tile the zig-zag strip of 11 cells:
_ _
_| |_| |_
| |_| | |_
| |_ | |
| _| |_| _|
|_| |_| |_|. (End)

Examples

			Let i=0 and m=3. Then U^3 = (2,0,3;0,8,0;6,0,5), and the first-row sum (corresponding to i=0) is 2 + 0 + 3 = 5. Hence a(n) = a(2*m+i) = a(2*3+0) = a(6) = 2 + 3 = 5.
		

Crossrefs

Programs

  • Magma
    [(2^Floor(n/2)*(5-(-1)^n)+(-1)^Floor(n/2)*(1+(-1)^n))/6: n in [0..50]]; // Vincenzo Librandi, Aug 10 2011
  • Maple
    a:= n-> (<<0|1>, <2|1>>^(iquo(n, 2, 'm')). <<1, 1+m>>)[1,1]:
    seq(a(n), n=0..50);  # Alois P. Heinz, May 30 2022
  • Mathematica
    LinearRecurrence[{0,1,0,2},{1,1,1,2},40] (* Harvey P. Dale, Oct 14 2015 *)

Formula

From R. J. Mathar, Feb 19 2008: (Start)
O.g.f.: (1/(1+x^2)+(-2-3*x)/(2*x^2-1))/3.
a(2n) = A001045(n+1).
a(2n+1) = A000079(n). (End)
From L. Edson Jeffery, Apr 21 2011: (Start)
G.f.: (1+x+x^3)/((1+x^2)*(1-2*x^2)).
a(n) = (((-i)^(n+1)-i^(n+1))*2*i*sqrt(2)+3*(1+(-1)^(n+1))*2^((n+2)/2)+(1-(-1)^(n+1))*2^((n+5)/2))/(12*sqrt(2)), where i=sqrt(-1). (End)
a(n) = (2^floor(n/2)*(5-(-1)^n)+(-1)^floor(n/2)*(1+(-1)^n))/6 = (A016116(n)*A010711(n)+2*A056594(n))/6. - Bruno Berselli, Apr 21 2011
a(2n) = 2*a(2n-1) - a(2n-2); a(2n+1) = a(2n) + a(2n-2). - Richard R. Forberg, Aug 19 2013
a(n) = A112387(n + (-1)^n). - Alois P. Heinz, Sep 28 2023
E.g.f.: (2*cos(x) + 4*cosh(sqrt(2)*x) + 3*sqrt(2)*sinh(sqrt(2)*x))/6. - Stefano Spezia, Nov 09 2024
a(2*n) + a(2*n+1) = A048573(n) for n >= 0. - Paul Curtz, May 18 2025

Extensions

More terms from R. J. Mathar, Feb 19 2008

A340627 a(n) = (11*2^n - 2*(-1)^n)/3 for n >= 0.

Original entry on oeis.org

3, 8, 14, 30, 58, 118, 234, 470, 938, 1878, 3754, 7510, 15018, 30038, 60074, 120150, 240298, 480598, 961194, 1922390, 3844778, 7689558, 15379114, 30758230, 61516458, 123032918, 246065834, 492131670, 984263338, 1968526678, 3937053354, 7874106710, 15748213418, 31496426838
Offset: 0

Views

Author

Paul Curtz, Apr 25 2021

Keywords

Comments

Based on A112387.
Prepended with 0, 1, its difference table is
0, 1, 1, 2, 1, 4, 3, 8, ... = mix A001045(n), 2^n.
1, 0, 1, -1, 3, -1, 5, -3, ... = mix A001045(n+1), -A001045(n).
-1, 1, -2, 4, -4, 6, -8, 14, ... = mix -2^n, A084214(n+1).
2, -3, 6, -8, 10, -14, 22, -30, ... = mix 2*A001045(n+2), -a(n).

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1, 2}, {3, 8}, 35] (* Amiram Eldar, Apr 25 2021 *)
  • PARI
    a(n) = (11*2^n - 2*(-1)^n)/3 \\ Felix Fröhlich, Apr 25 2021

Formula

a(n) = 2^(n+2) - A078008(n), n>=0.
a(n) = (A062510(n) = 3*A001045(n)) + A001045(n+3), n>=0.
a(0)=3, a(2*n+1) = 2*a(2*n) + 2, a(2*n+2) = 2*a(2*n+1) - 2, n>=0.
a(n) = 4*A052997(n-1) + 2, n>=2. - Hugo Pfoertner, Apr 25 2021
a(n+1) = 11*2^n - a(n) for n>=0.
a(n+3) = 33*2^n - a(n) for n>=0.
a(n+5) = 121*2^n - a(n) for n>=0.
etc.
a(n+2) = a(n) + 11*2^n for n>=0.
a(n+4) = a(n) + 55*2^n for n>=0.
a(n+6) = a(n) + 231*2^n for n>=0.
etc.
G.f.: (3 + 5*x)/(1 - x - 2*x^2). - Stefano Spezia, Apr 26 2021
E.g.f: (11*exp(2*x) - 2*exp(-x))/3. - Jianing Song, Apr 26 2021

Extensions

More terms from Michel Marcus, Apr 25 2021
New name from Jianing Song, Apr 25 2021

A140946 Triangle T(n,k) = (-2)^n*(-1)^k if kA001045(n+1).

Original entry on oeis.org

1, -2, -1, 4, -4, 3, -8, 8, -8, -5, 16, -16, 16, -16, 11, -32, 32, -32, 32, -32, -21, 64, -64, 64, -64, 64, -64, 43, -128, 128, -128, 128, -128, 128, -128, -85, 256, -256, 256, -256, 256, -256, 256, -256, 171, -512, 512, -512, 512, -512, 512, -512, 512, -512, -341, 1024, -1024, 1024, -1024, 1024
Offset: 0

Views

Author

Paul Curtz, Jul 24 2008

Keywords

Comments

The sequence appears if the values b(n+1)-2*b(n) are computed from the (flattened) sequence b(.)=A140944.
Reading the triangle by rows, taking absolute values and removing duplicates we obtain A112387.

Examples

			1;
-2,-1;
4,-4,3;
-8,8,-8,-5;
16,-16,16,-16,11;
-32,32,-32,32,-32,-21;
64,-64,64,-64,64,-64,43;
-128,128,-128,128,-128,128,-128,-85;
		

Crossrefs

Programs

  • Mathematica
    (* A = A140944 *) A[0, 0] = 0; A[1, 0] = A[0, 1] = 1; A[0, k_] := A[0, k] = A[0, k-1] + 2*A[0, k-2]; A[n_, n_] = 0; A[n_, k_] := A[n, k] = A[n-1, k+1] - A[n-1, k];  T[n_, n_] := T[n, n] = A[n+1, 0] - 2*A[n, n]; T[n_, k_] := T[n, k] = A[n, k+1] - 2*A[n, k]; Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 17 2014 *)

Formula

T(n,k) = A140944(n,k+1)-2*A140944(n,k), k
T(n,n) = A140944(n+1,0) -2*A140944(n,n).

Extensions

Edited by R. J. Mathar, Jul 06 2011

A374927 a(n) = A135318(n)^2.

Original entry on oeis.org

1, 1, 1, 4, 9, 16, 25, 64, 121, 256, 441, 1024, 1849, 4096, 7225, 16384, 29241, 65536, 116281, 262144, 466489, 1048576, 1863225, 4194304, 7458361, 16777216, 29822521, 67108864, 119311929, 268435456, 477204025, 1073741824, 1908903481, 4294967296, 7635439161
Offset: 0

Author

Paul Curtz, Jul 24 2024

Keywords

Comments

A374098 terms swapped by pairs.

Crossrefs

Formula

a(2*n) = A139818(n+1).
a(2*n+1) = 4^n = A000302(n).
a(n) = 3*a(n-2) +6*a(n-4) -8*a(n-6).
Showing 1-6 of 6 results.