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

A178885 Partial sums of Berstel sequence (A007420).

Original entry on oeis.org

0, 0, 1, 3, 3, -1, -1, 15, 31, -1, -65, -1, 255, 255, -513, -1025, 1023, 4095, -1, -12289, -8193, 32767, 49151, -65537, -196609, 65535, 655359, 262143, -1835009, -2097153, 4194303, 9437183, -6291457, -33554433, -4194305, 100663295, 83886079, -251658241
Offset: 0

Views

Author

Jonathan Vos Post, Dec 28 2010

Keywords

Comments

The subsequence of unique primes begins 3, 31, -12289, -65537. What is the next prime in the sequence?
The next prime in the sequence is -113249697660929, followed by 289815643220546158591. - Harvey P. Dale, May 15 2016

Crossrefs

Cf. A007420.

Programs

  • Mathematica
    LinearRecurrence[{3,-6,8,-4},{0,0,1,3},50] (* Harvey P. Dale, May 15 2016 *)

Formula

a(n) = Sum_{i=0..n} A007420(i) = Sum_{i=0..n} a(n+1) = 2*a(i)-4*a(i-1)+4*a(i-2).
G.f.: -x^2*(256*x^11-512*x^10+384*x^9-192*x^8+64*x^7-1) / ((x-1)*(4*x^3-4*x^2+2*x-1)). - Colin Barker, Apr 20 2013

Extensions

Corrected by Harvey P. Dale, May 15 2016

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

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Nov 17 2002, Jun 17 2007

Keywords

Comments

Essentially the same as A077980.

Crossrefs

Cf. A077980.
Cf. A007420, A077925. - Reinhard Zumkeller, Oct 07 2008

Programs

  • GAP
    a:=[1,1,-1];; for n in [4..50] do a[n]:=a[n-1]-2*a[n-2]+2*a[n-3]; od; a; # G. C. Greubel, Aug 07 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 50); Coefficients(R!( 1/(1-x+2*x^2-2*x^3) )); // G. C. Greubel, Aug 07 2019
    
  • Maple
    seq(coeff(series(1/(1-x+2*x^2-2*x^3), x, n+1), x, n), n = 0 .. 40); # G. C. Greubel, Aug 07 2019
  • Mathematica
    CoefficientList[Series[1/(1-x+2x^2-2x^3),{x,0,50}],x] (* or *) LinearRecurrence[{1,-2,2},{1,1,-1},50] (* Harvey P. Dale, Aug 27 2014 *)
  • PARI
    Vec(1/(1-x+2*x^2-2*x^3)+O(x^50)) \\ Charles R Greathouse IV, Sep 25 2012
    
  • Sage
    (1/(1-x+2*x^2-2*x^3)).series(x, 50).coefficients(x, sparse=False) # G. C. Greubel, Aug 07 2019
    

Formula

From Reinhard Zumkeller, Oct 07 2008: (Start)
a(n+1) = a(n) - 2*a(n-1) + 2*a(n-2).
a(n) = A077925(floor(n/2)-1) for n>1. (End)

A035302 a(n+1)=2a(n)-4a(n-1)+4a(n-2).

Original entry on oeis.org

0, 1, -2, -8, -4, 16, 16, -48, -96, 64, 320, 0, -1024, -768, 2560, 4096, -5120, -16384, 4096, 53248, 24576, -147456, -180224, 327680, 786432, -458752, -2752512, -524288, 8126464, 7340032, -19922944, -36700160, 35651584
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A007420.

Programs

  • Haskell
    a035302 n = a035302_list !! (n-1)
    a035302_list = 0 : 1 : (-2) :
       zipWith (+) (drop 2 $ map (* 2) a035302_list)
                   (map (* 4) $ zipWith (-) a035302_list $ tail a035302_list)
    -- Reinhard Zumkeller, Mar 18 2012
  • Mathematica
    LinearRecurrence[{2,-4,4},{0,1,-2},40] (* Harvey P. Dale, Dec 01 2024 *)

Formula

G.f.: (x-4*x^2)/(1-2*x+4*x^2-4*x^3).
Showing 1-3 of 3 results.