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-10 of 11 results. Next

A140966 a(n) = (5 + (-2)^n)/3.

Original entry on oeis.org

2, 1, 3, -1, 7, -9, 23, -41, 87, -169, 343, -681, 1367, -2729, 5463, -10921, 21847, -43689, 87383, -174761, 349527, -699049, 1398103, -2796201, 5592407, -11184809, 22369623, -44739241, 89478487, -178956969, 357913943, -715827881, 1431655767, -2863311529, 5726623063
Offset: 0

Views

Author

Paul Curtz, Jul 27 2008

Keywords

Comments

Inverse binomial transform of A048573.
This is an example of the case k=-1 of sequences with recurrences a(n) = k*a(n-1) + (k+3)*a(n-2) - (2*k+2)*a(n-3).
The case k=1 is covered, for example, by A097163, A135520, A136326, A136336, or A137208.
Sequences with k=2 are A094554 and A094555.
Sequences with k=3 are A084175, A108924, and A139818.

Crossrefs

Programs

Formula

a(n) = -a(n-1) + 2*a(n-2).
G.f.: (2+3*x)/((1-x)*(1+2*x)).
a(n+1) - a(n) = (-1)^(n+1)*A000079(n).
a(n+3) = (-1)^n*A083582(n).
a(n+1) - 2*a(n) = -a(n+2).
a(n+1) - 3*a(n) = 5*(-1)^(n+1)*A078008(n) = (-1)^(n+1)*A001045(n-1).
a(2n+3) = -A083584(n), a(2n) = A163834(n). - Philippe Deléham, Feb 24 2014
E.g.f.: (5*exp(x) + exp(-2*x))/3. - Stefano Spezia, Jul 27 2024

Extensions

Definition simplified by R. J. Mathar, Sep 11 2009

A246035 Number of odd terms in f^n, where f = (1/x+1+x)*(1/y+1+y).

Original entry on oeis.org

1, 9, 9, 25, 9, 81, 25, 121, 9, 81, 81, 225, 25, 225, 121, 441, 9, 81, 81, 225, 81, 729, 225, 1089, 25, 225, 225, 625, 121, 1089, 441, 1849, 9, 81, 81, 225, 81, 729, 225, 1089, 81, 729, 729, 2025, 225, 2025, 1089, 3969, 25, 225, 225, 625, 225, 2025, 625, 3025, 121, 1089, 1089, 3025, 441, 3969, 1849, 7225, 9, 81, 81, 225, 81, 729, 225
Offset: 0

Views

Author

N. J. A. Sloane, Aug 20 2014

Keywords

Comments

This is the number of ON cells in a certain 2-D CA in which the neighborhood of a cell is defined by f, and in which a cell is ON iff there was an odd number of ON cells in the neighborhood at the previous generation.
This is the odd-rule cellular automaton defined by OddRule 777 (see Ekhad-Sloane-Zeilberger "Odd-Rule Cellular Automata on the Square Grid" link).
Run Length Transform of {A001045(k+2)^2} (or of A139818).
The Run Length Transform of a sequence {S(n), n>=0} is defined to be the sequence {T(n), n>=0} given by T(n) = Product_i S(i), where i runs through the lengths of runs of 1's in the binary expansion of n. E.g. 19 is 10011 in binary, which has two runs of 1's, of lengths 1 and 2. So T(19) = S(1)*S(2). T(0)=1 (the empty product).

Examples

			Here is the neighborhood:
[X, X, X]
[X, X, X]
[X, X, X]
which contains a(1) = 9 ON cells.
.
From Omar E. Pol, Mar 17 2015: (Start)
Apart from the initial 1, the sequence can be written also as an irregular tetrahedron T(s,r,k) = A139818(r+2) * a(k), s>=1, 1<=r<=s, 0<=k<=(A011782(s-r)-1) as shown below:
..
9;
...
9;
25;
..........
9,     81;
25;
121;
....................
9,     81,  81, 225;
25,   225;
121;
441;
........................................
9,     81,  81, 225, 81, 729, 225, 1089;
25,   225, 225, 625;
121, 1089;
441;
1849;
...
Note that every row r is equal to A139818(r+2) times the beginning of the sequence itself, thus in 3D every column contains the same number: T(s,r,k) = T(s+1,r,k).
(End)
		

Crossrefs

Other CA's that use the same rule but with different cell neighborhoods: A160239, A102376, A071053, A072272, A001316, A246034.

Programs

  • Maple
    C:=f->subs({x=1, y=1}, f);
    # Find number of ON cells in CA for generations 0 thru M defined by rule
    # that cell is ON iff number of ON cells in nbd at time n-1 was odd
    # where nbd is defined by a polynomial or Laurent series f(x, y).
    OddCA:=proc(f, M) global C; local n, a, i, f2, p;
    f2:=simplify(expand(f)) mod 2;
    a:=[]; p:=1;
    for n from 0 to M do a:=[op(a), C(p)]; p:=expand(p*f2) mod 2; od:
    lprint([seq(a[i], i=1..nops(a))]);
    end;
    f:=(1/x+1+x)*(1/y+1+y);
    OddCA(f, 70);
  • Mathematica
    b[0] = 1; b[n_] := b[n] = Expand[b[n - 1]*(x^2 + x + 1)];
    a[n_] := Count[CoefficientList[b[n], x], _?OddQ]^2;
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Apr 30 2017 *)

Formula

a(n) = A071053(n)^2.

A206472 T(n,k)=Number of (n+1)X(k+1) 0..2 arrays with every 2X2 subblock having zero permanent.

Original entry on oeis.org

25, 121, 121, 441, 1411, 441, 1849, 11025, 11025, 1849, 7225, 106891, 110889, 106891, 7225, 29241, 958441, 1896129, 1896129, 958441, 29241, 116281, 8963667, 23707161, 68352739, 23707161, 8963667, 116281, 466489, 82609921, 356190129, 1693734025
Offset: 1

Views

Author

R. H. Hardin Feb 08 2012

Keywords

Comments

Table starts
.....25.......121.........441...........1849.............7225
....121......1411.......11025.........106891...........958441
....441.....11025......110889........1896129.........23707161
...1849....106891.....1896129.......68352739.......1693734025
...7225....958441....23707161.....1693734025......61244865529
..29241...8963667...356190129....52552339515....3420616959081
.116281..82609921..4803737481..1457044540561..144660587865049
.466489.767387611.69030731169.43214597865811.7310031634630729

Examples

			Some solutions for n=4 k=3
..0..2..0..2....0..0..0..1....2..0..1..2....2..2..0..0....1..2..0..0
..0..1..0..0....1..0..0..1....1..0..0..0....0..0..0..1....0..0..0..2
..0..2..0..1....0..0..0..0....1..0..2..0....2..0..0..0....1..0..0..0
..0..0..0..0....1..2..0..1....1..0..0..0....2..0..0..1....0..0..1..0
..0..2..2..2....0..0..0..1....0..0..2..1....2..0..0..2....1..0..2..0
		

Crossrefs

Column 1 is A139818(n+3)

A328284 An extension of the Jacobsthal numbers: 0, 0, 1, followed by A001045.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 3, 5, 11, 21, 43, 85, 171, 341, 683, 1365, 2731, 5461, 10923, 21845, 43691, 87381, 174763, 349525, 699051, 1398101, 2796203, 5592405, 11184811, 22369621, 44739243, 89478485
Offset: 0

Views

Author

Paul Curtz, Oct 11 2019

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := If[n>3, (2^(n-3) + (-1)^n)/3, If[n == 2, 1, 0]]; (* Jean-François Alcover, Oct 16 2019 *)

Formula

a(n) is the fourth row of the following array:
0, 0, 0, 0, 0, 1, 3, 7, 14, 27, 51, 97, ...
0, 0, 0, 0, 1, 2, 4, 7, 13, 24, 46, 89, ... = A086445
0, 0, 0, 1, 1, 2, 3, 6, 11, 22, 43, 86, ... = 0, 0, 0, A005578(n)
0, 0, 1, 0, 1, 1, 3, 5, 11, 21, 43, 85, ... = a(n)
0, 1, -1, 1, 0, 2, 2, 6, 10, 22, 42, 86, ...
1, -2, 2, -1, 2, 0, 4, 4, 12, 20, 44, 84, ...
From the main diagonal onward, every row is an autosequence of the first kind.
From Stefano Spezia, Oct 16 2019: (Start)
O.g.f.: x^2*(-1 + x + x^2)/(-1 + x + 2*x^2).
E.g.f.: (1/24)*exp(-x)*(8 - 9*exp(x) + exp(3*x) + 6*exp(x)*x + 6*exp(x)*x^2).
a(n) = a(n-1) + 2*a(n-2) for n > 4. (End)
a(n) = Sum_{k=0..n-1} A183190(n-k-2, n-2*k-2). - Jean-François Alcover, Nov 10 2019

Extensions

Partially edited by Peter Luschny, Nov 12 2019

A328824 Numerators of A113405(-n) (see the comment for details).

Original entry on oeis.org

0, 1, 1, 1, -7, -7, -7, 57, 57, 57, -455, -455, -455, 3641, 3641, 3641, -29127, -29127, -29127, 233017, 233017, 233017, -1864135, -1864135, -1864135, 14913081, 14913081, 14913081, -119304647, -119304647, -119304647
Offset: 0

Views

Author

Paul Curtz, Oct 28 2019

Keywords

Comments

Let A(n) = (2^n + (-1)^(n+1) - 2*sqrt(3)*sin((Pi*n)/3))/9. Then A(n) = A113405(n) and a(n) = numerator(A(-n)).

Crossrefs

Programs

  • Maple
    gf := x / ((1 - x)*(1 + 2*x)*(1 - 2*x + 4*x^2)): ser := series(gf, x, 36):
    seq(coeff(ser,x,n),n=0..30); # Peter Luschny, Nov 11 2019
  • Mathematica
    LinearRecurrence[{1,0,-8,8},{0,1,1,1},50] (* Paolo Xausa, Nov 13 2023 *)
  • PARI
    concat(0, Vec(x / ((1 - x)*(1 + 2*x)*(1 - 2*x + 4*x^2)) + O(x^40))) \\ Colin Barker, Nov 11 2019

Formula

From Colin Barker, Nov 11 2019: (Start)
G.f.: x / ((1 - x)*(1 + 2*x)*(1 - 2*x + 4*x^2)).
a(n) = a(n-1) - 8*a(n-3) + 8*a(n-4) for n>3. (End)

A334908 Area/6 of primitive Pythagorean triangles generated by {{2, 0}, {1, -1}}^n * {{2}, {1}}, for n >= 0.

Original entry on oeis.org

1, 10, 220, 3080, 52976, 818720, 13333440, 211474560, 3398520576, 54257082880, 869067996160, 13897453373440, 222420341682176, 3558236809994240, 56935698394234880, 910939899548958720, 14575288593717067776, 233202615903456460800
Offset: 0

Views

Author

Ralf Steiner, May 16 2020

Keywords

Comments

Matrix {{2, 0}, {1, -1}} is [g_{-2}] given by Firstov in eq. (24).
These primitive Pythagorean triples are also given by Lee Price as (M_2)^n (3,4,5)^T (T for transposed), with M_2 = {{2, 1, 1}, {2, -2, 2}, {2, -1, 3}}.
For a primitive Pythagorean triangle (x, y, z) = (u^2-v^2, 2*u*v, u^2+v^2) the area is A = x*y/2 = u*v*(u^2 - v^2) = z*h/2 with altitude h, and h is an irreducible fraction. Here:
x(n) = A084175(n+2).
y(n) = 4*(A084175(n+1) - A084175(n)) = A054881(n+2).
= 2*A192382(n+1) = 4*A003683(n+1).
z(n) = A084175(n+2) + 2*A084175(n+1) - 4*A084175(n).
= A108924(n+2)/2 = A084175(n+2) + 2*A139818(n+1).
= A000302(n+1) + A139818(n+1).
u(n) = A000079(n+1) = 2^(n+1).
v(n) = A001045(n+1) = (2^(n+1) + (-1)^n)/3.
For the area A(n): Limit_{n -> oo} (3^3/(2^(4*n+7)))*A(n) = 1. See the formula section. - Wolfdieter Lang, Jun 14 2020

Examples

			a(0) = 3*4/12 = 1 for the triangle (3, 4, 5).
		

Crossrefs

Programs

  • Magma
    [(2^(2*n+1)*(2^(2*n+5) -3) +(-2)^n*(3*2^(2*n+3) -1))/81: n in [0..40]]; // G. C. Greubel, Feb 18 2023
    
  • Mathematica
    Table[(2^(2*n+1)*(2^(2*n+5) -3) + (-2)^n*(3*2^(2*n+3) -1))/3^4, {n,0,40}]
  • SageMath
    [(2^(2*n+1)*(2^(2*n+5) -3) +(-2)^n*(3*2^(2*n+3) -1))/81 for n in range(41)] # G. C. Greubel, Feb 18 2023

Formula

a(n) = ( 2^(4*n+6) - 3*2^(2*n+1) - 3*(-2)^(3*n+3) - (-2)^n )/3^4.
G.f.: 1 / ((1 + 2*x)*(1 - 4*x)*(1 + 8*x)*(1 - 16*x)). - Colin Barker, Jun 11 2020
E.g.f.: (1/81)*(24*exp(-8*x) - exp(-2*x) - 6*exp(4*x) + 64*exp(16*x)). - G. C. Greubel, Feb 18 2023

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

A323210 a(n) = 9*J(n)^2 where J(n) are the Jacobsthal numbers A001045 with J(0) = 1.

Original entry on oeis.org

1, 9, 9, 81, 225, 1089, 3969, 16641, 65025, 263169, 1046529, 4198401, 16769025, 67125249, 268402689, 1073807361, 4294836225, 17180131329, 68718952449, 274878955521, 1099509530625, 4398050705409, 17592177655809, 70368760954881, 281474943156225, 1125899973951489
Offset: 0

Views

Author

Peter Luschny, Jan 09 2019

Keywords

Comments

Colin Barker conjectures that A208556 is a shifted version of this sequence.

Crossrefs

Programs

  • Maple
    gf := (8*x^3 - 24*x^2 + 6*x + 1)/((4*x - 1)*(2*x + 1)*(x - 1)):
    ser := series(gf,x,32): seq(coeff(ser,x,n), n=0..25);
  • Mathematica
    LinearRecurrence[{3, 6, -8}, {1, 9, 9, 81}, 25]
  • Sage
    # Demonstrates the product formula.
    CC = ComplexField(200)
    def t(n,k): return CC(3)*cos(CC(pi*k/n)) - CC(i)*sin(CC(pi*k/n))
    def T(n,k): return t(n,k)*(t(n,k).conjugate())
    def a(n): return prod(T(n,k) for k in (1..n))
    print([a(n).real().round() for n in (0..29)])

Formula

a(n) = Product_{k=1..n} T(n, k) where T(n, k) = t(n,k)*conjugate(t(n,k)) and t(n,k) = 3*cos(Pi*k/n) - i*sin(Pi*k/n), i is the imaginary unit.
a(n) = [x^n] (8*x^3 - 24*x^2 + 6*x + 1)/((4*x - 1)*(2*x + 1)*(x - 1)).
a(n) = n! [x^n] (1 + exp(x) - 2*exp(-2*x) + exp(4*x)).
a(n) = 3*a(n-1) + 6*a(n-2) - 8*a(n-3) for n >= 4.
A062510(n) = sqrt(a(n)) for n > 0.
a(n) = 4^n-2*(-2)^n+1, n>0. - R. J. Mathar, Mar 06 2022

A362379 Convolution triangle of A052547(n).

Original entry on oeis.org

1, 0, 1, 2, 0, 1, 1, 4, 0, 1, 5, 2, 6, 0, 1, 5, 14, 3, 8, 0, 1, 14, 14, 27, 4, 10, 0, 1, 19, 49, 27, 44, 5, 12, 0, 1, 42, 68, 113, 44, 65, 6, 14, 0, 1, 66, 175, 159, 214, 65, 90, 7, 16, 0, 1, 131, 286, 465, 304, 360, 90, 119, 8, 18, 0, 1
Offset: 0

Views

Author

Philippe Deléham, Apr 20 2023

Keywords

Examples

			Triangle begins, for n>=0, 0<=k<=n :
   1 ;
   0,  1 ;
   2,  0,   1 ;
   1,  4,   0,  1 ;
   5,  2,   6,  0,  1 ;
   5, 14,   3,  8,  0,  1 ;
  14, 14,  27,  4, 10,  0,  1 ;
  19, 49,  27, 44,  5, 12,  0, 1 ;
  42, 68, 113, 44, 65,  6, 14, 0, 1 ;
  ...
		

Crossrefs

Cf. A052547, A077998 (row sums), A052964 (diagonal sums).

Formula

T(n,k) = T(n-1,k) + T(n-1,k-1) + 2*T(n-2,k) - T(n-2,k-1) - T(n-3,k) ; T(0,0) = T(1,1) = T(2,2) = 1, T(1,0) = T(2,1) = 0, T(2,0) = 2, T(n,k) = 0 if k<0 or if k>n .
Sum_{k = 0..n} T(n,k)*x^k = A052547(n), A077998(n), A052536(n), A052941(n) for x = 0, 1, 2, 3 respectively.
Sum_{k = 0..n} T(n,k)*2^(n-k) = A139818(n+1) = A001045(n+1)^2.

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

Views

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-10 of 11 results. Next