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

A151798 a(0)=1, a(1)=2, a(n)=4 for n>=2.

Original entry on oeis.org

1, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Offset: 0

Views

Author

David Applegate, Jun 29 2009

Keywords

Comments

A010709 preceded by 1, 2.
Partial sums give A131098.
The INVERT transform gives A077996 without A077996(0). The Motzkin transform gives A105696 without A105696(0). Decimal expansion of 28/225=0.12444... . - R. J. Mathar, Jun 29 2009
Continued fraction expansion of 1 + sqrt(1/5). - Arkadiusz Wesolowski, Mar 30 2012
The number of solutions x (mod 2^(n+1)) of x^2 = 1 (mod 2^(n+1)), namely x = 1 (n=0), x = -1, 1 (n=1) and x = -1, 1, 2^n-1, 2^n+1 (n at least 2). - Christopher J. Smyth, May 15 2014
Also, the number of n-step self-avoiding walks on the L-lattice with no non-contiguous adjacencies (see A322419 for details of L-lattice). - Sean A. Irvine, Jul 29 2020

Crossrefs

Programs

  • Magma
    [ n le 1 select n+1 else 4: n in [0..104] ];
    
  • Mathematica
    f[n_] := Fold[#2*Floor[#1/#2 + 1/2] &, n, Reverse@ Range[n - 1]]; Array[f, 55]
  • PARI
    Vec((1+x+2*x^2)/(1-x) + O(x^100)) \\ Altug Alkan, Jan 19 2016

Formula

G.f.: (1+x+2*x^2)/(1-x).
E.g.f. A(x)=x*B(x) satisfies the differential equation B'(x)=1+x+x^2+B(x). - Vladimir Kruchinin, Jan 19 2011
E.g.f.: 4*exp(x) - 2*x - 3. - Elmo R. Oliveira, Aug 06 2024

A224232 a(n) = n! if n <= 3, otherwise a(n) = 2*(a(n-1) + a(n-3)) + a(n-2).

Original entry on oeis.org

1, 1, 2, 6, 16, 42, 112, 298, 792, 2106, 5600, 14890, 39592, 105274, 279920, 744298, 1979064, 5262266, 13992192, 37204778, 98926280, 263041722, 699419280, 1859732842, 4944968408, 13148508218, 34961450528, 92961346090, 247181159144, 657246565434, 1747596982192, 4646802848106, 12355695809272, 32853388431034, 87356078367552, 232276936784682
Offset: 0

Views

Author

N. J. A. Sloane, Apr 11 2013

Keywords

Comments

Also the number of permutations that are sortable after two passes through a pop stack. (See the Pudwell-Smith link.) - Lara Pudwell, Jun 01 2017

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(x^3 + x^2 + x - 1)/(2 x^3 + x^2 + 2 x - 1), {x, 0, 35}], x] (* Michael De Vlieger, Jun 01 2017 *)
    LinearRecurrence[{2,1,2},{1,1,2,6},40] (* Harvey P. Dale, Aug 28 2023 *)
  • PARI
    Vec((x^3+x^2+x-1)/(2*x^3+x^2+2*x-1) + O(x^100)) \\ Colin Barker, Jun 07 2015

Formula

G.f.: (x^3 + x^2 + x - 1) / (2*x^3 + x^2 + 2*x - 1). - Colin Barker, Jun 07 2015
a(n) = (b(n) + b(n-1))/2 for b(n) = A077996(n). - Hanzhang Fang, Aug 27 2022

A356563 Sums of powers of roots of x^3 - 2*x^2 - x - 2.

Original entry on oeis.org

3, 2, 6, 20, 50, 132, 354, 940, 2498, 6644, 17666, 46972, 124898, 332100, 883042, 2347980, 6243202, 16600468, 44140098, 117367068, 312075170, 829797604, 2206404514, 5866756972, 15599513666, 41478593332, 110290214274
Offset: 0

Views

Author

Greg Dresden and Hanzhang Fang, Aug 12 2022

Keywords

Comments

The three roots of x^3 - 2*x^2 - x - 2 are c1=2.65896708... = A348909+1, c2=-0.32948354... + 0.80225455...*i, and c3=-0.32948354... - 0.80225455...*i.
a(n) can also be determined by Vieta's formulas and Newton's identities. For example, a(3) by definition is c1^3 + c2^3 + c3^3, and from Newton's identities this equals e1^3 - 3*e1*e2 + 3*e3 for e1, e2, e3 the elementary symmetric polynomials of x^3 - x^2 - x - 3. From Vieta's formulas we have e1 = 2, e2 = -1, and e3 = 2, giving us e1^3 - 3*e1*e2 + 3*e3 = 8 + 6 + 6 = 20, as expected.

Examples

			For n=3, a(3) = (2.65896708...)^3 + (-0.32948354... + 0.80225455...*i)^3 + (-0.32948354... - 0.80225455...*i)^3 = 20.
		

Crossrefs

Cf. A077996, A348909 (c1-1).

Programs

  • Mathematica
    LinearRecurrence[{2, 1, 2}, {3, 2, 6}, 30]

Formula

a(n) = 2*a(n-1) + a(n-2) + 2*a(n-3).
G.f.: (3 - 4 x - x^2)/(1 - 2 x - x^2 - 2 x^3).
2*a(n) = 7*b(n) - b(n+1) for b(n) = A077996(n).
Showing 1-3 of 3 results.