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

A097073 Expansion of (1-x+2*x^2)/((1+x)*(1-2*x)).

Original entry on oeis.org

1, 0, 4, 4, 12, 20, 44, 84, 172, 340, 684, 1364, 2732, 5460, 10924, 21844, 43692, 87380, 174764, 349524, 699052, 1398100, 2796204, 5592404, 11184812, 22369620, 44739244, 89478484, 178956972, 357913940, 715827884, 1431655764, 2863311532
Offset: 0

Views

Author

Paul Barry, Jul 22 2004

Keywords

Comments

Partial sums are A097074.
Pairwise sums are {1, 1, 4, 16, 32, ...} or 2^n -Sum_{k=0..n} binomial(n,k)*(-1)^(n+k)*k.

Crossrefs

Cf. A001045, A078008 (form a(n)=2^n-a(n-1)).

Programs

Formula

a(n) = (2*2^n + 4*(-1)^n)/3 - 0^n.
a(n) = A001045(n+1) + (-1)^n - 0^n.
a(n) = 2*A078008(n) - 0^n.
a(2*n+1) + a(2*n+2) = A000302(n+1). - Paul Curtz, Jun 30 2008
G.f.: 1 - x + x*Q(0), where Q(k) = 1 + 2*x^2 + (4*k+5)*x - x*(4*k+1 + 2*x)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Oct 07 2013
E.g.f.: (1/3)*( 2*exp(2*x) + 4*exp(-x) - 3 ). - G. C. Greubel, Aug 19 2022

Extensions

Obscure variable k in Orlovsky comment replaced with a(n) by R. J. Mathar, Apr 23 2009

A026644 a(n) = a(n-1) + 2*a(n-2) + 2, for n>=3, where a(0)= 1, a(1)= 2, a(2)= 4.

Original entry on oeis.org

1, 2, 4, 10, 20, 42, 84, 170, 340, 682, 1364, 2730, 5460, 10922, 21844, 43690, 87380, 174762, 349524, 699050, 1398100, 2796202, 5592404, 11184810, 22369620, 44739242, 89478484, 178956970, 357913940, 715827882, 1431655764, 2863311530, 5726623060
Offset: 0

Views

Author

Keywords

Comments

Number of moves to solve Chinese rings puzzle.
a(n-1) (with a(0):=0) enumerates all sequences of length m=1,2,...,floor(n/2) with nonzero integer entries n_i satisfying sum |n_i| <= n-m. Rephrasing K. A. Meissner's example p. 6. Example n=4: from length m=1: [1], [2], [3], each in 2 signed versions; from m=2: [1,1] in 2^2 = 4 signed versions. Hence a(3) = a(4-1) = 3*2 + 1*4 = 10.
Also the number of different 3-colorings (out of 4 colors) for the vertices of all triangulated planar polygons on a base with n+1 vertices if the colors of the two base vertices are fixed. - Patrick Labarque, Mar 23 2010
For n > 0, also the total distance that the disks travel from the leftmost peg to the rightmost peg in the Tower of Hanoi puzzle, in the unique solution with 2^n-1 moves (see links). - Sela Fried, Dec 17 2023

References

  • Richard I. Hess, Compendium of Over 7000 Wire Puzzles, privately printed, 1991.
  • Richard I. Hess, Analysis of Ring Puzzles, booklet distributed at 13th International Puzzle Party, Amsterdam, Aug 20 1993.

Crossrefs

Row sums of A026637.
For n >= 1, equals twice A000975, also A001045 - 1.
A167030 is an essentially identical sequence.

Programs

  • Magma
    [n eq 0 select 1 else (2^(n+2) -3-(-1)^n)/3 : n in [0..40]]; // G. C. Greubel, Jun 28 2024
    
  • Maple
    f:=n-> if n mod 2 = 0 then (2^(n+2)-4)/3 else (2^(n+2)-2)/3; fi;
  • Mathematica
    Join[{1}, Floor[(2^Range[3, 40] - 2)/3]] (* or *) LinearRecurrence[{2,1,-2},{1,2,4,10},40] (* Vladimir Joseph Stephan Orlovsky, Jan 29 2012 *)
    CoefficientList[Series[(1-x^2+2x^3)/((1-x)(1-x-2x^2)),{x,0,1001}],x] (* Vincenzo Librandi, Apr 04 2012 *)
  • PARI
    Vec((1-x^2+2*x^3)/(1-x)/(1-x-2*x^2)+O(x^99)) \\ Charles R Greathouse IV, Apr 04 2012
    
  • Python
    def A026644(n): return ((4<Chai Wah Wu, Apr 17 2025
  • SageMath
    [(2^(n+2)-3-(-1)^n)/3 + int(n==0) for n in range(41)] # G. C. Greubel, Jun 28 2024
    

Formula

a(2*k) = 2*a(2*k-1), a(2*k+1) = 2*a(2*k) + 2. - Peter Shor, Apr 11 2002
For n>0: a(n+1) = a(n) + 2*b(n+1) + 4*b(n), where b(k) = A001045(k). - N. J. A. Sloane, May 16 2003
For n>0: if n mod 2 = 0 then (2^(n+2)-4)/3 else (2^(n+2)-2)/3. - Richard Hess
a(2*n) = 2*n-1 + Sum_{k=0..2*n-1} a(k), n>0; a(2*n+1) = 2*n+1 + Sum_{k=0..n} a(k). - Lee Hae-hwang, Sep 17 2002; corrected by R. J. Mathar, Oct 21 2008
a(n) = 2*n + 2*Sum_{k=1..n-2} a(k), n>0. - Lee Hae-hwang, Sep 19 2002; corrected by R. J. Mathar, Oct 21 2008
From Paul Barry, Oct 24 2007: (Start)
G.f.: (1 - x^2 + 2*x^3)/((1 - x)*(1 - x - 2*x^2)).
a(n) = J(n+2) - 1 + 0^n, where J(n) = A001045(n) (Jacobsthal numbers).
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3).
a(n) = 0^n + Sum_{k=0..n} (2 - 2*0^(n-k))*J(k+1). (End)
a(n) = A052953(n+1) - 2, n>0. [Moved from A020988, R. J. Mathar, Oct 21 2008]
a(n) = floor(A097074(n+1)/2), n>0. - Gary Detlefs, Dec 19 2010
a(n) = A169969(2*n-1) - 1, n>=2; a(n) = 3*2^(n-1) - 1 - A169969(2*n-7), n>=5 . - Yosu Yurramendi, Jul 05 2016
a(n+3) = 3*2^(n+2) - 2 - a(n), n>=1, a(1)=2, a(2)=4, a(3)=10 . - Yosu Yurramendi, Jul 05 2016
a(n) + A084170(n) = 3*2^n - 2, n>=1. - Yosu Yurramendi, Jul 05 2016
E.g.f: (3 - 4*cosh(x) + 4*cosh(2*x) - 2*sinh(x) + 4*sinh(2*x))/3. - Ilya Gutkovskiy, Jul 05 2016
a(n+3) = 9*2^n + A084170(n), n>=0. - Yosu Yurramendi, Jul 07 2016
a(n) = A000975(n+1) - A000035(n+1), n>0, a(0)=1. - Yuchun Ji, Aug 05 2020

Extensions

Recurrence in definition line found by Lee Hae-hwang, Apr 03 2002

A020943 a(2n+1) = |a(2n) - a(2n-1)|, a(2n) = a(n) + a(n-1).

Original entry on oeis.org

0, 1, 1, 1, 0, 2, 2, 2, 0, 1, 1, 2, 1, 4, 3, 4, 1, 2, 1, 1, 0, 2, 2, 3, 1, 3, 2, 5, 3, 7, 4, 7, 3, 5, 2, 3, 1, 3, 2, 2, 0, 1, 1, 2, 1, 4, 3, 5, 2, 4, 2, 4, 2, 5, 3, 7, 4, 8, 4, 10, 6, 11, 5, 11, 6, 10, 4, 8, 4, 7, 3, 5, 2, 4, 2, 4, 2, 5, 3, 4, 1, 2, 1, 1, 0, 2, 2, 3, 1, 3, 2, 5, 3, 7, 4, 8, 4, 7, 3, 6, 3, 6, 3
Offset: 1

Views

Author

Keywords

Comments

Presumably, the positions n such that a(n)=0 are the terms of A097074. - Ivan Neretin, Jul 06 2015

Crossrefs

Programs

  • Mathematica
    a = {0, 1, 1}; Do[AppendTo[a, a[[n]] + a[[n - 1]]]; AppendTo[a, Abs[a[[-1]] - a[[-2]]]], {n, 2, 51}]; a (* Ivan Neretin, Jul 06 2015 *)

Extensions

More terms from Henry Bottomley, May 16 2001

A173114 a(0)=a(1)=1, a(n) = 2*a(n-1)- A010686(n), n>1.

Original entry on oeis.org

1, 1, 1, -3, -7, -19, -39, -83, -167, -339, -679, -1363, -2727, -5459, -10919, -21843, -43687, -87379, -174759, -349523, -699047, -1398099, -2796199, -5592403, -11184807, -22369619, -44739239, -89478483, -178956967, -357913939, -715827879, -1431655763
Offset: 0

Views

Author

Paul Curtz, Feb 10 2010

Keywords

Comments

The sequence in the first row and successive differences in followup rows defines the array
1, 1, 1, -3, -7, -19, -39, -83, -167, -339, ..
0, 0, -4, -4, -12, -20, -44, -84, -172, -340, ..
0, -4, 0, -8, -8, -24, -40, -88, -168, -344, ..
-4, 4, -8, 0, -16, -16, -48, -80, -176, -336, ..
8, -12, 8, -16, 0, -32, -32, -96, -160, -352, ..
The first two subdiagonals show essentially the powers of 2.

Formula

a(n) = 3 + 2*( (-1)^n-2^n )/3 = 3-A078008(n+1), n>0. - R. J. Mathar, Jun 30 2010
a(n+2)-a(n)= A154589(n+2) = -2^(n+1), n>0.
a(n) = 2*a(n-1)+a(n-2)-2*a(n-3), n>3.
G.f.: (-x-2*x^2-4*x^3+1)/( (1-x)*(1-2*x)*(1+x) ).
a(n) + A173078(n) = 2^n.
a(n) - a(n-1) = -4*A001045(n-2) = -A097074(n-1), n>1.

Extensions

Edited and extended by R. J. Mathar, Jun 30 2010

A322783 a(n) = 1 - n + (2^(n+2) - (-1)^n)/3.

Original entry on oeis.org

2, 3, 4, 9, 18, 39, 80, 165, 334, 675, 1356, 2721, 5450, 10911, 21832, 43677, 87366, 174747, 349508, 699033, 1398082, 2796183, 5592384, 11184789, 22369598, 44739219, 89478460, 178956945, 357913914, 715827855, 1431655736
Offset: 0

Views

Author

Paul Curtz, Dec 26 2018

Keywords

Comments

a(n) mod 10 = period 20: repeat [2, 3, 4, 9, 8, 9, 0, 5, 4, 5, 6, 1, 0, 1, 2, 7, 6, 7, 8, 3] = disordered [0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9].

Crossrefs

Programs

  • PARI
    Vec((2 - 3*x - 3*x^2 + 6*x^3) / ((1 - x)^2*(1 + x)*(1 - 2*x)) + O(x^40)) \\ Colin Barker, Dec 26 2018

Formula

a(n+1) - 2*(n) = -1, -2, 1, 0, 3, 2, 5, 4, ..., n >= 0.
a(n+1) - a(n) = A097074(n).
a(n+2) - 2*a(n+1) + a(n) = A097073(n+1).
From Colin Barker, Dec 26 2018: (Start)
G.f.: (2 - 3*x - 3*x^2 + 6*x^3) / ((1 - x)^2*(1 + x)*(1 - 2*x)).
a(n) = 3*a(n-1) - a(n-2) - 3*a(n-3) + 2*a(n-4) for n > 3.
(End)
Showing 1-5 of 5 results.