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

A153772 a(n) = (2^n + 2*(-1)^n - 6)/3.

Original entry on oeis.org

-1, -2, 0, 0, 4, 8, 20, 40, 84, 168, 340, 680, 1364, 2728, 5460, 10920, 21844, 43688, 87380, 174760, 349524, 699048, 1398100, 2796200, 5592404, 11184808, 22369620, 44739240, 89478484, 178956968, 357913940, 715827880
Offset: 0

Views

Author

Paul Curtz, Jan 01 2009

Keywords

Comments

The array of T(n,k) with T(0,k) = A141325(k) and successive differences T(n,k) = T(n-1,k+1) - T(n-1,k) in further rows is
1, 1, 1, 1, 3, 5, 9, 13, 21, 33, 55,..
0, 0, 0, 2, 2, 4, 4, 8, 12, 22,..
0, 0, 2, 0, 2, 0, 4, 4, 10,...
0, 2, -2, 2, -2, 4, 0, 6,..
2, -4, 4, -4, 6, -4, 6,..
-6, 8, -8, 10, -10, 10,...
with T(n,n) = A078008(n), T(n,n+1) = -A167030(n), T(n,n+2) = A128209(n), T(n,n+3) = -a(n). All these sequences along the diagonals obey the recurrences a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) and a(n) = 5*a(n-2) - 4*a(n-4).
Conjecture: For n >= 6, a(n) is the third largest natural number whose Collatz orbit has length n+2. - Markus Sigg, Sep 14 2020

Crossrefs

Programs

  • Magma
    [2^n/3 +2*(-1)^n/3-2: n in [0..40]]; // Vincenzo Librandi, Aug 07 2011
    
  • Mathematica
    Table[(2^n + 2*(-1)^n - 6)/3, {n,0,25}] (* or *) LinearRecurrence[{2, 1, -2}, {-1, -2, 0}, 25] (* G. C. Greubel, Aug 27 2016 *)
  • PARI
    a(n)=(2^n+2*(-1)^n-6)/3 \\ Charles R Greathouse IV, Aug 28 2016

Formula

a(n) = A078008(n) - 2.
a(n) = +2*a(n-1) +a(n-2) -2*a(n-3).
a(n) = a(n-1) + 2*a(n-2) + 4.
G.f.: (1 - 5*x^2) / ( (1-x)*(2*x-1)*(1+x) ).
E.g.f.: (1/3)*(2*exp(-x) - 6*exp(x) + exp(2*x)). - G. C. Greubel, Aug 27 2016
a(n) = 4*A000975(n-3) for n >= 3. - Markus Sigg, Sep 14 2020

A140413 a(2n) = A000045(6n) + 1, a(2n+1) = A000045(6n+3) - 1.

Original entry on oeis.org

1, 1, 9, 33, 145, 609, 2585, 10945, 46369, 196417, 832041, 3524577, 14930353, 63245985, 267914297, 1134903169, 4807526977, 20365011073, 86267571273, 365435296161, 1548008755921, 6557470319841, 27777890035289, 117669030460993, 498454011879265, 2111485077978049
Offset: 0

Views

Author

Paul Curtz, Jun 17 2008

Keywords

Crossrefs

Programs

  • GAP
    a:=[1,1,9];; for n in [4..30] do a[n]:=3*a[n-1]+5*a[n-2]+a[n-3]; od; a; # G. C. Greubel, Jun 08 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-x)^2/((1+x)*(1-4*x-x^2)) )); // G. C. Greubel, Jun 08 2019
    
  • Mathematica
    LinearRecurrence[{3,5,1},{1,1,9},30] (* or *) CoefficientList[Series[ (1-x)^2/((1+x)(1-4*x-x^2)),{x,0,30}],x] (* Harvey P. Dale, Jun 20 2011 *)
  • PARI
    Vec((1-x)^2/((1+x)*(1-4*x-x^2)) + O(x^30)) \\ Colin Barker, Jun 06 2017
    
  • Sage
    ((1-x)^2/((1+x)*(1-4*x-x^2))).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Jun 08 2019
    

Formula

a(n) = A141325(3*n) = (-1)^n + A014445(n).
a(n) = +3*a(n-1) +5*a(n-2) +a(n-3). - R. J. Mathar, Dec 17 2010
G.f.: (1-x)^2 / ( (1+x)*(1-4*x-x^2) ). - R. J. Mathar, Dec 17 2010
a(n) = ((-1)^n + (-(2-sqrt(5))^n + (2+sqrt(5))^n) / sqrt(5)). - Colin Barker, Jun 06 2017
a(n) = -A033887(n) + 2*Sum_{k=0..n} A033887(k)*(-1)^(n-k). - Yomna Bakr and Greg Dresden, Jun 03 2024

A140096 a(n) = A000045(n) - A113405(n).

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, -1, -7, -23, -59, -139, -311, -677, -1443, -3031, -6295, -12967, -26543, -54073, -109743, -222071, -448323, -903411, -1817767, -3653245, -7335147, -14716663, -29508351, -59138095, -118472607
Offset: 0

Views

Author

Paul Curtz, Jun 21 2008

Keywords

Comments

Because the inverse binomial transform of A000045 and A113405 is individually the same as the original sequence up to a sign flip of each second term, the same is true for their difference here. (The inverse binomial transform is a linear transform.)
The sequence and its higher order differences in subsequent rows has zeros on the main diagonal:
0, 1, 1, 1, 1, 1, 1, -1, -7,-23, -59, -139, -311, -677, -1443, -3031
1, 0, 0, 0, 0, 0, -2, -6,-16,-36, -80, -172, -366, -766, -1588, -3264
-1, 0, 0, 0, 0,-2, -4,-10,-20,-44, -92, -194, -400, -822, -1676
1, 0, 0, 0,-2,-2, -6,-10,-24,-48,-102, -206, -422, -854, -1732
-1, 0, 0,-2, 0,-4, -4,-14,-24,-54,-104, -216, -432, -878, -1764
1, 0,-2, 2,-4, 0,-10,-10,-30,-50,-112, -216, -446, -886, -1790,
-1,-2, 4,-6, 4,-10, 0,-20,-20,-62,-104, -230, -440, -904, -1792

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[-x*(-1 + 2*x + x^2 - 2*x^3 + x^4)/((2*x - 1)*(1 + x)*(x^2 - x + 1)*(x^2 + x - 1)), {x, 0, 50}], x] (* G. C. Greubel, Jul 17 2017 *)
  • PARI
    x='x+O('x^50); concat([0], Vec(-x*(-1+2*x+x^2-2*x^3+x^4)/( (2*x-1)*(1+x)*(x^2-x+1)*(x^2+x-1) ))) \\ G. C. Greubel, Jul 17 2017

Formula

a(n)= +3*a(n-1) -a(n-2) -3*a(n-3) +3*a(n-4) -a(n-5) -2*a(n-6).
G.f.: -x*(-1+2*x+x^2-2*x^3+x^4) / ( (2*x-1)*(1+x)*(x^2-x+1)*(x^2+x-1) ).
a(n+1)-2*a(n) = -A141325(n-2), n>2.

A290968 a(n) = a(n-1) + a(n-2) - a(n-3) + a(n-4) + a(n-5), with a(0)=a(1)=a(2)=1, a(3)=-1 and a(4)=1.

Original entry on oeis.org

1, 1, 1, -1, 1, 1, 5, 5, 9, 11, 21, 33, 57, 89, 145, 231, 377, 609, 989, 1597, 2585, 4179, 6765, 10945, 17713, 28657, 46369, 75023, 121393, 196417, 317813, 514229, 832041, 1346267, 2178309, 3524577, 5702889, 9227465, 14930353, 24157815
Offset: 0

Views

Author

Keywords

Comments

The array of successive differences begins:
1, 1, 1, -1, 1, 1, 5, 5, 9, 11, 21, 33, 57, ...
0, 0, -2, 2, 0, 4, 0, 4, 2, 10, 12, 24, 32, ...
0, -2, 4, -2, 4, -4, 4, -2, 8, 2, 12, 8, 24, ...
-2, 6, -6, 6, -8, 8, -6, 10, -6, 10, -4, 16, 6, ...
8, -12, 12, -14, 16, -14, 16, -16, 16, -14, 20, -10, 24, ...
...
First row is a(n) = 2*A141325(n) - A141325(n+1).
Main diagonal is A099430(n).
The first upper subdiagonal, 1, -2, -2, -8, -14, ..., has -3*A078008(n) as first differences.
The second upper subdiagonal is A000079(n) = 2^n.
a(n) is related to Fibonacci numbers a(n) = A000045(n-2) + period 6: repeat [2, 0, 1, -2, 0, -1].

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1-x^2-2*x^3+x^4)/((1+x^3)*(1-x-x^2)) )); // G. C. Greubel, Jun 11 2019
    
  • Mathematica
    LinearRecurrence[{1,1,-1,1,1}, {1,1,1,-1,1}, 40]
  • PARI
    my(x='x+O('x^40)); Vec((1-x^2-2*x^3+x^4)/((1+x^3)*(1-x-x^2))) \\ G. C. Greubel, Jun 11 2019
    
  • Sage
    ((1-x^2-2*x^3+x^4)/((1+x^3)*(1-x-x^2))).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Jun 11 2019

Formula

G.f.: (1-x^2-2*x^3+x^4)/((1+x)*(1-x+x^2)*(1-x-x^2)).
a(n) ~ phi^(n-2)/sqrt(5), where phi is the golden ratio.
a(n) = (1/2 + sqrt(5)/2)^n*(3*sqrt(5)/10-1/2) - (-1/2 + sqrt(5)/2)^n*(3*sqrt(5)/10 + 1/2)*(-1)^n + 2*sqrt(3)*sin(Pi*(n/3 + 1/3))/3 + (-1)^n. - Eric Simon Jacob, Jul 11 2024
Showing 1-4 of 4 results.