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.

A122542 Triangle T(n,k), 0 <= k <= n, read by rows, given by [0, 2, -1, 0, 0, 0, 0, 0, ...] DELTA [1, 0, 0, 0, 0, 0, 0, 0, ...] where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 2, 4, 1, 0, 2, 8, 6, 1, 0, 2, 12, 18, 8, 1, 0, 2, 16, 38, 32, 10, 1, 0, 2, 20, 66, 88, 50, 12, 1, 0, 2, 24, 102, 192, 170, 72, 14, 1, 0, 2, 28, 146, 360, 450, 292, 98, 16, 1, 0, 2, 32, 198, 608, 1002, 912, 462, 128, 18, 1
Offset: 0

Views

Author

Philippe Deléham, Sep 19 2006, May 28 2007

Keywords

Comments

Riordan array (1, x*(1+x)/(1-x)). Rising and falling diagonals are the tribonacci numbers A000213, A001590.

Examples

			Triangle begins:
  1;
  0, 1;
  0, 2,  1;
  0, 2,  4,   1;
  0, 2,  8,   6,   1;
  0, 2, 12,  18,   8,    1;
  0, 2, 16,  38,  32,   10,   1;
  0, 2, 20,  66,  88,   50,  12,   1;
  0, 2, 24, 102, 192,  170,  72,  14,   1;
  0, 2, 28, 146, 360,  450, 292,  98,  16,  1;
  0, 2, 32, 198, 608, 1002, 912, 462, 128, 18, 1;
		

Crossrefs

Other versions: A035607, A113413, A119800, A266213.
Sums include: A000007, A001333 (row), A001590 (diagonal), A007483, A057077 (signed row), A078016 (signed diagonal), A086901, A091928, A104934, A122558, A122690.

Programs

  • Haskell
    a122542 n k = a122542_tabl !! n !! k
    a122542_row n = a122542_tabl !! n
    a122542_tabl = map fst $ iterate
       (\(us, vs) -> (vs, zipWith (+) ([0] ++ us ++ [0]) $
                          zipWith (+) ([0] ++ vs) (vs ++ [0]))) ([1], [0, 1])
    -- Reinhard Zumkeller, Jul 20 2013, Apr 17 2013
    
  • Magma
    function T(n, k) // T = A122542
      if k eq 0 then return 0^n;
      elif k eq n then return 1;
      else return T(n-1,k) + T(n-1,k-1) + T(n-2,k-1);
      end if;
    end function;
    [T(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Oct 27 2024
  • Mathematica
    CoefficientList[#, y]& /@ CoefficientList[(1-x)/(1 - (1+y)x - y x^2) + O[x]^11, x] // Flatten (* Jean-François Alcover, Sep 09 2018 *)
    (* Second program *)
    T[n_, k_]:= T[n, k]= If[k==n, 1, If[k==0, 0, T[n-1,k-1] +T[n-1,k] +T[n-2,k- 1] ]]; (* T = A122542 *)
    Table[T[n,k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Oct 27 2024 *)
  • Sage
    def A122542_row(n):
        @cached_function
        def prec(n, k):
            if k==n: return 1
            if k==0: return 0
            return prec(n-1,k-1)+2*sum(prec(n-i,k-1) for i in (2..n-k+1))
        return [prec(n, k) for k in (0..n)]
    for n in (0..10): print(A122542_row(n)) # Peter Luschny, Mar 16 2016
    

Formula

Sum_{k=0..n} x^k*T(n,k) = A000007(n), A001333(n), A104934(n), A122558(n), A122690(n), A091928(n) for x = 0, 1, 2, 3, 4, 5. - Philippe Deléham, Jan 25 2012
Sum_{k=0..n} 3^(n-k)*T(n,k) = A086901(n).
Sum_{k=0..n} 2^(n-k)*T(n,k) = A007483(n-1), n >= 1. - Philippe Deléham, Oct 08 2006
T(2*n, n) = A123164(n).
T(n, k) = T(n-1,k) + T(n-1,k-1) + T(n-2,k-1), n > 1. - Philippe Deléham, Jan 25 2012
G.f.: (1-x)/(1-(1+y)*x-y*x^2). - Philippe Deléham, Mar 02 2012
From G. C. Greubel, Oct 27 2024: (Start)
Sum_{k=0..n} (-1)^k*T(n, k) = A057077(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = A001590(n+1).
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = A078016(n). (End)

A015530 Expansion of x/(1 - 4*x - 3*x^2).

Original entry on oeis.org

0, 1, 4, 19, 88, 409, 1900, 8827, 41008, 190513, 885076, 4111843, 19102600, 88745929, 412291516, 1915403851, 8898489952, 41340171361, 192056155300, 892245135283, 4145149007032, 19257331433977, 89464772757004
Offset: 0

Views

Author

Keywords

Comments

Let b(1)=1, b(k) = floor(b(k-1)) + 3/b(k-1); then for n>1, b(n) = a(n)/a(n-1). - Benoit Cloitre, Sep 09 2002
In general, x/(1 - a*x - b*x^2) has a(n) = Sum_{k=0..floor((n-1)/2)} C(n-k-1,k)*b^k*a^(n-2k-1). - Paul Barry, Apr 23 2005
Pisano period lengths: 1, 2, 1, 4, 24, 2, 21, 4, 3, 24, 40, 4, 84, 42, 24, 8, 288, 6, 18, 24, ... . - R. J. Mathar, Aug 10 2012
This is the Lucas sequence U(4,-3). - Bruno Berselli, Jan 09 2013

Crossrefs

Appears in A179596, A126473 and A179597. - Johannes W. Meijer, Aug 01 2010
Cf. A080042: Lucas sequence V(4,-3).

Programs

  • Magma
    I:=[0, 1]; [n le 2 select I[n] else 4*Self(n-1)+3*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Jun 19 2012
    
  • Mathematica
    LinearRecurrence[{4,3},{0,1},30] (* Vincenzo Librandi, Jun 19 2012 *)
  • PARI
    x='x+O('x^30); concat([0], Vec(x/(1-4*x-3*x^2))) \\ G. C. Greubel, Jan 24 2018
  • Sage
    [lucas_number1(n,4,-3) for n in range(0, 23)]# Zerinvary Lajos, Apr 23 2009
    

Formula

a(n) = 4*a(n-1) + 3*a(n-2).
a(n) = (A086901(n+2) - A086901(n+1))/6. - Ralf Stephan, Feb 01 2004
a(n) = Sum_{k=0..floor((n-1)/2)} C(n-k-1, k)*3^k*4^(n-2k-1). - Paul Barry, Apr 23 2005
a(n) = ((2+sqrt(7))^n - (2-sqrt(7))^n)/sqrt(28). Offset 1. a(3)=19. - Al Hakanson (hawkuu(AT)gmail.com), Jan 05 2009
From Johannes W. Meijer, Aug 01 2010: (Start)
Limit(a(n+k)/a(k), k=infinity) = A108851(n)+a(n)*sqrt(7).
Limit(A108851(n)/a(n), n=infinity) = sqrt(7). (End)
G.f.: x*G(0) where G(k)= 1 + (4*x+3*x^2)/(1 - (4*x+3*x^2)/(4*x + 3*x^2 + 1/G(k+1))); (continued fraction, 3rd kind, 3-step). - Sergei N. Gladkovskii, Jul 28 2012
G.f.: G(0)*x/(2-4*x), where G(k)= 1 + 1/(1 - x*(7*k-4)/(x*(7*k+3) - 2/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 16 2013

A102900 a(n) = 3*a(n-1) + 4*a(n-2), a(0)=a(1)=1.

Original entry on oeis.org

1, 1, 7, 25, 103, 409, 1639, 6553, 26215, 104857, 419431, 1677721, 6710887, 26843545, 107374183, 429496729, 1717986919, 6871947673, 27487790695, 109951162777, 439804651111, 1759218604441, 7036874417767, 28147497671065
Offset: 0

Views

Author

Paul Barry, Jan 17 2005

Keywords

Comments

Binomial transform of A102901.
Hankel transform is = 1,6,0,0,0,0,0,0,0,0,0,0,... - Philippe Deléham, Nov 02 2008

References

  • Maria Paola Bonacina and Nachum Dershowitz, Canonical Inference for Implicational Systems, in Automated Reasoning, Lecture Notes in Computer Science, Volume 5195/2008, Springer-Verlag.

Crossrefs

Cf. A001045, A004171, A046717, A086901, A102901, A247666 (which appears to be the run length transform of this sequence).

Programs

  • Haskell
    a102900 n = a102900_list !! n
    a102900_list = 1 : 1 : zipWith (+)
                   (map (* 4) a102900_list) (map (* 3) $ tail a102900_list)
    -- Reinhard Zumkeller, Feb 13 2015
    
  • Magma
    [n le 2 select 1 else 3*Self(n-1)+4*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Dec 28 2015
    
  • Mathematica
    a[n_]:=(MatrixPower[{{2,2},{3,1}},n].{{2},{1}})[[2,1]]; Table[a[n],{n,0,40}] (* Vladimir Joseph Stephan Orlovsky, Feb 20 2010 *)
    LinearRecurrence[{3, 4}, {1, 1}, 30] (* Vincenzo Librandi, Dec 28 2015 *)
  • PARI
    a(n)=([0,1; 4,3]^n*[1;1])[1,1] \\ Charles R Greathouse IV, Mar 28 2016
    
  • SageMath
    A102900=BinaryRecurrenceSequence(3,4,1,1)
    [A102900(n) for n in range(51)] # G. C. Greubel, Dec 09 2022

Formula

G.f.: (1-2*x)/(1-3*x-4*x^2).
a(n) = (2*4^n + 3*(-1)^n)/5.
a(n) = ceiling(4^n/5) + floor(4^n/5) = (ceiling(4^n/5))^2 - (floor(4^n/5))^2.
a(n) + a(n+1) = 2^(2*n+1) = A004171(n).
a(n) = Sum_{k=0..n} binomial(2*n-k, 2*k)*2^k. - Paul Barry, Jan 20 2005
a(n) = upper left term in the 2 X 2 matrix [1,3; 2,2]^n. - Gary W. Adamson, Mar 14 2008
G.f.: G(0)/2, where G(k) = 1 + 1/(1 - x*(8*4^k-3*(-1)^k)/(x*(8*4^k-3*(-1)^k) + (2*4^k+3*(-1)^k)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 28 2013
a(n) = 2^(2*n-1) - a(n-1), a(1)=1. - Ben Paul Thurston, Dec 27 2015; corrected by Klaus Purath, Aug 02 2020
From Klaus Purath, Aug 02 2020: (Start)
a(n) = 4*a(n-1) + 3*(-1)^n.
a(n) = 6*4^(n-2) + a(n-2), n>=2. (End)

A234122 T(n,k)=Number of (n+1)X(k+1) 0..2 arrays with every 2X2 subblock having the absolute values of all six edge and diagonal differences no larger than 1.

Original entry on oeis.org

31, 145, 145, 673, 1361, 673, 3127, 12593, 12593, 3127, 14527, 116801, 231713, 116801, 14527, 67489, 1082977, 4279065, 4279065, 1082977, 67489, 313537, 10041953, 79003521, 157630963, 79003521, 10041953, 313537, 1456615, 93113761
Offset: 1

Views

Author

R. H. Hardin, Dec 19 2013

Keywords

Comments

Table starts
.......31.........145.............673...............3127.................14527
......145........1361...........12593.............116801...............1082977
......673.......12593..........231713............4279065..............79003521
.....3127......116801.........4279065..........157630963............5807422543
....14527.....1082977........79003521.........5807422543..........427196005695
....67489....10041953......1458813409.......214027901025........31446640848897
...313537....93113761.....26937444801......7888454356625......2315408571668225
..1456615...863396401....497411686793....290756314787875....170502665692732079
..6767071..8005833073...9184935953377..10716964158533127..12556134956123911615
.31438129.74233997105.169604155276817.395017615132720993.924677153131389366689

Examples

			Some solutions for n=2 k=4
..0..1..0..0..1....0..1..2..2..2....1..2..1..2..2....0..1..0..1..2
..1..0..1..0..1....1..1..1..1..2....1..2..2..2..2....1..0..0..1..2
..1..1..0..0..1....1..2..2..1..2....2..1..1..1..2....0..1..0..1..1
		

Crossrefs

Column 1 is A086901(n+3)

Formula

Empirical for column k:
k=1: a(n) = 4*a(n-1) +3*a(n-2)
k=2: a(n) = 10*a(n-1) -4*a(n-2) -26*a(n-3) +5*a(n-4)
k=3: a(n) = 20*a(n-1) -10*a(n-2) -324*a(n-3) -277*a(n-4) +144*a(n-5)
k=4: [order 11]
k=5: [order 17]
k=6: [order 35]
k=7: [order 62]

A154246 a(n) = ( (5 + sqrt(7))^n - (5 - sqrt(7))^n )/(2*sqrt(7)).

Original entry on oeis.org

1, 10, 82, 640, 4924, 37720, 288568, 2206720, 16872976, 129008800, 986374432, 7541585920, 57661119424, 440862647680, 3370726327168, 25771735613440, 197044282245376, 1506551581411840, 11518718733701632, 88069258871603200
Offset: 1

Views

Author

Al Hakanson (hawkuu(AT)gmail.com), Jan 05 2009

Keywords

Comments

Second binomial transform of A086901 without initial term 1.
Lim_{n -> infinity} a(n)/a(n-1) = 5 + sqrt(7) = 7.6457513110....

Crossrefs

Cf. A010465 (decimal expansion of square root of 7), A086901.

Programs

  • Magma
    Z:=PolynomialRing(Integers()); N:=NumberField(x^2-7); S:=[((5+r)^n-(5-r)^n)/(2*r): n in [1..25]]; [Integers()!S[j]: j in [1..#S]]; // Klaus Brockhaus, Jan 07 2009
    
  • Magma
    I:=[1,10]; [n le 2 select I[n] else 10*Self(n-1)-18*Self(n-2): n in [1..25]]; // Vincenzo Librandi, Sep 08 2016
    
  • Mathematica
    Table[Simplify[((5+Sqrt[7])^n -(5-Sqrt[7])^n)/(2*Sqrt[7])], {n,1,25}] (* or *) LinearRecurrence[{10, -18}, {1, 10}, 25] (* G. C. Greubel, Sep 07 2016 *)
  • PARI
    my(x='x+O('x^25)); Vec(x/(1-10*x+18*x^2)) \\ G. C. Greubel, May 31 2019
  • Sage
    [lucas_number1(n,10,18) for n in range(1, 25)] # Zerinvary Lajos, Apr 26 2009
    

Formula

From Philippe Deléham, Jan 06 2009: (Start)
a(n) = 10*a(n-1) - 18*a(n-2) for n > 1, with a(0)=0, a(1)=1.
G.f.: x/(1 - 10*x + 18*x^2). (End)
E.g.f.: (1/sqrt(7))*exp(5*x)*sinh(sqrt(7)*x). - G. C. Greubel, Sep 07 2016

Extensions

Extended beyond a(7) by Klaus Brockhaus, Jan 07 2009
Edited by Klaus Brockhaus, Oct 06 2009
Showing 1-5 of 5 results.