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]

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

Original entry on oeis.org

1, -2, 5, -12, 29, -70, 169, -408, 985, -2378, 5741, -13860, 33461, -80782, 195025, -470832, 1136689, -2744210, 6625109, -15994428, 38613965, -93222358, 225058681, -543339720, 1311738121, -3166815962, 7645370045, -18457556052, 44560482149, -107578520350, 259717522849
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Comments

Pisano period lengths: 1, 2, 8, 4, 12, 8, 6, 8, 24, 12, 24, 8, 28, 6, 24, 16, 16, 24, 40, 12, ... (is this A175181?) - R. J. Mathar, Aug 10 2012
The sequence 0, 1, -2, 5, -12, 29, -70, 169, -408, 985, ... with a leading 0 is the Lucas U(-2,-1)-sequence. - R. J. Mathar, Jan 08 2013
From Wolfdieter Lang, Dec 07 2014: (Start)
a(n) is the irrational part of the Q(sqrt(2)) integer (sqrt(2) - 1)^n = A123335(n) + a(n-1)*sqrt(2), with a(-1) = 0.
3^n*a(n-1) = A251733(n), with a(-1) = 0, is the irrational part of the Q(sqrt(2)) integer giving the length of a variant of Lévy's C-curve at iteration step n. (End)

Examples

			G.f. = 1 - 2*x + 5*x^2 - 12*x^3 + 29*x^4 - 70*x^5 + 169*x^6 - 408*x^7 + ...
		

Crossrefs

Essentially the same as A000129, which is the main entry for these numbers.

Programs

  • Magma
    I:=[1,-2]; [n le 2 select I[n] else -2*Self(n-1)+Self(n-2): n in [1..35]]; // Vincenzo Librandi, Jan 21 2017
  • Mathematica
    PSE[a_,b_,n_]:=Join[{1,x=a,y=b},Table[z=Floor[y^2/x+1/2];x=y;y=z,{n}]];A077985=PSE[-2,5,50] (* Vladimir Joseph Stephan Orlovsky, Mar 26 2011 *)
    LinearRecurrence[{-2,1},{1,-2},40] (* Harvey P. Dale, Jun 04 2012 *)
    CoefficientList[Series[1/(1 + 2 x/(1 + x/(2 - x))), {x, 0, 30}], x] (* Vincenzo Librandi, Jan 21 2017 *)
  • PARI
    Vec(1/(1+2*x-x^2)+O(x^99)) \\ Charles R Greathouse IV, Sep 23 2012
    
  • PARI
    {a(n) = if( n<-1, (-1)^n*a(-2-n), polcoeff( 1 / (1 + 2*x - x^2) + x * O(x^n), n))}; /* Michael Somos, Jan 20 2017 */
    
  • PARI
    {a(n) = - imag((-1 - quadgen(8))^(n+1))}; /* Michael Somos, Jan 20 2017 */
    
  • Sage
    taylor( x/(1 + 2*x - x^2) ,x,0,31) # Zerinvary Lajos, May 29 2009
    

Formula

a(n) = (-1)^n * A000129(n+1). - M. F. Hasler, Oct 05 2008
a(0)=1, a(1)=-2, a(n) = -2*a(n-1) + a(n-2) for n>1. - Philippe Deléham, Sep 19 2009
G.f.: 1/(2+Q(0)), where Q(k)= 3*x - 1 + x*k + x*(1-x)*(k+1)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, May 05 2013
G.f.: Q(0)/(2+2*x), where Q(k)= 1 + 1/(1 - x*(2*k-1)/( x*(2*k+1) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 10 2013
G.f.: Q(0)/2, where Q(k) = 1 + 1/(1 - x*(4*k+2 - x )/( x*(4*k+4 - x) - 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Sep 09 2013
G.f.: 1 / (1 + 2*x / (1 + x / (2 - x))). - Michael Somos, Jan 20 2017
a(n) = (-1)^n * a(-2-n) for all n in Z. - Michael Somos, Jan 20 2017
a(n) = (-(-1-sqrt(2))^(1+n) + (-1+sqrt(2))^(1+n)) / (2*sqrt(2)). - Colin Barker, Jan 21 2017
E.g.f.: exp(-x)*(2*cosh(sqrt(2)*x) - sqrt(2)*sinh(sqrt(2)*x))/2. - Stefano Spezia, Feb 01 2023

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

A251732 a(n) = 3^n*A123335(n). Rational 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

1, -3, 27, -189, 1377, -9963, 72171, -522693, 3785697, -27418419, 198581787, -1438256493, 10416775041, -75444958683, 546420727467, -3957528992949, 28662960504897, -207595523965923, 1503539788339611, -10889598445730973, 78869448769442337, -571223078628232779
Offset: 0

Views

Author

Kival Ngaokrajang, Dec 07 2014

Keywords

Comments

The irrational part is given in A251733.
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) = a(n) = 3^n*A123335(n) and B(n) = A251733(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)) (see a comment on A077957). 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... .

Examples

			The first lengths a(n) + A251733(n)*sqrt(2) are:
1, -3 + 3*sqrt(2), 27 - 18*sqrt(2), -189 + 135*sqrt(2), 1377 - 972*sqrt(2), -9963 + 7047*sqrt(2), 72171 - 51030*sqrt(2), -522693 + 369603*sqrt(2), 3785697 - 2676888*sqrt(2), -27418419 + 19387755*sqrt(2), 198581787 - 140418522*sqrt(2), ... - _Wolfdieter Lang_, Dec 08 2014
		

Crossrefs

Programs

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

Formula

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

Extensions

More terms from Colin Barker, Dec 07 2014
Edited: Name specified, Q(sqrt(2))remarks given earlier in a comment to a first version, MathImages link added. - Wolfdieter Lang, Dec 07 2014
Showing 1-5 of 5 results.