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.

A054881 Number of walks of length n along the edges of an octahedron starting and ending at a vertex and also ( with a(0)=0 ) between two opposite vertices.

Original entry on oeis.org

1, 0, 4, 8, 48, 160, 704, 2688, 11008, 43520, 175104, 698368, 2797568, 11182080, 44744704, 178946048, 715849728, 2863267840, 11453333504, 45812809728, 183252287488, 733007052800, 2932032405504, 11728121233408
Offset: 0

Views

Author

Paolo Dominici (pl.dm(AT)libero.it), May 23 2000

Keywords

Crossrefs

Programs

  • Magma
    [(4^n+(-1)^n*2^(n+1)+3*0^n)/6: n in [0..30]]; // Vincenzo Librandi, Apr 23 2015
    
  • Mathematica
    CoefficientList[Series[(1-2*x-4*x^2)/((1+2x)*(1-4x)), {x,0,40}], x] (* L. Edson Jeffery, Apr 22 2015 *)
    LinearRecurrence[{2,8}, {1,0,4}, 41] (* G. C. Greubel, Feb 06 2023 *)
  • SageMath
    [(4^n + (-1)^n*2^(n+1) + 3*0^n)/6 for n in range(31)] # G. C. Greubel, Feb 06 2023

Formula

a(n) = 4*A003683(n-1) + 0^n/2, n >= 0.
a(n) = (4^n + (-1)^n*2^(n+1) + 3*0^n)/6.
G.f.: (1/6)*(3 + 2/(1+2*x) + 1/(1-4*x)).
From L. Edson Jeffery, Apr 22 2015: (Start)
G.f.: (1-2*x-4*x^2)/((1+2*x)*(1-4*x)).
a(n) = 8*A246036(n-3) + 0^n/2, n >= 0. (End)
a(n) = 2^n*A001045(n-1) + (1/2)*[n=0] = 2^n*(2^(n-1) + (-1)^n)/3 + (1/2)*[n=0], n >= 0. - Ralf Steiner, Aug 27 2020, edited by M. F. Hasler, Sep 11 2020
E.g.f.: (1/6)*(exp(4*x) + 2*exp(-2*x) + 3). - G. C. Greubel, Feb 06 2023

A140944 Triangle T(n,k) read by rows, the k-th term of the n-th differences of the Jacobsthal sequence A001045.

Original entry on oeis.org

0, 1, 0, -1, 2, 0, 3, -2, 4, 0, -5, 6, -4, 8, 0, 11, -10, 12, -8, 16, 0, -21, 22, -20, 24, -16, 32, 0, 43, -42, 44, -40, 48, -32, 64, 0, -85, 86, -84, 88, -80, 96, -64, 128, 0, 171, -170, 172, -168, 176, -160, 192, -128, 256, 0, -341, 342, -340, 344, -336, 352, -320, 384, -256, 512, 0
Offset: 0

Views

Author

Paul Curtz, Jul 24 2008

Keywords

Comments

A variant of the triangle A140503, now including the diagonal.
Since the diagonal contains zeros, rows sums are those of A140503.

Examples

			Triangle begins as:
    0;
    1,   0;
   -1,   2,   0;
    3,  -2,   4,  0;
   -5,   6,  -4,  8,   0;
   11, -10,  12, -8,  16,  0;
  -21,  22, -20, 24, -16, 32,  0;
		

Crossrefs

Programs

  • Magma
    [2^k*(1-(-2)^(n-k))/3: k in [0..n], n in [0..15]]; // G. C. Greubel, Feb 18 2023
    
  • Maple
    A001045:= n -> (2^n-(-1)^n)/3;
    A140944:= proc(n,k) if n = 0 then A001045(k); else procname(n-1,k+1)-procname(n-1,k) ; fi; end:
    seq(seq(A140944(n,k),k=0..n),n=0..10); # R. J. Mathar, Sep 07 2009
  • Mathematica
    T[0, 0]=0; T[1, 0]= T[0, 1]= 1; T[0, k_]:= T[0, k]= T[0, k-1] + 2*T[0, k-2]; T[n_, n_]=0; T[n_, k_]:= T[n, k] = T[n-1, k+1] - T[n-1, k]; Table[T[n, k], {n, 0, 10}, {k, 0, n}]//Flatten (* Jean-François Alcover, Dec 17 2014 *)
    Table[2^k*(1-(-2)^(n-k))/3, {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Feb 18 2023 *)
  • PARI
    T(n, k) = (2^k - 2^n*(-1)^(n+k))/3 \\ Jianing Song, Aug 11 2022
    
  • SageMath
    def A140944(n,k): return 2^k*(1 - (-2)^(n-k))/3
    flatten([[A140944(n,k) for k in range(n+1)] for n in range(16)]) # G. C. Greubel, Feb 18 2023

Formula

T(n, k) = T(n-1, k+1) - T(n-1, k). T(0, k) = A001045(k).
T(n, k) = (2^k - 2^n*(-1)^(n+k))/3, for n >= k >= 0. - Jianing Song, Aug 11 2022
From G. C. Greubel, Feb 18 2023: (Start)
T(n, n-1) = A000079(n).
T(2*n, n) = (-1)^(n+1)*A192382(n+1).
T(2*n, n-1) = (-1)^n*A246036(n-1).
T(2*n, n+1) = A083086(n).
T(3*n, n) = -A115489(n).
Sum_{k=0..n} T(n, k) = A052992(n)*[n>0] + 0*[n=0].
Sum_{k=0..n} (-1)^k*T(n, k) = A045883(n).
Sum_{k=0..n} 2^k*T(n, k) = A084175(n).
Sum_{k=0..n} (-2)^k*T(n, k) = (-1)^(n+1)*A109765(n).
Sum_{k=0..n} 3^k*T(n, k) = A091056(n+1).
Sum_{k=0..floor(n/2)} T(n-k, k) = (-1)^(n+1)*A097038(n).
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = (-1)^(n+1)*A138495(n). (End)

Extensions

Edited and extended by R. J. Mathar, Sep 07 2009

A246037 Number of odd terms in f^n, where f = (1/x+1+x)*(1/y+y).

Original entry on oeis.org

1, 6, 6, 20, 6, 36, 20, 88, 6, 36, 36, 120, 20, 120, 88, 336, 6, 36, 36, 120, 36, 216, 120, 528, 20, 120, 120, 400, 88, 528, 336, 1376, 6, 36, 36, 120, 36, 216, 120, 528, 36, 216, 216, 720, 120, 720, 528, 2016, 20, 120, 120, 400, 120, 720, 400, 1760, 88, 528, 528, 1760, 336, 2016, 1376, 5440
Offset: 0

Views

Author

N. J. A. Sloane, Aug 21 2014

Keywords

Comments

This is the number of ON cells in a certain 2-D CA in which the neighborhood of a cell is defined by f, and in which a cell is ON iff there was an odd number of ON cells in the neighborhood at the previous generation.
This is the odd-rule cellular automaton defined by OddRule 077 (see Ekhad-Sloane-Zeilberger "Odd-Rule Cellular Automata on the Square Grid" link).
Run Length Transform of A246036.
The Run Length Transform of a sequence {S(n), n>=0} is defined to be the sequence {T(n), n>=0} given by T(n) = Product_i S(i), where i runs through the lengths of runs of 1's in the binary expansion of n. E.g. 19 is 10011 in binary, which has two runs of 1's, of lengths 1 and 2. So T(19) = S(1)*S(2). T(0)=1 (the empty product).

Examples

			Here is the neighborhood:
[X, X, X]
[0, 0, 0]
[X, X, X]
which contains a(1) = 6 ON cells.
		

Crossrefs

Other CA's that use the same rule but with different cell neighborhoods: A160239, A102376, A071053, A072272, A001316, A246034, A246035.
Cf. A246036.

Programs

  • Maple
    C:=f->subs({x=1, y=1}, f);
    # Find number of ON cells in CA for generations 0 thru M defined by rule
    # that cell is ON iff number of ON cells in nbd at time n-1 was odd
    # where nbd is defined by a polynomial or Laurent series f(x, y).
    OddCA:=proc(f, M) global C; local n, a, i, f2, p;
    f2:=simplify(expand(f)) mod 2;
    a:=[]; p:=1;
    for n from 0 to M do a:=[op(a), C(p)]; p:=expand(p*f2) mod 2; od:
    lprint([seq(a[i], i=1..nops(a))]);
    end;
    f:=(1/x+1+x)*(1/y+y);
    OddCA(f, 70);
  • Mathematica
    (* f = A246036 *) f[0] = 1; f[n_] := (4^(n+1)-(-2)^n)/3; Table[Times @@ (f[Length[#]]&) /@ Select[s = Split[IntegerDigits[n, 2]], #[[1]] == 1&], {n, 0, 63}] (* Jean-François Alcover, Jul 12 2017 *)

A271494 Expansion of (1+16*x)/((1+4*x)*(1-8*x)).

Original entry on oeis.org

1, 20, 112, 1088, 7936, 66560, 520192, 4210688, 33488896, 268697600, 2146435072, 17184063488, 137422176256, 1099578736640, 8795824586752, 70369817919488, 562945658454016, 4503616807239680, 36028728299487232, 288230651029618688, 2305841909702066176, 18446748471756062720
Offset: 0

Views

Author

N. J. A. Sloane, Apr 15 2016

Keywords

Comments

Sixth moments of the Rudin-Shapiro polynomials.

References

  • Shalosh B. Ekhad, Explicit Generating Functions, Asymptotics, and More for the First 10 Even Moments of the Rudin-Shapiro Polynomials, Preprint, 2016.
  • Doron Zeilberger, Personal Communication to N. J. A. Sloane, Apr 15 2016.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1+16x)/((1+4x)(1-8x)),{x,0,30}],x] (* or *) LinearRecurrence[{4,32},{1,20},30] (* Harvey P. Dale, May 13 2017 *)
  • PARI
    Vec((1+16*x)/((1+4*x)*(1-8*x)) + O(x^50)) \\ Colin Barker, Apr 17 2016

Formula

From Colin Barker, Apr 17 2016: (Start)
a(n) = 2^(1+3*n)-(-4)^n.
a(n) = 4*a(n-1) + 32*a(n-2) for n>1.
(End)
a(n) = 4^n*A014551(n+1). - R. J. Mathar, Mar 08 2021

A271495 Eighth moments of the Rudin-Shapiro polynomials.

Original entry on oeis.org

1, 70, 668, 14104, 198640, 3420256, 53143488, 864838016, 13714054912, 220102985216, 3513567575040, 56284226394112, 900460612808704, 14414430456537088, 230619566685274112, 3689872453256970240, 59031392914560188416, 944463240632040030208, 15111217402853747064832
Offset: 0

Views

Author

N. J. A. Sloane, Apr 15 2016

Keywords

References

  • Shalosh B. Ekhad, Explicit Generating Functions, Asymptotics, and More for the First 10 Even Moments of the Rudin-Shapiro Polynomials, Preprint, 2016.
  • Doron Zeilberger, Personal Communication to N. J. A. Sloane, Apr 15 2016.

Crossrefs

Formula

G.f.: -(90194313216*t^11 -15300820992*t^10 -1979711488*t^9 -292552704*t^8 -22216704*t^7 +10649600*t^6 -1024*t^5 -144384*t^4 +7008*t^3 +664*t^2 -54*t -1) / (8*t+1) / (16*t-1) / (1409286144*t^10 -264241152*t^9 -25690112*t^8 -4128768*t^7 -311296*t^6 +170496*t^5 -2624*t^4 -2208*t^3 +148*t^2 +8*t -1).

A271496 Tenth moments of the Rudin-Shapiro polynomials.

Original entry on oeis.org

1, 252, 4144, 187328, 5143296, 182336512, 5664518144, 185202884608, 5854499373056, 187705543360512, 5987197055401984, 191926028833128448, 6145480467693961216, 196854507263106220032, 6299857999165520871424, 201565743393381566906368, 6448321065980862740299776
Offset: 0

Views

Author

N. J. A. Sloane, Apr 15 2016

Keywords

References

  • Shalosh B. Ekhad, Explicit Generating Functions, Asymptotics, and More for the First 10 Even Moments of the Rudin-Shapiro Polynomials, Preprint, 2016.
  • Doron Zeilberger, Personal Communication to N. J. A. Sloane, Apr 15 2016.

Crossrefs

Formula

G.f.: -(369435906932736*t^11 -32160715112448*t^10 -2001454759936*t^9 -145223581696*t^8 -4454350848*t^7 +1392508928*t^6 -5865472*t^5 -4599808*t^4 +123648*t^3 +4768*t^2 -220*t -1) / (1+16*t) / (32*t-1) / (1443109011456*t^10 -135291469824*t^9 -6576668672*t^8 -528482304*t^7 -19922944*t^6 +5455872*t^5 -41984*t^4 -17664*t^3 +592*t^2 +16*t -1)

A352692 a(n) + a(n+1) = 2^n for n >= 0 with a(0) = 4.

Original entry on oeis.org

4, -3, 5, -1, 9, 7, 25, 39, 89, 167, 345, 679, 1369, 2727, 5465, 10919, 21849, 43687, 87385, 174759, 349529, 699047, 1398105, 2796199, 5592409, 11184807, 22369625, 44739239, 89478489, 178956967, 357913945, 715827879, 1431655769, 2863311527, 5726623065, 11453246119, 22906492249
Offset: 0

Views

Author

Paul Curtz, Mar 29 2022

Keywords

Comments

Difference table D(n,k) = D(n-1,k+1) - D(n-1,k), D(0,k) = a(k):
4, -3, 5, -1, 9, 7, 25, ...
-7, 8, -6, 10, -2, 18, 14, 50, ...
15, -14, 16, -12, 20, -4, 36, 28, 100, ...
-29, 30, -28, 32, -24, 40, -8, 72, 56, 200, ...
59, -58, 60, -56, 64, -48, 80, -16, 144, 112, 400, ...
...
The diagonals are given by D(n,n+k) = a(k)*2^n.
D(n,1) = -(-1)^n* A340627(n).
a(n) - a(n) = 0, 0, 0, 0, 0, ... (trivially)
a(n+1) + a(n) = 1, 2, 4, 8, 16, ... = 2^n (by definition)
a(n+2) - a(n) = 1, 2, 4, 8, 16, ... = 2^n
a(n+3) + a(n) = 3, 6, 12, 24, 48, ... = 2^n*3
a(n+4) - a(n) = 5, 10, 20, 40, 80, ... = 2^n*5
a(n+5) + a(n) = 11, 22, 44, 88, 176, ... = 2^n*11
(...)
This table is given by T(r,n) = A001045(r)*2^n with r, n >= 0.
Sums of antidiagonals are A045883(n).
Main diagonal: A192382(n).
First upper diagonal: A054881(n+1).
First subdiagonal: A003683(n+1).
Second subdiagonal: A246036(n).
Now consider the array from c(n) = (-1)^n*a(n) with its difference table:
4, 3, 5, 1, 9, -7, 25, -39, ... = c(n)
-1, 2, -4, 8, -16, 32, -64, 128, ... = -A122803(n)
3, -6, 12, -24, 48, -96, 192, -384, ... =
-9, 18, -36, 72, -144, 288, -576, 1152, ...
27, -54, 108, -216, 432, -864, 1728, -3456, ...
...
The first subdiagonal is -A000400(n). The second is A169604(n).

Crossrefs

If a(0) = k then A001045 (k=0), A078008 (k=1), A140966 (k=2), A154879 (k=3), this sequence (k=4).
Essentially the same as A115335.

Programs

  • Maple
    a := proc(n) option remember; ifelse(n = 0, 4, 2^(n-1) - a(n-1)) end: # Peter Luschny, Mar 29 2022
    A352691 := proc(n)
        (11*(-1)^n + 2^n)/3
    end proc: # R. J. Mathar, Apr 26 2022
  • Mathematica
    LinearRecurrence[{1, 2}, {4, -3}, 40] (* Amiram Eldar, Mar 29 2022 *)
  • PARI
    a(n) = (11*(-1)^n + 2^n)/3; \\ Thomas Scheuerle, Mar 29 2022

Formula

abs(a(n)) = A115335(n-1) for n >= 1.
a(3*n) - (-1)^n*4 = A132805(n).
a(3*n+1) + (-1)^n*4 = A082311(n).
a(3*n+2) - (-1)^n*4 = A082365(n).
From Thomas Scheuerle, Mar 29 2022: (Start)
G.f.: (-4 + 7*x)/(-1 + x + 2*x^2).
Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*a(m + 2*n-k) = a(m)*2^n.
Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*a(1 + n-k) = -(-1)^n*A340627(n).
a(n) = (11*(-1)^n + 2^n)/3.
a(n + 2*m) = a(n) + A002450(m)*2^n.
a(2*n) = A192382(n+1) + (-1)^n*a(n).
a(n) = ( A045883(n) - Sum_{k=0..n-1}(-1)^k*a(k) )/n, for n > 0. (End)
a(n) = A001045(n) + 4*(-1)^n.
a(n+1) = 2*a(n) -11*(-1)^n.
a(n+2) = a(n) + 2^n.
a(n+4) = a(n) + A020714(n).
a(n+6) = a(n) + A175805(n).
a(2*n) = A163868(n).
a(2*n+1) = (2^(2*n+1) - 11)/3.

Extensions

Warning: The DATA is correct, but there may be errors in the COMMENTS, which should be rechecked. - Editors of OEIS, Apr 26 2022
Edited by M. F. Hasler, Apr 26 2022.
Showing 1-7 of 7 results.