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.

A075298 Inverted (definition in A075193) generalized tribonacci numbers A001644.

Original entry on oeis.org

1, 1, -5, 5, 1, -11, 15, -3, -23, 41, -21, -43, 105, -83, -65, 253, -271, -47, 571, -795, 177, 1189, -2161, 1149, 2201, -5511, 4459, 3253, -13223, 14429, 2047, -29699, 42081, -10335, -61445, 113861, -62751, -112555, 289167, -239363, -162359, 690889, -767893, -85355, 1544137, -2226675, 597183, 3173629
Offset: 0

Views

Author

Mario Catalani (mario.catalani(AT)unito.it), Sep 13 2002

Keywords

Comments

a(n) = -C(n+1), C(n)=reflected generalized tribonacci numbers A073145.

Crossrefs

Programs

  • GAP
    a:=[1,1,-5];; for n in [4..50] do a[n]:=-a[n-1]-a[n-2]+a[n-3]; od; a; # G. C. Greubel, Apr 09 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 50); Coefficients(R!( (1+2*x-3*x^2)/(1+x+x^2-x^3) )); // G. C. Greubel, Apr 09 2019
    
  • Mathematica
    CoefficientList[Series[(1+2x-3x^2)/(1+x+x^2-x^3), {x, 0, 50}], x]
  • PARI
    my(x='x+O('x^50)); Vec((1+2*x-3*x^2)/(1+x+x^2-x^3)) \\ G. C. Greubel, Apr 09 2019
    
  • Sage
    ((1+2*x-3*x^2)/(1+x+x^2-x^3)).series(x, 50).coefficients(x, sparse=False) # G. C. Greubel, Apr 09 2019
    

Formula

a(n) = -a(n-1) - a(n-2) + a(n-3), a(0)=1, a(1)=1, a(2)=-5.
G.f.: (1+2*x-3*x^2)/(1+x+x^2-x^3).
a(n) = A078046(n) + 3*A078046(n-1). - R. J. Mathar, Sep 20 2020

A075269 Product of Lucas numbers and inverted Lucas numbers: a(n)=A000032(n)*A075193(n).

Original entry on oeis.org

2, -3, 12, -28, 77, -198, 522, -1363, 3572, -9348, 24477, -64078, 167762, -439203, 1149852, -3010348, 7881197, -20633238, 54018522, -141422323, 370248452, -969323028, 2537720637, -6643838878, 17393796002, -45537549123, 119218851372, -312119004988, 817138163597
Offset: 0

Views

Author

Mario Catalani (mario.catalani(AT)unito.it), Sep 11 2002

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(2 + x + 2x^2)/(1 + 2x - 2x^2 - x^3), {x, 0, 30}], x]
    LinearRecurrence[{-2,2,1},{2,-3,12},30] (* Harvey P. Dale, Jun 30 2022 *)
  • PARI
    a(n)=1+(-1)^n*(fibonacci(2*n)+fibonacci(2*n+2))

Formula

a(n) = 1 + (-1)^n*A002878(n).
From Michael Somos, Apr 07 2003: (Start)
G.f.: (2+x+2x^2)/((1+3x+x^2)(1-x)).
a(n) = -3a(n-1) - a(n-2)+5 = -2a(n-1) + 2a(n-2) + a(n-3) = a(-1-n). (End)
Sum_{n>=0} 1/a(n) = sqrt(5)/10. - Amiram Eldar, Jan 15 2022
a(n) = (-1)^n*A215602(n). - R. J. Mathar, Jul 09 2024
a(n) - a(n-1) = (-1)^n* A054888(n), n>0. - R. J. Mathar, Jul 09 2024

A075270 Sum of Lucas numbers and inverted Lucas numbers: a(n) = A000032(n)*A075193(n).

Original entry on oeis.org

3, -2, 7, -3, 18, -7, 47, -18, 123, -47, 322, -123, 843, -322, 2207, -843, 5778, -2207, 15127, -5778, 39603, -15127, 103682, -39603, 271443, -103682, 710647, -271443, 1860498, -710647, 4870847, -1860498, 12752043, -4870847, 33385282, -12752043, 87403803, -33385282, 228826127, -87403803
Offset: 0

Views

Author

Mario Catalani (mario.catalani(AT)unito.it), Sep 12 2002

Keywords

Comments

a(n) = (1 + (-1)^n)*L(n) + ((-1)^n)*L(n-1), L(n) Lucas numbers.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(3-2x-2x^2+3x^3)/(1-3x^2+x^4), {x, 0, 40}], x]

Formula

a(n) = 3*a(n-2) - a(n-4); a(0)=3, a(1)=-2, a(2)=7, a(3)=-3.
O.g.f. (3-2*x-2*x^2+3*x^3)/(1-3*x^2+x^4).

A027960 'Lucas array': triangular array T read by rows.

Original entry on oeis.org

1, 1, 3, 1, 1, 3, 4, 4, 1, 1, 3, 4, 7, 8, 5, 1, 1, 3, 4, 7, 11, 15, 13, 6, 1, 1, 3, 4, 7, 11, 18, 26, 28, 19, 7, 1, 1, 3, 4, 7, 11, 18, 29, 44, 54, 47, 26, 8, 1, 1, 3, 4, 7, 11, 18, 29, 47, 73, 98, 101, 73, 34, 9, 1, 1, 3, 4, 7, 11, 18, 29, 47, 76, 120, 171, 199, 174, 107, 43, 10, 1
Offset: 0

Views

Author

Keywords

Comments

The k-th row contains 2k+1 numbers.
Columns in the right half consist of convolutions of the Lucas numbers with the natural numbers.
T(n,k) = number of strings s(0),...,s(n) such that s(n)=n-k. s(0) in {0,1,2}, s(1)=1 if s(0) in {1,2}, s(1) in {0,1,2} if s(0)=0 and for 1 <= i <= n, s(i) = s(i-1)+d, with d in {0,2} if s(i)=2i, in {0,1,2} if s(i)=2i-1, in {0,1} if 0 <= s(i) <= 2i-2.

Examples

			                           1
                       1,  3,  1
                   1,  3,  4,  4,  1
               1,  3,  4,  7,  8,  5,   1
           1,  3,  4,  7, 11, 15, 13,   6,  1
        1, 3,  4,  7, 11, 18, 26, 28,  19,  7,  1
     1, 3, 4,  7, 11, 18, 29, 44, 54,  47, 26,  8, 1
  1, 3, 4, 7, 11, 18, 29, 47, 73, 98, 101, 73, 34, 9, 1
		

Crossrefs

Central column is the Lucas numbers without initial 2: A000204.
Columns in the right half include A027961, A027962, A027963, A027964, A053298.
Bisection triangles are in A026998 and A027011.
Row sums: A036563, A153881 (alternating sign).
Diagonals of the form T(n, 2*n-p): A000012 (p=0), A000027 (p=1), A034856 (p=2), A027965 (p=3), A027966 (p=4), A027967 (p=5), A027968 (p=6), A027969 (p=7), A027970 (p=8), A027971 (p=9), A027972 (p=10).
Diagonals of the form T(n, n+p): A000032 (p=0), A027961 (p=1), A023537 (p=2), A027963 (p=3), A027964 (p=4), A053298 (p=5), A027002 U A027018 (p=6), A027007 U A027014 (p=7), A027003 U A027019 (p=8).

Programs

  • Magma
    function T(n,k) // T = A027960
          if k le n then return Lucas(k+1);
          elif k gt 2*n then return 0;
          else return T(n-1, k-2) + T(n-1, k-1);
          end if;
    end function;
    [T(n,k): k in [0..2*n], n in [0..12]]; // G. C. Greubel, Jun 08 2025
  • Maple
    T:=proc(n,k)option remember:if(k=0 or k=2*n)then return 1:elif(k=1)then return 3:else return T(n-1,k-2) + T(n-1,k-1):fi:end:
    for n from 0 to 6 do for k from 0 to 2*n do print(T(n,k));od:od: # Nathaniel Johnston, Apr 18 2011
  • Mathematica
    (* First program *)
    t[, 0] = 1; t[, 1] = 3; t[n_, k_] /; (k == 2*n) = 1; t[n_, k_] := t[n, k] = t[n-1, k-2] + t[n-1, k-1]; Table[t[n, k], {n, 0, 8}, {k, 0, 2*n}] // Flatten (* Jean-François Alcover, Dec 27 2013 *)
    (* Second program *)
    f[n_, k_]:= f[n,k]= Sum[Binomial[2*n-k+j,j]*LucasL[2*(k-n-j)], {j,0,k-n-1}];
    A027960[n_, k_]:= LucasL[k+1] - f[n,k]*Boole[k>n];
    Table[A027960[n,k], {n,0,12}, {k,0,2*n}]//Flatten (* G. C. Greubel, Jun 08 2025 *)
  • PARI
    T(r,n)=if(r<0||n>2*r,return(0)); if(n==0||n==2*r,return(1)); if(n==1,3,T(r-1,n-1)+T(r-1,n-2)) /* Ralf Stephan, May 04 2005 */
    
  • SageMath
    @CachedFunction
    def T(n, k): # T = A027960
        if (k>2*n): return 0
        elif (kG. C. Greubel, Jun 01 2019; Jun 08 2025
    

Formula

T(n, k) = Lucas(k+1) for k <= n, otherwise the (2n-k)th coefficient of the power series for (1+2*x)/{(1-x-x^2)*(1-x)^(k-n)}.
Recurrence: T(n, 0)=T(n, 2n)=1 for n >= 0; T(n, 1)=3 for n >= 1; and for n >= 2, T(n, k) = T(n-1, k-2) + T(n-1, k-1) for 2 <= k <= 2*n-1.
From G. C. Greubel, Jun 08 2025: (Start)
T(n, k) = A000032(k+1) - f(n, k)*[k > n], where f(n, k) = Sum_{j=0..k-n-1} binomial(2*n -k+j, j)*A000032(2*(k-n-j)).
Sum_{k=0..A004396(n+1)} T(n-k, k) = A027975(n).
Sum_{k=0..n} T(n, k) = A027961(n).
Sum_{k=0..2*n} T(n, k) = A168616(n+2) + 2.
Sum_{k=n+1..2*n} (-1)^k*T(n, k) = A075193(n-1), n >= 1. (End)

Extensions

Edited by Ralf Stephan, May 04 2005

A186679 First differences of A116697.

Original entry on oeis.org

0, -3, 4, -4, 7, -14, 22, -33, 54, -90, 145, -232, 376, -611, 988, -1596, 2583, -4182, 6766, -10945, 17710, -28658, 46369, -75024, 121392, -196419, 317812, -514228, 832039, -1346270, 2178310, -3524577, 5702886, -9227466, 14930353, -24157816, 39088168, -63245987, 102334156, -165580140
Offset: 0

Views

Author

Reinhard Zumkeller, Feb 25 2011

Keywords

Crossrefs

Programs

  • Magma
    A186679:= func< n | (-1)^n*Fibonacci(n+2) - (-1)^Floor(n/2) >;
    [A186679(n): n in [0..40]]; // G. C. Greubel, Aug 24 2025
    
  • Mathematica
    Table[(-1)^n*Fibonacci[n+2] -(-1)^Floor[n/2], {n,0,40}] (* G. C. Greubel, Aug 24 2025 *)
  • SageMath
    def A186679(n): return (-1)**n*fibonacci(n+2) -(-1)**(n//2)
    print([A186679(n) for n in range(41)]) # G. C. Greubel, Aug 24 2025

Formula

a(n) = A116697(n+1) - A116697(n).
a(2*n) = A128533(n).
a(2*n+1) = A081714(n+1).
a(n+2) = A075193(n+2) - a(n).
G.f.: x*(-3+x)/((1+x-x^2)*(1+x^2)). - Colin Barker, Sep 08 2012
From G. C. Greubel, Aug 24 2025: (Start)
a(n) = (-1)^n*Fibonacci(n+2) - (-1)^floor(n/2).
E.g.f.: exp(-x/2)*(cosh(p*x) - (3/sqrt(5))*sinh(p*x)) - cos(x) - sin(x), where 2*p = sqrt(5). (End)
Showing 1-5 of 5 results.