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.

Previous Showing 41-50 of 53 results. Next

A208333 Triangle of coefficients of polynomials v(n,x) jointly generated with A208332; see the Formula section.

Original entry on oeis.org

1, 0, 4, 0, 2, 10, 0, 2, 6, 28, 0, 2, 6, 24, 76, 0, 2, 6, 28, 80, 208, 0, 2, 6, 32, 100, 264, 568, 0, 2, 6, 36, 120, 360, 840, 1552, 0, 2, 6, 40, 140, 464, 1232, 2624, 4240, 0, 2, 6, 44, 160, 576, 1680, 4128, 8064, 11584, 0, 2, 6, 48, 180, 696, 2184, 5952
Offset: 1

Views

Author

Clark Kimberling, Feb 26 2012

Keywords

Comments

As triangle T(n,k) with 0 <= k <= n, it is (0, 1/2, 1/2, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (4, -3/2, -1/2, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - Philippe Deléham, Feb 28 2012

Examples

			First five rows:
  1;
  0,  4;
  0,  2, 10;
  0,  2,  6, 28;
  0,  2,  6, 24, 76;
First five polynomials u(n,x):
  1
      4x
      2x + 10x^2
      2x +  6x^2 + 28x^3
      2x +  6x^2 + 24x^3 + 76x^4.
		

Crossrefs

Programs

  • Mathematica
    u[1, x_] := 1; v[1, x_] := 1; z = 13;
    u[n_, x_] := u[n - 1, x] + x*v[n - 1, x];
    v[n_, x_] := 2 x*u[n - 1, x] + 2 x*v[n - 1, x];
    Table[Expand[u[n, x]], {n, 1, z/2}]
    Table[Expand[v[n, x]], {n, 1, z/2}]
    cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
    TableForm[cu]
    Flatten[%]  (* A208332 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]  (* A208333 *)

Formula

u(n,x) = u(n-1,x) + x*v(n-1,x),
v(n,x) = 2x*u(n-1,x) + 2x*v(n-1,x),
where u(1,x)=1, v(1,x)=1.
From Philippe Deléham, Feb 28 2012: (Start)
As triangle with 0 <= k <= n:
T(n,k) = T(n-1,k) + 2*T(n-1,k-1) - 2*T(n-2,k-1) + 2*T(n-2,k-2) with T(0,0) = 1, T(1,0) = 0, T(1,1) = 4 and T(n,k) = 0 if k < 0 or if k > n.
G.f.: (1-x+2*y*x)/(1-x-2*y*x+2*y*x^2-2*y^2*x^2).
T(n,n) = A026150(n+1).
Sum_{k=0..n} T(n,k) = A003946(n). (End)

A084157 a(n) = 8*a(n-1) - 16*a(n-2) + 12*a(n-4) with a(0)=0, a(1)=1, a(2)=4, a(3)=22.

Original entry on oeis.org

0, 1, 4, 22, 112, 556, 2704, 13000, 62080, 295312, 1401664, 6644320, 31472896, 149017792, 705395968, 3338614912, 15800258560, 74772443392, 353840161792, 1674425579008, 7923565146112, 37494981225472, 177428889407488
Offset: 0

Views

Author

Paul Barry, May 16 2003

Keywords

Comments

Binomial transform of A084156.

Crossrefs

Programs

  • Magma
    I:=[0,1,4,22]; [n le 4 select I[n] else 8*Self(n-1) -16*Self(n-2) +12*Self(n-4): n in [1..41]]; // G. C. Greubel, Oct 11 2022
    
  • Mathematica
    LinearRecurrence[{8,-16,0,12},{0,1,4,22},30] (* Harvey P. Dale, Feb 19 2017 *)
  • SageMath
    A083881 = BinaryRecurrenceSequence(6,-6,1,3)
    A026150 = BinaryRecurrenceSequence(2,2,1,1)
    def A084157(n): return (A083881(n) - A026150(n))/2
    [A084157(n) for n in range(41)] # G. C. Greubel, Oct 11 2022

Formula

a(n) = (A083881(n) - A026150(n))/2.
a(n) = 8*a(n-1) - 16*a(n-2) + 12*a(n-4).
a(n) = ((3+sqrt(3))^n + (3-sqrt(3))^n - (1+sqrt(3))^n - (1-sqrt(3))^n)/4.
G.f.: x*(1-4*x+6*x^2)/((1-2*x-2*x^2)*(1-6*x+6*x^2)).
E.g.f.: exp(2*x)*sinh(x)*cosh(sqrt(3)*x).
From G. C. Greubel, Oct 11 2022: (Start)
a(2*n) = A003462(n)*A026150(2*n) = A003462(n)*A080040(2*n)/2.
a(2*n+1) = (1/2)*(3^(n+1)*A002605(2*n+1) - A026150(2*n+1)). (End)

A147518 Expansion of (1-x)/(1-4*x-6*x^2).

Original entry on oeis.org

1, 3, 18, 90, 468, 2412, 12456, 64296, 331920, 1713456, 8845344, 45662112, 235720512, 1216854720, 6281741952, 32428096128, 167402836224, 864179921664, 4461136704000, 23029626345984, 118885325607936, 613719060507648
Offset: 0

Views

Author

Philippe Deléham, Nov 06 2008

Keywords

Comments

Binomial transform of [1,2,13,44,205,...] = A002534(n+1).
a(n) is the number of compositions of n when there are 3 types of 1 and 9 types of other natural numbers. - Milan Janjic, Aug 13 2010

Crossrefs

Programs

  • GAP
    a:=[1,3];; for n in [3..30] do a[n]:=4*a[n-1]+6*a[n-2]; od; a; # G. C. Greubel, Jan 09 2020
  • Magma
    I:=[1,3]; [n le 2 select I[n] else 4*Self(n-1) + 6*Self(n-2): n in [1..30]]; // G. C. Greubel, Jan 09 2020
    
  • Maple
    seq(coeff(series((1-x)/(1-4*x-6*x^2), x, n+1), x, n), n = 0..30); # G. C. Greubel, Jan 09 2020
  • Mathematica
    CoefficientList[Series[(1-x)/(1-4x-6x^2),{x,0,30}],x] (* or *) LinearRecurrence[{4,6},{1,3},30] (* Harvey P. Dale, Aug 22 2016 *)
  • PARI
    my(x='x+O('x^30)); Vec((1-x)/(1-4*x-6*x^2)) \\ G. C. Greubel, Jan 09 2020
    
  • Sage
    def A147518_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1-x)/(1-4*x-6*x^2) ).list()
    A147518_list(30) # G. C. Greubel, Jan 09 2020
    

Formula

a(n) = 4*a(n-1) + 6*a(n-2) with a(0)=1, a(1)=3.
a(n) = Sum_{k=0..n} A122016(n,k)*3^k.
a(n) = ((10+sqrt(10))/20)*(2+sqrt(10))^n + ((10-sqrt(10))/20)*(2-sqrt(10))^n. - Richard Choulet, Nov 20 2008

A160444 Expansion of g.f.: x^2*(1 + x - x^2)/(1 - 2*x^2 - 2*x^4).

Original entry on oeis.org

0, 1, 1, 1, 2, 4, 6, 10, 16, 28, 44, 76, 120, 208, 328, 568, 896, 1552, 2448, 4240, 6688, 11584, 18272, 31648, 49920, 86464, 136384, 236224, 372608, 645376, 1017984, 1763200, 2781184, 4817152, 7598336, 13160704, 20759040, 35955712, 56714752
Offset: 1

Views

Author

Willibald Limbrunner (w.limbrunner(AT)gmx.de), May 14 2009

Keywords

Comments

This sequence is the case k=3 of a family of sequences with recurrences a(2*n+1) = a(2*n) + a(2*n-1), a(2*n+2) = k*a(2*n-1) + a(2*n), a(1)=0, a(2)=1. Values of k, for k >= 0, are given by A057979 (k=0), A158780 (k=1), A002965 (k=2), this sequence (k=3). See "Family of sequences for k" link for other connected sequences.
It seems that the ratio of two successive numbers with even, or two successive numbers with odd, indices approaches sqrt(k) for these sequences as n-> infinity.
This algorithm can be found in a historical figure named "Villardsche Figur" of the 13th century. There you can see a geometrical interpretation.

Crossrefs

Programs

  • Magma
    I:=[0,1,1,1]; [n le 4 select I[n] else 2*(Self(n-2) +Self(n-4)): n in [1..40]]; // G. C. Greubel, Feb 18 2023
    
  • Mathematica
    LinearRecurrence[{0,2,0,2}, {0,1,1,1}, 40] (* G. C. Greubel, Feb 18 2023 *)
  • SageMath
    @CachedFunction
    def a(n): # a = A160444
        if (n<5): return ((n+1)//3)
        else: return 2*(a(n-2) + a(n-4))
    [a(n) for n in range(1, 41)] # G. C. Greubel, Feb 18 2023

Formula

a(n) = 2*a(n-2) + 2*a(n-4).
a(2*n+1) = A002605(n).
a(2*n) = A026150(n-1).

Extensions

Edited by R. J. Mathar, May 14 2009

A084594 a(n) = Sum_{r=0..2^(n-1)} Binomial(2^n,2r)*3^r.

Original entry on oeis.org

1, 4, 28, 1552, 4817152, 46409906716672, 4307758882900393634270543872, 37113573186414494550922197215584520229965687291643953152
Offset: 0

Views

Author

Mario Catalani (mario.catalani(AT)unito.it), May 31 2003

Keywords

Comments

a(n)/A084595(n) converges to sqrt(3). Related to Newton's iteration.

Crossrefs

Programs

  • Mathematica
    Table[Sum[Binomial[2^n, 2 r]3^r, {r, 0, 2^(n - 1)}], {n, 0, 8}]
    Table[Simplify[Expand[(1/2) ((1 + Sqrt[3])^(2^n) + (1 - Sqrt[3])^(2^n))]], {n, 0, 7}] (* Artur Jasinski, Oct 11 2008 *)

Formula

a(n) = ( (1+sqrt(3))^(2^n) + (1-sqrt(3))^(2^n) )/2.
a(n) = A026150(2^n).
a(n) = 2*a(n-1)^2 - A001146(n-1), n>1.
a(n) = a(n-1)^2 + 3*A084595(n-1)^2.

A094286 Number of (s(0), s(1), ..., s(n)) such that 0 < s(i) < 6 and |s(i) - s(i-1)| <= 1 for i = 1,2,...,n, s(0) = 1, s(n) = 1.

Original entry on oeis.org

1, 1, 2, 4, 9, 21, 51, 127, 323, 835, 2187, 5787, 15435, 41419, 111659, 302059, 819243, 2226219, 6058155, 16503211, 44991659, 122727595, 334914219, 914235051, 2496201387, 6816678571, 18617371307, 50851322539, 138903833259, 379443202731, 1036559854251
Offset: 0

Views

Author

Herbert Kociemba, Jun 02 2004

Keywords

Comments

a(n) is the number of Motzkin n-paths of height <= 4. - Alois P. Heinz, Nov 24 2023

Crossrefs

Cf. A001006.

Programs

  • Mathematica
    LinearRecurrence[{5,-6,-2,4},{1,2,4,9},30] (* Harvey P. Dale, Feb 01 2012 *)

Formula

a(n) = (1/12)*(4 + 3*2^n + (1-sqrt(3))^n + (1+sqrt(3))^n).
a(n) = 1/3 + 2^(n-2) + A026150(n)/6.
G.f.: -x*(1-3*x+3*x^3) / ( (x-1)*(2*x-1)*(2*x^2+2*x-1) ). - R. J. Mathar, Dec 20 2011

Extensions

a(0)=1 prepended by Alois P. Heinz, Nov 24 2023

A094297 Number of (s(0), s(1), ..., s(n)) such that 0 < s(i) < 6 and |s(i) - s(i-1)| <= 1 for i = 1,2,...,n, s(0) = 2, s(n) = 2.

Original entry on oeis.org

1, 3, 7, 18, 46, 120, 316, 840, 2248, 6048, 16336, 44256, 120160, 326784, 889792, 2424960, 6613120, 18043392, 49247488, 134450688, 367134208, 1002645504, 2738510848, 7480215552, 20433258496, 55818559488, 152486858752
Offset: 1

Views

Author

Herbert Kociemba, Jun 02 2004

Keywords

Comments

In general, a(n,m,j,k) = (2/m)*Sum_{r=1..m-1) sin(j*r*Pi/m)*sin(k*r*Pi/m)*(1+2*cos(Pi*r/m))^n is the number of (s(0), s(1), ..., s(n)) such that 0 < s(i) < m and |s(i) - s(i-1)| <= 1 for i = 1,2,...,n, s(0) = j, s(n) = k.

Crossrefs

First differences of A038508.

Formula

a(n) = (1/3)*Sum_{k=1..5} sin(Pi*k/3)^2*(1+2*cos(Pi*k/6))^n or a(n) = (2^n + (1-sqrt(3))^n + (1 + sqrt(3))^n)/4.
(a(n)) seems to be given by tesseq(- 2'i + 2'j + 2'k - 2i' + 2j' + 2k' - 2'ii' + 2'jj' - 'kk' - 2.5'ik' - 1.5'jk' - 2.5'ki' - 1.5'kj' - e) (disregarding signs) - Creighton Dement, Nov 17 2004
G.f.: ( 1-x-3*x^2 )*x / ( (2*x-1)*(2*x^2+2*x-1) ). - R. J. Mathar, Sep 11 2019
4*a(n) = 2^n + 2*A026150(n). - R. J. Mathar, Oct 25 2022

A247584 a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + 3*a(n-5) with a(0) = a(1) = a(2) = a(3) = a(4) = 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 13, 43, 113, 253, 509, 969, 1849, 3719, 8009, 18027, 40897, 91257, 198697, 423777, 894081, 1886011, 4007301, 8594411, 18560081, 40181493, 86872293, 187197193, 402060793, 861827743, 1846685729, 3960390059, 8504658049, 18283290609, 39325827729
Offset: 0

Views

Author

Alexander Samokrutov, Sep 20 2014

Keywords

Comments

a(n)/a(n-1) tends to 2.1486... = 1 + 2^(1/5), the real root of the polynomial x^5 - 5*x^4 + 10*x^3 - 10*x^2 + 5*x - 3.
If x^5 = 2 and n >= 0, then there are unique integers a, b, c, d, g such that (1 + x)^n = a + b*x + c*x^2 + d*x^3 + g*x^4. The coefficient a is a(n) (from A052102). - Alexander Samokrutov, Jul 11 2015
If x=a(n), y=a(n+1), z=a(n+2), s=a(n+3), t=a(n+4) then x, y, z, s, t satisfies Diophantine equation (see link). - Alexander Samokrutov, Jul 11 2015

Crossrefs

Cf. A005531.

Programs

  • Magma
    [n le 5 select 1 else 5*Self(n-1) -10*Self(n-2) +10*Self(n-3) -5*Self(n-4) +3*Self(n-5): n in [1..40]]; // Vincenzo Librandi, Jul 11 2015
    
  • Maple
    m:=50; S:=series( (1-x)^4/(1 -5*x +10*x^2 -10*x^3 +5*x^4 -3*x^5), x, m+1):
    seq(coeff(S, x, j), j=0..m); # G. C. Greubel, Apr 15 2021
  • Mathematica
    LinearRecurrence[{5,-10,10,-5,3}, {1,1,1,1,1}, 50] (* Vincenzo Librandi, Jul 11 2015 *)
  • Maxima
    makelist(sum(2^k*binomial(n,5*k), k, 0, floor(n/5)), n, 0, 50); /* Alexander Samokrutov, Jul 11 2015 */
    
  • PARI
    Vec((1-x)^4/(1-5*x+10*x^2-10*x^3+5*x^4-3*x^5) + O(x^100)) \\ Colin Barker, Sep 22 2014
    
  • Sage
    [sum(2^j*binomial(n, 5*j) for j in (0..n//5)) for n in (0..50)] # G. C. Greubel, Apr 15 2021

Formula

a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + 3*a(n-5).
a(n) = Sum_{k=0...floor(n/5)} (2^k*binomial(n,5*k)). - Alexander Samokrutov, Jul 11 2015
G.f.: (1-x)^4/(1 -5*x +10*x^2 -10*x^3 +5*x^4 -3*x^5). - Colin Barker, Sep 22 2014

A292848 a(n) is the smallest prime of form (1/2)*((1 + sqrt(2*n))^k + (1 - sqrt(2*n))^k).

Original entry on oeis.org

3, 5, 7, 113, 11, 13, 43, 17, 19, 61, 23, 73, 79, 29, 31, 97, 103, 37, 1241463763, 41, 43, 664973, 47, 2593, 151, 53, 163, 14972833, 59, 61, 4217, 193, 67, 23801, 71, 73, 223, 229, 79, 241, 83, 7561, 61068909859, 89, 271, 277, 283, 97, 10193, 101, 103, 313
Offset: 1

Views

Author

XU Pingya, Sep 24 2017

Keywords

Comments

When 2n + 1 = p is prime, a(n) = p.
From Robert Israel, Sep 26 2017: (Start)
a(n) is also the first prime in the sequence defined by the recursion x(k+2)=2*x(k+1)+(2*n-1)*x(k) with x(0)=x(1)=1.
a(307), if it exists, has more than 10000 digits.
It appears that x(n*k) is divisible by x(k) if n is odd. Thus a(n) (if it exists) must be x(k) where k is either a power of 2 or a prime. (End)

Examples

			For k = {1, 2, 3, 4}, (1/2)((1 + sqrt(8))^k + (1 - sqrt(8))^k) = {1, 9, 25, 113}. 113 is prime, so a(4) = 113.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local a,b,t;
      a:= 1; b:= 1;
      do
        t:= a; a:= 2*a + (2*n-1)*b;
        if isprime(a) then return a fi;
        b:= t;
      od
    end proc:
    map(f, [$1..100]); # Robert Israel, Sep 26 2017
  • Mathematica
    f[n_, k_] := ((1 + Sqrt[n])^k + (1 - Sqrt[n])^k)/2;
    Table[k = 1; While[! PrimeQ[Expand@f[2n, k]], k++]; Expand@f[2n, k], {n, 52}]

A108476 Expansion of (1-4*x)/(1-6*x-12*x^2+8*x^3).

Original entry on oeis.org

1, 2, 24, 160, 1232, 9120, 68224, 508928, 3799296, 28357120, 211662848, 1579868160, 11792306176, 88018952192, 656982441984, 4903783628800, 36602339459072, 273203580764160, 2039219289063424, 15220939987877888
Offset: 0

Views

Author

Paul Barry, Jun 04 2005

Keywords

Comments

In general, Sum_{k=0..n} Sum_{j=0..n} C(2*(n-k), j)*C(2*k, j)*r^j has expansion (1 - (r+1)*x)/(1 - (r+3)*x - (r-1)*(r+3)*x^2 + (r-1)^3*x^3).

Programs

  • Mathematica
    CoefficientList[Series[(1-4x)/(1-6x-12x^2+8x^3),{x,0,30}],x] (* or *) LinearRecurrence[{6,12,-8},{1,2,24},30] (* Harvey P. Dale, Feb 21 2012 *)

Formula

G.f.: (1-4*x)/((1+2*x)*(1-8*x+4*x^2)).
a(n) = 6*a(n-1)+12*a(n-2)-8*a(n-3).
a(n) = Sum_{k=0..n} Sum_{j=0..n} C(2*(n-k), j)*C(2*k, j)*3^j.
Conjecture: a(n) = A002605(n+1)*A026150(n). - R. J. Mathar, Jul 08 2009
a(0)=1, a(1)=2, a(2)=24, a(n)=6*a(n-1)+12*a(n-2)-8*a(n-3). - Harvey P. Dale, Feb 21 2012
a(n) = (-2)^n/2 +A102591(n)/2. - R. J. Mathar, Sep 20 2012
Previous Showing 41-50 of 53 results. Next