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

A084964 Follow n+2 by n. Also solution of a(n+2)=a(n)+1, a(0)=2, a(1)=0.

Original entry on oeis.org

2, 0, 3, 1, 4, 2, 5, 3, 6, 4, 7, 5, 8, 6, 9, 7, 10, 8, 11, 9, 12, 10, 13, 11, 14, 12, 15, 13, 16, 14, 17, 15, 18, 16, 19, 17, 20, 18, 21, 19, 22, 20, 23, 21, 24, 22, 25, 23, 26, 24, 27, 25, 28, 26, 29, 27, 30, 28, 31, 29, 32, 30, 33, 31, 34, 32, 35, 33, 36, 34, 37, 35, 38, 36, 39
Offset: 0

Views

Author

Michael Somos, Jun 15 2003

Keywords

Crossrefs

Cf. A217764(1,n) = a(n+2).

Programs

  • Haskell
    import Data.List (transpose)
    a084964 n = a084964_list !! n
    a084964_list = concat $ transpose [[2..], [0..]]
    -- Reinhard Zumkeller, Apr 06 2015
  • Magma
    &cat[ [n+2, n]: n in [0..37] ]; // Klaus Brockhaus, Nov 23 2009
    
  • Maple
    A084964:=n->floor(n/2)+1+(-1)^n; seq(A084964(k), k=0..100); # Wesley Ivan Hurt, Nov 08 2013
  • Mathematica
    lst={}; a=1; Do[a=n-a; AppendTo[lst, a], {n, 0, 100}]; lst (* Vladimir Joseph Stephan Orlovsky, Dec 14 2008 *)
    Table[{n,n-2},{n,2,40}]//Flatten (* or *) LinearRecurrence[{1,1,-1},{2,0,3},80] (* Harvey P. Dale, Sep 12 2021 *)
  • PARI
    a(n)=n\2-2*(n%2)+2
    

Formula

G.f.: (2-2x+x^2)/((1-x)(1-x^2)).
a(2n+1)=n. a(2n)=n+2. a(n+2)=a(n)+1. a(n)=-a(-3-n).
a(n) = floor(n/2) + 1 + (-1)^n. - Reinhard Zumkeller, Aug 27 2005
A112032(n)=2^a(n); A112033(n)=3*2^a(n); a(n)=A109613(n+2)-A052938(n). - Reinhard Zumkeller, Aug 27 2005
a(n) = n + 1 - a(n-1) (with a(0)=2). - Vincenzo Librandi, Aug 08 2010
a(n) = floor(n/2)*3 - floor((n-1)/2)*2. - Ross La Haye, Mar 27 2013
a(n) = 3*n - 3 - 5*floor((n-1)/2). - Wesley Ivan Hurt, Nov 08 2013
a(n) = (3 + 5*(-1)^n + 2*n)/4. - Wolfgang Hintze, Dec 13 2014
E.g.f.: ((4 + x)*cosh(x) - (1 - x)*sinh(x))/2. - Stefano Spezia, Jul 01 2023

Extensions

First part of definition adjusted to match offset by Klaus Brockhaus, Nov 23 2009

A112030 a(n) = (2 + (-1)^n) * (-1)^floor(n/2).

Original entry on oeis.org

3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1, -3, -1, 3, 1
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 27 2005

Keywords

Comments

The fractions A112031(n)/A112032(n) give the partial sums of a(n)/floor((n+4)/2).
Sum of the two Cartesian coordinates from the image of the point (2,1) after n 90-degree counterclockwise rotations about the origin. - Wesley Ivan Hurt, Jul 06 2013

Crossrefs

Programs

Formula

a(n) = A010684(n+1) * (-1)^floor(n/2).
O.g.f.: (3+x)/(1+x^2). - R. J. Mathar, Jan 09 2008

A164298 a(n) = ((1+4*sqrt(2))*(2+sqrt(2))^n + (1-4*sqrt(2))*(2-sqrt(2))^n)/2.

Original entry on oeis.org

1, 10, 38, 132, 452, 1544, 5272, 18000, 61456, 209824, 716384, 2445888, 8350784, 28511360, 97343872, 332352768, 1134723328, 3874187776, 13227304448, 45160842240, 154188760064, 526433355776, 1797355902976, 6136556900352, 20951515795456, 71532949381120
Offset: 0

Views

Author

Al Hakanson (hawkuu(AT)gmail.com), Aug 12 2009

Keywords

Comments

Binomial transform of A048696. Second binomial transform of A164587. Inverse binomial transform of A164299.
This sequence is part of a class of sequences defined by the recurrence a(n,m) = 2*(m+1)*a(n-1,m) - ((m+1)^2 - 2)*a(n-2,m) with a(0) = 1 and a(1) = m+9. The generating function is Sum_{n>=0} a(n,m)*x^n = (1 - (m-7)*x)/(1 - 2*(m+1)*x + ((m+1)^2 - 2)*x^2) and has a series expansion in terms of Pell-Lucas numbers defined by a(n, m) = (1/2)*Sum_{k=0..n} binomial(n,k)*m^(n-k)*(5*Q(k) + 4*Q(k-1)). - G. C. Greubel, Mar 12 2021

Crossrefs

Sequences in the class a(n, m): this sequence (m=1), A164299 (m=2), A164300 (m=3), A164301 (m=4), A164598 (m=5), A164599 (m=6), A081185 (m=7), A164600 (m=8).
Cf. A016116(n+1).

Programs

  • Magma
    Z:=PolynomialRing(Integers()); N:=NumberField(x^2-2); S:=[ ((1+4*r)*(2+r)^n+(1-4*r)*(2-r)^n)/2: n in [0..27] ]; [ Integers()!S[j]: j in [1..#S] ]; // Klaus Brockhaus, Aug 17 2009
    
  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!( (1+6*x)/(1-4*x+2*x^2) )); // G. C. Greubel, Dec 14 2018
    
  • Maple
    a:=n->((1+4*sqrt(2))*(2+sqrt(2))^n+(1-4*sqrt(2))*(2-sqrt(2))^n)/2: seq(floor(a(n)),n=0..25); # Muniru A Asiru, Dec 15 2018
  • Mathematica
    LinearRecurrence[{4,-2}, {1,10}, 50] (* or *) CoefficientList[Series[(1 + 6*x)/(1 - 4*x + 2*x^2), {x,0,50}], x] (* G. C. Greubel, Sep 12 2017 *)
  • PARI
    my(x='x+O('x^50)); Vec((1+6*x)/(1-4*x+2*x^2)) \\ G. C. Greubel, Sep 12 2017
    
  • Sage
    [( (1+6*x)/(1-4*x+2*x^2) ).series(x,n+1).list()[n] for n in (0..30)] # G. C. Greubel, Dec 14 2018; Mar 12 2021

Formula

a(n) = 4*a(n-1) - 2*a(n-2) for n > 1; a(0)=1, a(1)=10.
G.f.: (1+6*x)/(1-4*x+2*x^2).
E.g.f.: (cosh(sqrt(2)*x) + 4*sqrt(2)*sinh(sqrt(2)*x))*exp(2*x). - G. C. Greubel, Sep 12 2017
From G. C. Greubel, Mar 12 2021: (Start)
a(n) = A056236(n) + 8*A007070(n-1).
a(n) = (1/2)*Sum_{k=0..n} binomial(n,k)*(5*Q(k) + 4*Q(k-1)), where Q(n) = Pell-Lucas(n) = A002203(n). (End)

Extensions

Edited and extended beyond a(5) by Klaus Brockhaus, Aug 17 2009

A164587 a(n) = 2*a(n - 2) for n > 2; a(1) = 1, a(2) = 8.

Original entry on oeis.org

1, 8, 2, 16, 4, 32, 8, 64, 16, 128, 32, 256, 64, 512, 128, 1024, 256, 2048, 512, 4096, 1024, 8192, 2048, 16384, 4096, 32768, 8192, 65536, 16384, 131072, 32768, 262144, 65536, 524288, 131072, 1048576, 262144, 2097152, 524288, 4194304, 1048576
Offset: 1

Views

Author

Klaus Brockhaus, Aug 17 2009

Keywords

Comments

Interleaving of A000079 and A000079 without initial terms 1, 2, 4.
Binomial transform is A048696. Second binomial transform is A164298.

Crossrefs

Equals A112032 without initial term 4.
Cf. A000079 (powers of 2), A048696, A164298.

Programs

  • Magma
    [ n le 2 select 7*n-6 else 2*Self(n-2): n in [1..41] ];
    
  • Mathematica
    CoefficientList[Series[(1 - x)/(1 - 10*x + 17*x^2), {x,0,50}], x] (* G. C. Greubel, Aug 12 2017 *)
  • PARI
    x='x+O('x^50); Vec(x*(1+8*x)/(1-2*x^2)) \\ G. C. Greubel, Aug 12 2017

Formula

a(n) = (5 + 3*(-1)^n)*2^((2*n -5 +(-1)^n)/4).
G.f.: x*(1+8*x)/(1-2*x^2).
E.g.f.: 4*cosh(sqrt(2)*x) + (1/sqrt(2))*sinh(sqrt(2)*x) - 4. - G. C. Greubel, Aug 12 2017

A112033 a(n) = 3 * 2^(floor(n/2) + 1 + (-1)^n).

Original entry on oeis.org

12, 3, 24, 6, 48, 12, 96, 24, 192, 48, 384, 96, 768, 192, 1536, 384, 3072, 768, 6144, 1536, 12288, 3072, 24576, 6144, 49152, 12288, 98304, 24576, 196608, 49152, 393216, 98304, 786432, 196608, 1572864, 393216, 3145728, 786432, 6291456, 1572864
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 27 2005

Keywords

References

  • George Pólya and Gábor Szegő, Problems and Theorems in Analysis I (Springer 1924, reprinted 1972), Part One, Chapter 4, Sect. 1, Problem 148.

Crossrefs

Programs

Formula

a(n) = 1 / abs(A112031(n)/A112032(n) - 2/3). (previous name)
a(n) = 3*2^A084964(n) = 3*A112032(n).
From Ralf Stephan, Jul 16 2013: (Start)
Recurrence: a(n) = 2a(n-2), a(0)=12, a(1)=3.
G.f.: (6*x+24)/(1-2*x^2). (End)
From Amiram Eldar, May 11 2025: (Start)
Sum_{n>=0} 1/a(n) = 5/6.
Sum_{n>=0} (-1)^n/a(n) = -1/2. (End)

A112031 Numerator of 3/4 + 1/4 - 3/8 - 1/8 + 3/16 + 1/16 - 3/32 - 1/32 + 3/64 + ....

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Aug 27 2005

Keywords

Comments

Numerator of partial sums of A112030(n)/A016116(n+4), denominators = A112032;
a(n)/A112032(n) - 2/3 = (-1)^floor(n/2) / A112033(n);
lim_{n->infinity} a(n)/A112032(n) = 2/3.

References

  • G. Pólya and G. Szegő, Problems and Theorems in Analysis I (Springer 1924, reprinted 1972), Part One, Chap. 4, Sect. 1, Problem 148.

Crossrefs

Cf. A016116, A112030, A112032, A112033, A001045 (bisections).

Programs

  • Magma
    [(2^(Floor(n/2) + 2 + (-1)^n) + (-1)^Floor(n/2)) / 3: n in [0..50]]; // Vincenzo Librandi, Aug 17 2011
    
  • Mathematica
    LinearRecurrence[{0,1,0,2},{3,1,5,1},50] (* Harvey P. Dale, Dec 31 2017 *)
  • PARI
    m=50; v=concat([3,1,5,1], vector(m-4)); for(n=5, m, v[n]=v[n-2] +2*v[n-4]); v \\ G. C. Greubel, Nov 08 2018

Formula

a(n) = (2^(floor(n/2) + 2 + (-1)^n) + (-1)^floor(n/2)) / 3.
From Colin Barker, Apr 05 2013: (Start)
a(n) = a(n-2) + 2*a(n-4);
g.f.: (2*x^2+x+3) / ((1+x^2)*(1-2*x^2)). (End)

Extensions

a(22) corrected by Vincenzo Librandi, Aug 17 2011

A112034 1 / (A010684(n)/A016116(n+5) - 1/A112033(n)).

Original entry on oeis.org

6, 24, 12, 48, 24, 96, 48, 192, 96, 384, 192, 768, 384, 1536, 768, 3072, 1536, 6144, 3072, 12288, 6144, 24576, 12288, 49152, 24576, 98304, 49152, 196608, 98304, 393216, 19660, 8, 786432, 393216, 1572864, 786432, 3145728, 1572864, 6291456
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 27 2005

Keywords

Comments

a(n) = 3*2^A052938(n).

Crossrefs

Showing 1-7 of 7 results.