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.

A077957 Powers of 2 alternating with zeros.

Original entry on oeis.org

1, 0, 2, 0, 4, 0, 8, 0, 16, 0, 32, 0, 64, 0, 128, 0, 256, 0, 512, 0, 1024, 0, 2048, 0, 4096, 0, 8192, 0, 16384, 0, 32768, 0, 65536, 0, 131072, 0, 262144, 0, 524288, 0, 1048576, 0, 2097152, 0, 4194304, 0, 8388608, 0, 16777216, 0, 33554432, 0, 67108864, 0, 134217728, 0, 268435456
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Comments

Normally sequences like this are not included, since with the alternating 0's deleted it is already in the database.
Inverse binomial transform of A001333. - Paul Barry, Feb 25 2003
"Sloping binary representation" of powers of 2 (A000079), slope=-1 (see A037095 and A102370). - Philippe Deléham, Jan 04 2008
0,1,0,2,0,4,0,8,0,16,... is the inverse binomial transform of A000129 (Pell numbers). - Philippe Deléham, Oct 28 2008
Number of maximal self-avoiding walks from the NW to SW corners of a 3 X n grid.
Row sums of the triangle in A204293. - Reinhard Zumkeller, Jan 14 2012
Pisano period lengths: 1, 1, 4, 1, 8, 4, 6, 1, 12, 8, 20, 4, 24, 6, 8, 1, 16, 12, 36, 8, ... . - R. J. Mathar, Aug 10 2012
This sequence occurs in the length L(n) = sqrt(2)^n of Lévy's C-curve at the n-th iteration step. Therefore, L(n) is the Q(sqrt(2)) integer a(n) + a(n-1)*sqrt(2), with a(-1) = 0. For a variant of this C-curve see A251732 and A251733. - Wolfdieter Lang, Dec 08 2014
a(n) counts walks (closed) on the graph G(1-vertex,2-loop,2-loop). Equivalently the middle entry (2,2) of A^n where the adjacency matrix of digraph is A=(0,1,0;1,0,1;0,1,0). - David Neil McGrath, Dec 19 2014
a(n-2) is the number of compositions of n into even parts. For example, there are 4 compositions of 6 into even parts: (6), (222), (42), and (24). - David Neil McGrath, Dec 19 2014
Also the number of alternately constant compositions of n + 2, ranked by A351010. The alternately strict version gives A000213. The unordered version is A035363, ranked by A000290, strict A035457. - Gus Wiseman, Feb 19 2022
a(n) counts degree n fixed points of GF(2)[x]'s automorphisms. Proof: given a field k, k[x]'s automorphisms are determined by k's automorphisms and invertible affine maps x -> ax + b. GF(2) is rigid and has only one unit so its only nontrivial automorphism is x -> x + 1. For n = 0 we have 1 fixed point, the constant polynomial 1. (Taking the convention that 0 is not a degree 0 polynomial.) For n = 1 we have 0 fixed points as x -> x + 1 -> x are the only degree 1 polynomials. Note that if f(x) is a fixed point, then f(x) + 1 is also a fixed point. Given f(x) a degree n fixed point, we can assume WLOG x | f(x). Applying the automorphism, we then have x + 1 | f(x). Now note that f(x) / (x^2 + x) must be a fixed point, so any fixed point of degree n must either be of the form g(x) * (x^2 + x) or g(x) * (x^2 + x) + 1 for a unique degree n - 2 fixed point g(x). Therefore we have the recurrence relation a(n) = 2 * a(n - 2) as desired. - Keith J. Bauer, Mar 19 2024

Crossrefs

Column k=3 of A219946. - Alois P. Heinz, Dec 01 2012
Cf. A016116 (powers repeated).

Programs

  • GAP
    Flat(List([0..30],n->[2^n,0])); # Muniru A Asiru, Aug 05 2018
  • Haskell
    a077957 = sum . a204293_row  -- Reinhard Zumkeller, Jan 14 2012
    
  • Magma
    &cat [[2^n,0]: n in [0..20]]; // Vincenzo Librandi, Apr 03 2018
    
  • Maple
    seq(op([2^n,0]),n=0..100); # Robert Israel, Dec 23 2014
  • Mathematica
    a077957[n_] := Riffle[Table[2^i, {i, 0, n - 1}], Table[0, {n}]]; a077957[29] (* Michael De Vlieger, Dec 22 2014 *)
    CoefficientList[Series[1/(1 - 2*x^2), {x,0,50}], x] (* G. C. Greubel, Apr 12 2017 *)
    LinearRecurrence[{0, 2}, {1, 0}, 54] (* Robert G. Wilson v, Jul 23 2018 *)
    Riffle[2^Range[0,30],0,{2,-1,2}] (* Harvey P. Dale, Jan 06 2022 *)
  • PARI
    a(n)=if(n<0||n%2, 0, 2^(n/2))
    
  • Sage
    def A077957():
        x, y = -1, 1
        while True:
            yield -x
            x, y = x + y, x - y
    a = A077957(); [next(a) for i in range(40)]  # Peter Luschny, Jul 11 2013
    

Formula

G.f.: 1/(1-2*x^2).
E.g.f.: cosh(x*sqrt(2)).
a(n) = (1 - n mod 2) * 2^floor(n/2).
a(n) = sqrt(2)^n*(1+(-1)^n)/2. - Paul Barry, May 13 2003
a(n) = 2*a(n-2) with a(0)=1, a(1)=0. - Jim Singh, Jul 12 2018

A057084 Scaled Chebyshev U-polynomials evaluated at sqrt(2).

Original entry on oeis.org

1, 8, 56, 384, 2624, 17920, 122368, 835584, 5705728, 38961152, 266043392, 1816657920, 12404916224, 84706066432, 578409201664, 3949625081856, 26969727041536, 184160815677440, 1257528709087232, 8586943147278336
Offset: 0

Views

Author

Wolfdieter Lang, Aug 11 2000

Keywords

Comments

From Kival Ngaokrajang, Dec 14 2014 (Start):
-2*a(n-1) is the irrational part of the integer in Q(sqrt 2) giving the length of a Levy C-curve variant L(n)=(2*(2- sqrt 2))^n at iteration step n. The length of this C-curve is an integer in the real quadratic number field Q(sqrt 2), namely L(n) = A(n)+B(n)*sqrt(2) with A(n) = A084130(n) and B(n) = -2*a(n-1). See the construction rule and the illustration in the links.
The fractal dimension of the Levy C-curve is 2, but for this modified case it is log(4)/log(2 + sqrt 2) = 1.1289527...
(End)
For lim_{n->oo} a(n+1)/a(n) = 2*(2 + sqrt(2)) = 6.82842... see A365823. - Wolfdieter Lang, Nov 15 2023

Examples

			The first pairs [A(n),B(n)] determining the length L(n) are : [1, 0], [4, -2], [24, -16], [160, -112], [1088, -768], [7424, -5248], [50688, -35840], [346112, -244736], [2363392, -1671168], [16138240, -11411456], ... _Kival Ngaokrajang_, Dec 14 2014
		

References

  • S. Falcon, Iterated Binomial Transforms of the k-Fibonacci Sequence, British Journal of Mathematics & Computer Science, 4 (22): 2014.

Crossrefs

Programs

Formula

a(n) = 8*(a(n-1)-a(n-2)), a(-1)=0, a(0)=1.
a(n) = S(n, 2*sqrt(2))*(2*sqrt(2))^n with S(n, x) := U(n, x/2), Chebyshev's polynomials of the 2nd kind, A049310.
a(2*k) = A002315(k)*8^k, a(2*k+1) = A001109(k+1)*8^(k+1).
G.f.: 1/(1-8*x+8*x^2).
a(n) = Sum_{k, 0<=k<=n} A109466(n,k)*8^k. [Philippe Deléham, Oct 28 2008]
Binomial transform of A002315. [Al Hakanson (hawkuu(AT)gmail.com), Aug 15 2009]

A123335 a(n) = -2*a(n-1) + a(n-2) for n>1, a(0)=1, a(1)=-1.

Original entry on oeis.org

1, -1, 3, -7, 17, -41, 99, -239, 577, -1393, 3363, -8119, 19601, -47321, 114243, -275807, 665857, -1607521, 3880899, -9369319, 22619537, -54608393, 131836323, -318281039, 768398401, -1855077841, 4478554083, -10812186007, 26102926097, -63018038201, 152139002499
Offset: 0

Views

Author

Philippe Deléham, Jun 27 2007

Keywords

Comments

Inverse binomial transform of A077957.
The inverse of the g.f. is 3-x-2/(1+x) which generates 1, 1, -2, +2, -2, +2, ... (-2, +2 periodically continued). - Gary W. Adamson, Jan 10 2011
Pisano period lengths: 1, 1, 8, 4, 12, 8, 6, 4, 24, 12, 24, 8, 28, 6, 24, 8, 16, 24, 40, 12, ... - R. J. Mathar, Aug 10 2012
a(n) is the rational part of the Q(sqrt(2)) integer (sqrt(2) - 1)^n = a(n) + A077985(n-1)*sqrt(2), with A077985(-1) = 0. - Wolfdieter Lang, Dec 07 2014
3^n*a(n) = A251732(n) gives the rational part of the integer in Q(sqrt(2)) giving the length of a variant of Lévy's C-curve at iteration step n. - Wolfdieter Lang, Dec 07 2014
Define u(0) = 1/0, u(1) = -1/1, and u(n) = -(8 + 3*u(n-1)*u(n-2))/(3*u(n-1) + 2*u(n-2)) for n>1. Then u(n) = a(n)/A000219(n). - Michael Somos, Apr 19 2022

Examples

			G.f. = 1 - x + 3*x^2 - 7*x^3 + 17*x^4 - 41*x^5 + 99*x^6 + ... - _Michael Somos_, Apr 19 2022
		

Crossrefs

Cf. A000129, A001333, A077985, A251732, A001541 (bisection), A002315 (bisection).

Programs

  • Magma
    [Round(1/2*((-1-Sqrt(2))^n+(-1+Sqrt(2))^n)): n in [0..30]]; // G. C. Greubel, Oct 12 2017
  • Maple
    a:= n-> (M-> M[2, 1]+M[2, 2])(<<2|1>, <1|0>>^(-n)):
    seq(a(n), n=0..33);  # Alois P. Heinz, Jun 22 2021
  • Mathematica
    LinearRecurrence[{-2,1},{1,-1},40] (* Harvey P. Dale, Nov 03 2011 *)
  • PARI
    x='x+O('x^50); Vec((1+x)/(1+2*x-x^2)) \\ G. C. Greubel, Oct 12 2017
    
  • PARI
    {a(n) = real((-1 + quadgen(8))^n)}; /* Michael Somos, Apr 19 2022 */
    

Formula

a(n) = (-1)^n*A001333(n).
G.f.: (1+x)/(1+2*x-x^2).
a(n) = A077985(n) + A077985(n-1). - R. J. Mathar, Mar 28 2011
G.f.: G(0)/2, where G(k) = 1 + 1/(1 - x*(2*k-1)/(x*(2*k+1) + 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 19 2013
G.f.: 1/(1 + x/(1 + 2*x/(1 - x))). - Michael Somos, Apr 19 2022
E.g.f.: exp(-x)*cosh(sqrt(2)*x). - Stefano Spezia, Feb 01 2023

Extensions

Corrected by N. J. A. Sloane, Oct 05 2008

A254006 a(0) = 1, a(n) = 3*a(n-2) if n mod 2 = 0, otherwise a(n) = 0.

Original entry on oeis.org

1, 0, 3, 0, 9, 0, 27, 0, 81, 0, 243, 0, 729, 0, 2187, 0, 6561, 0, 19683, 0, 59049, 0, 177147, 0, 531441, 0, 1594323, 0, 4782969, 0, 14348907, 0, 43046721, 0, 129140163, 0, 387420489, 0, 1162261467, 0, 3486784401, 0, 10460353203, 0, 31381059609, 0, 94143178827
Offset: 0

Views

Author

Kival Ngaokrajang, Jan 26 2015

Keywords

Comments

Inspired by the Lévy C-curve, and generated using different construction rules as shown in the links.
The length of this variant Lévy C-curve is an integer in the real quadratic number field Q(sqrt(3)), namely L(n) = A(n) + B(n)*sqrt(3) with A(n) = a(n) and B(n) = a(n-1), with a(0) = 1. See the construction rule and the illustration in the links.
Powers of 3 interspersed with zeros. - Colin Barker, Jan 26 2015

Crossrefs

Programs

  • Mathematica
    nxt[{n_,a_,b_}]:={n+1,b,If[OddQ[n],3a,0]}; Transpose[NestList[nxt,{1,1,0},50]][[2]] (* or *) With[{nn=25},Riffle[3^Range[0,nn],0]] (* Harvey P. Dale, Nov 30 2015 *)
  • PARI
    {
    a=1; print1(a,", ");
    for (n=1,100,
         if (Mod(n,2)==0,
             a=a*3;
             print1(a,", "),
             print1(0,", ")
         )
    )
    }
    
  • PARI
    Vec(-1/(3*x^2-1) + O(x^100)) \\ Colin Barker, Jan 26 2015
    
  • PARI
    a(n) = if(n%2==0,3^(n/2),0) \\ Jason Yuen, Mar 24 2025

Formula

a(n) = 3*a(n-2) if n mod 2 = 0, otherwise a(n) = 0, a(0) = 1.
a(n) = (3^(n/2)*(1+(-1)^n))/2. - Colin Barker, Jan 26 2015
G.f.: -1 / (3*x^2-1). - Colin Barker, Jan 26 2015

A251733 a(n) = 3^n*A077985(n-1), A077985(-1) = 0. Irrational parts of the integers in Q(sqrt(2)) giving the length of a Lévy C-curve variant at iteration step n.

Original entry on oeis.org

0, 3, -18, 135, -972, 7047, -51030, 369603, -2676888, 19387755, -140418522, 1017000927, -7365772260, 53347641903, -386377801758, 2798395587675, -20267773741872, 146792202740307, -1063163180118690, 7700108905374903, -55769122053317628, 403915712468279895
Offset: 0

Views

Author

Kival Ngaokrajang, Dec 07 2014

Keywords

Comments

The rational parts are given in A251732.
Inspired by the Lévy C-curve, and generated using different construction rules as shown in the links.
The length of this variant Lévy C-curve is an integer in the real quadratic number field Q(sqrt(2)), namely L(n) = A(n) + B(n)*sqrt(2) with A(n) = A251732(n) = 3^n*A123335(n) and B(n) = a(n) = 3^n*A077985(n-1), with A077985(-1) = 0. See the construction rule and the illustration in the links.
The total length of the Lévy C-curve after n iterations is sqrt(2^n), also an integer in Q(sqrt(2)). The fractal dimension of the Lévy C-curve is 2, but for this modified case it is log(3)/log(1+sqrt(2)) = 1.2464774357... .

Crossrefs

Programs

  • Magma
    [Round(((3*(-1+Sqrt(2)))^n - (-3*(1+Sqrt(2)))^n)/(2*Sqrt(2))): n in [0..30]]; // G. C. Greubel, Nov 18 2017
  • Mathematica
    LinearRecurrence[{-6,9}, {0,3}, 30] (* G. C. Greubel, Nov 18 2017 *)
  • PARI
    concat(0, Vec(-3*x / (9*x^2-6*x-1) + O(x^100))) \\ Colin Barker, Dec 07 2014
    

Formula

a(n) = 3^n*A077985(n-1), A077985(-1) = 0.
G.f.: 3*x /(1 + 6*x - 9*x^2). See the Colin Barker, Dec 07 2014 program.
a(n) = ((3*(-1+sqrt(2)))^n - (-3*(1+sqrt(2)))^n)/(2*sqrt(2)). - Colin Barker, Jan 21 2017
E.g.f.: exp(-3*x)*sinh(3*sqrt(2)*x)/sqrt(2). - Stefano Spezia, Feb 01 2023

Extensions

More terms from Colin Barker, Dec 07 2014
Edited: see A251732. - Wolfdieter Lang, Dec 07 2014
Showing 1-5 of 5 results.