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

A022998 If n is odd then n, otherwise 2n.

Original entry on oeis.org

0, 1, 4, 3, 8, 5, 12, 7, 16, 9, 20, 11, 24, 13, 28, 15, 32, 17, 36, 19, 40, 21, 44, 23, 48, 25, 52, 27, 56, 29, 60, 31, 64, 33, 68, 35, 72, 37, 76, 39, 80, 41, 84, 43, 88, 45, 92, 47, 96, 49, 100, 51, 104, 53, 108, 55, 112, 57, 116, 59, 120, 61, 124, 63, 128, 65, 132, 67
Offset: 0

Views

Author

Keywords

Comments

Also for n > 0: numerator of Sum_{i=1..n} 2/(i*(i+1)), denominator=A026741. - Reinhard Zumkeller, Jul 25 2002
For n > 2: a(n) = gcd(A143051((n-1)^2), A143051(1+(n-1)^2)) = A050873(A000290(n-1), A002522(n-1)). - Reinhard Zumkeller, Jul 20 2008
Partial sums give the generalized octagonal numbers A001082. - Omar E. Pol, Sep 10 2011
Multiples of 4 and odd numbers interleaved. - Omar E. Pol, Sep 25 2011
The Pisano period lengths modulo m appear to be A066043(m). - R. J. Mathar, Oct 08 2011
The partial sums a(n)/A026741(n+1) given by R. Zumkeller in a comment above are 2*n/(n+1) (telescopic sum), and thus converge to 2. - Wolfdieter Lang, Apr 09 2013
a(n) = numerator(H(n,1)), where H(n,1) = 2*n/(n+1) is the harmonic mean of 1 and n. a(n) = 2*n/gcd(2n, n+1) = 2*n/gcd(n+1,2). a(n) = A227041(n,1), n>=1. - Wolfdieter Lang, Jul 04 2013
a(n) = numerator of the mean (2n/(n+1), after reduction), of the compositions of n; denominator is given by A001792(n-1). - Clark Kimberling, Mar 11 2014
A strong divisibility sequence, that is, gcd(a(n), a(m)) = a(gcd(n,m)) for all natural numbers n and m. The sequence of convergents of the 2-periodic continued fraction [0; 1, -4, 1, -4, ...] = 1/(1 - 1/(4 - 1/(1 - 1/(4 - ...)))) begins [0/1, 1/1, 4/3, 3/2, 8/5, 5/3, 12/7, ...]. The present sequence is the sequence of numerators. The sequence of denominators of the continued fraction convergents [1, 1, 3, 2, 5, 3, 7, ...] is A026741, also a strong divisibility sequence. Cf. A203976. - Peter Bala, May 19 2014
a(n) is also the length of the n-th line segment of a rectangular spiral on the infinite square grid. The vertices of the spiral are the generalized octagonal numbers. - Omar E. Pol, Jul 27 2018
a(n) is the number of petals of the Rhodonea curve r = a*cos(n*theta) or r = a*sin(n*theta). - Matt Westwood, Nov 19 2019

Crossrefs

Column 4 of A195151. - Omar E. Pol, Sep 25 2011
Cf. A000034, A001082 (partial sums).
Cf. A227041 (first column). - Wolfdieter Lang, Jul 04 2013
Row 2 of A349593. A385555, A385556, A385557, A385558, A385559, and A385560 are respectively rows 3, 4, 5-6, 7, 8, and 9-10.

Programs

  • Haskell
    a022998 n = a000034 (n + 1) * n
    a022998_list = zipWith (*) [0..] $ tail a000034_list
    -- Reinhard Zumkeller, Mar 31 2012
    
  • Magma
    [((-1)^n+3)*n/2: n in [0..70]]; // Vincenzo Librandi, Sep 17 2011
    
  • Maple
    A022998 := proc(n) if type(n,'odd') then n ; else 2*n; end if; end proc: # R. J. Mathar, Mar 10 2011
  • Mathematica
    Table[n (3 + (-1)^n)/2, {n, 0, 100}] (* Wesley Ivan Hurt, Dec 13 2013 *)
    Table[If[OddQ[n],n,2n],{n,0,150}] (* or *) Riffle[ 2*Range[ 0,150,2], Range[ 1,150,2]] (* Harvey P. Dale, Feb 06 2017 *)
  • PARI
    a(n)=if(n%2,n,2*n)
    
  • Python
    def A022998(n): return n if n&1 else n<<1 # Chai Wah Wu, Mar 05 2024
  • SageMath
    [n*(1+((n+1)%2)) for n in (0..80)] # G. C. Greubel, Jul 31 2022
    

Formula

Denominator of (n+1)*(n-1)*(2*n+1)/(2*n) (for n > 0).
a(n+1) = lcm(n, n+2)/n + lcm(n, n+2)/(n+2) for all n >= 1. - Asher Auel, Dec 15 2000
Multiplicative with a(2^e) = 2^(e+1), a(p^e) = p^e, p > 2.
G.f. x*(1 + 4*x + x^2)/(1-x^2)^2. - Ralf Stephan, Jun 10 2003
a(n) = 3*n/2 + n*(-1)^n/2 = n*(3 + (-1)^n)/2. - Paul Barry, Sep 04 2003
a(n) = A059029(n-1) + 1 = A043547(n+2) - 2.
a(n)*a(n+3) = -4 + a(n+1)*a(n+2).
a(n) = n*(((n+1) mod 2) + 1) = n^2 + 2*n - 2*n*floor((n+1)/2). - William A. Tedeschi, Feb 29 2008
a(n) = denominator((n+1)/(2*n)) for n >= 1; A026741(n+1) = numerator((n+1)/(2*n)) for n >= 1. - Johannes W. Meijer, Jun 18 2009
a(n) = 2*a(n-2) - a(n-4).
Dirichlet g.f. zeta(s-1)*(1+2^(1-s)). - R. J. Mathar, Mar 10 2011
a(n) = n * (2 - n mod 2) = n * A000034(n+1). - Reinhard Zumkeller, Mar 31 2012
a(n) = floor(2*n/(1 + (n mod 2))). - Wesley Ivan Hurt, Dec 13 2013
From Ilya Gutkovskiy, Mar 16 2017: (Start)
E.g.f.: x*(2*sinh(x) + cosh(x)).
It appears that a(n) is the period of the sequence k*(k + 1)/2 mod n. (End) [This is correct; see A349593. - Jianing Song, Jul 03 2025]
a(n) = Sum_{d | n} A345082(d). - Peter Bala, Jan 13 2024

Extensions

More terms from Michael Somos, Aug 07 2000

A014217 a(n) = floor(phi^n), where phi = (1+sqrt(5))/2 is the golden ratio.

Original entry on oeis.org

1, 1, 2, 4, 6, 11, 17, 29, 46, 76, 122, 199, 321, 521, 842, 1364, 2206, 3571, 5777, 9349, 15126, 24476, 39602, 64079, 103681, 167761, 271442, 439204, 710646, 1149851, 1860497, 3010349, 4870846, 7881196, 12752042, 20633239, 33385281, 54018521, 87403802
Offset: 0

Views

Author

Keywords

Comments

a(n) = floor(lim_{k->oo} Fibonacci(k)/Fibonacci(k-n)). - Jon Perry, Jun 10 2003
For n > 1, a(n) is the maximum element in the continued fraction for A000045(n)*phi. - Benoit Cloitre, Jun 19 2005
a(n) is also the curvature (rounded down) of the circle inscribed in the n-th kite arranged in a spiral, starting with a unit circle, as shown in the illustration in the links section. - Kival Ngaokrajang, Aug 29 2013
a(n) is the n-th Lucas number (A000032) if n is odd, and a(n) is the n-th Lucas number minus 1 if n is even. (Mario Catalani's formula below expresses this fact.) This is related to the fact that the powers of phi approach the values of the Lucas numbers, the odd powers from above and the even powers from below. - Geoffrey Caveney, Apr 18 2014
a(n) is the sum of the last summands over all Arndt compositions of n (see the Checa link). - Daniel Checa, Dec 25 2023
a(n) is the number of (saturated or unsaturated) substituted N-heterocycles in chemistry (N = nitrogen). That means the number of matchings in a cycle graph when the two maximum matchings in every cycle with an even number of vertices are indistinguishable (because the corresponding resonance structures in the molecule are equivalent). - Stefan Schuster, Mar 20 2025

Crossrefs

Programs

  • Haskell
    a014217 n = a014217_list !! n
    a014217_list = 1 : 1 : zipWith (+)
       a000035_list (zipWith (+) a014217_list $ tail a014217_list)
    -- Reinhard Zumkeller, Jan 06 2012
    
  • Magma
    [Floor( ((1+Sqrt(5))/2)^n ): n in [0..100]]; // Vincenzo Librandi, Apr 16 2011
    
  • Maple
    A014217 := proc(n)
        option remember;
        if n <= 3 then
            op(n+1,[1,1,2,4]) ;
        else
            procname(n-1)+2*procname(n-2)-procname(n-3)-procname(n-4) ;
        end if;
    end proc: # R. J. Mathar, Jun 23 2013
    #
    a:= n-> (<<0|1|0|0>, <0|0|1|0>, <0|0|0|1>, <-1|-1|2|1>>^n. <<1, 1, 2, 4>>)[1, 1]:
    seq(a(n), n=0..40);  # Alois P. Heinz, Oct 12 2017
  • Mathematica
    Table[Floor[GoldenRatio^n], {n, 0, 36}] (* Vladimir Joseph Stephan Orlovsky, Dec 12 2008 *)
    LinearRecurrence[{1, 2, -1, -1}, {1, 1, 2, 4}, 40] (* Jean-François Alcover, Nov 05 2017 *)
  • PARI
    my(x='x+O('x^44)); Vec((1-x^2+x^3)/((1+x)*(1-x)*(1-x-x^2))) \\ Joerg Arndt, Jul 10 2023
    
  • Python
    from sympy import floor, sqrt
    def A014217(n): return floor(((1+sqrt(5))/2)**n) # Chai Wah Wu, Dec 17 2021
  • Sage
    [floor(golden_ratio^n) for n in range(37)] # Danny Rorabaugh, Apr 19 2015
    

Formula

a(n) = a(n-1) + 2*a(n-2) - a(n-3) - a(n-4).
a(n) = a(n-1) + a(n-2) + (1-(-1)^n)/2 = a(n-1) + a(n-2) + A000035(n).
a(n) = A000032(n) - (1 + (-1)^n)/2. - Mario Catalani (mario.catalani(AT)unito.it), Jan 17 2003
G.f.: (1-x^2+x^3)/((1+x)*(1-x)*(1-x-x^2)). - R. J. Mathar, Sep 06 2008
a(2n-1) = (Fibonacci(4n+1)-2)/Fibonacci(2n+2). - Gary Detlefs, Feb 16 2011
a(n) = floor(Fibonacci(2n+3)/Fibonacci(n+3)). - Gary Detlefs, Feb 28 2011
a(2n) = Fibonacci(2*n-1) + Fibonacci(2*n+1) - 1. - Gary Detlefs, Mar 10 2011
a(n+2*k) - a(n) = A203976(k)*A000032(n+k) if k odd, a(n+2*k) - a(n) = A203976(k)*A000045(n+k) if k even, for k > 0. - Paul Curtz, Jun 05 2013
a(n) = A052952(n) - A052952(n-2) + A052952(n-3). - R. J. Mathar, Jun 13 2013
a(n+6) - a(n-6) = 40*A000045(n), case k=6 of my formula above. - Paul Curtz, Jun 13 2013
From Paul Curtz, Jun 17 2013: (Start)
a(n-3) + a(n+3) = A153382(n).
a(n-1) + a(n+2) = A022319(n). (End)
For k > 0, a(2k) = A169985(2k)-1 and a(2k+1) = A169985(2k+1) (which is equivalent to Catalani's 2003 formula). - Danny Rorabaugh, Apr 15 2015
a(n) = ((-1)^(1+n)-1)/2 + ((1-sqrt(5))/2)^n + ((1+sqrt(5))/2)^n. - Colin Barker, Nov 05 2017
a(n) = floor(2*sinh(n*arccsch(2))). - Federico Provvedi, Feb 23 2022
E.g.f.: 2*exp(x/2)*cosh(sqrt(5)*x/2) - cosh(x). - Stefano Spezia, Jul 26 2022
a(n) = floor(Fibonacci(n)*phi) + Fibonacci(n-1) = A074331(n) + A000045(n-1) = A052952(n-1) + A000045(n-1). This is the case k=1 of the formula (also found in A128440): floor(k * phi^n) = floor(Fibonacci(n)*k*phi) + Fibonacci(n-1) * k. - Chunqing Liu, Oct 03 2023

Extensions

Corrected by T. D. Noe, Nov 09 2006
Edited by N. J. A. Sloane, Aug 29 2008 at the suggestion of R. J. Mathar

A054888 Layer counting sequence for hyperbolic tessellation by regular pentagons of angle Pi/2.

Original entry on oeis.org

1, 5, 15, 40, 105, 275, 720, 1885, 4935, 12920, 33825, 88555, 231840, 606965, 1589055, 4160200, 10891545, 28514435, 74651760, 195440845, 511670775, 1339571480, 3507043665, 9181559515, 24037634880, 62931345125
Offset: 0

Views

Author

Paolo Dominici (pl.dm(AT)libero.it), May 23 2000

Keywords

Comments

The layer sequence is the sequence of the cardinalities of the layers accumulating around a (finite-sided) polygon of the tessellation under successive side-reflections.

Crossrefs

Programs

  • Haskell
    a054888 n = a054888_list !! (n-1)
    a054888_list = 1 : zipWith (+) (tail a002878_list) a002878_list
    -- Reinhard Zumkeller, Jan 11 2012
    
  • Magma
    [n eq 0 select 1 else 5*Fibonacci(2*n): n in [0..40]]; // G. C. Greubel, Feb 08 2023
    
  • Mathematica
    LinearRecurrence[{3,-1},{1,5,15},30] (* Harvey P. Dale, Jan 15 2023 *)
    Join[{1}, 5*Fibonacci[2*Range[40]]] (* G. C. Greubel, Feb 08 2023 *)
  • PARI
    {a(n)=polcoeff(exp(sum(k=1,n,5*fibonacci(k)^2*x^k/k)+x*O(x^n)), n)} /* Paul D. Hanna, Feb 21 2012 */
    
  • SageMath
    [5*fibonacci(2*n) + int(n==0) for n in range (41)] # G. C. Greubel, Feb 08 2023

Formula

a(n) = 5*A001906(n) + [n=0].
G.f.: (1+x)^2/(1-3*x+x^2).
G.f.: exp( Sum_{n>=1} 5*Fibonacci(n)^2 * x^n/n ). - Paul D. Hanna, Feb 21 2012
a(n) = A001906(n-1) + 2*A001906(n) + A001906(n+1). - R. J. Mathar, Nov 28 2011
a(n) = A203976(A004277(n-1)). - Reinhard Zumkeller, Jan 11 2012
a(n) = 5*A000045(2*n) for n >= 1. - Robert Israel, Jun 01 2015
a(n) = A002878(n-1)+A002878(n). - R. J. Mathar, Jul 09 2024

Extensions

Offset changed to 0 by N. J. A. Sloane, Jan 03 2022 at the suggestion of Michel Marcus

A005013 a(n) = 3*a(n-2) - a(n-4), a(0)=0, a(1)=1, a(2)=1, a(3)=4. Alternates Fibonacci (A000045) and Lucas (A000032) sequences for even and odd n.

Original entry on oeis.org

0, 1, 1, 4, 3, 11, 8, 29, 21, 76, 55, 199, 144, 521, 377, 1364, 987, 3571, 2584, 9349, 6765, 24476, 17711, 64079, 46368, 167761, 121393, 439204, 317811, 1149851, 832040, 3010349, 2178309, 7881196, 5702887, 20633239, 14930352, 54018521, 39088169, 141422324
Offset: 0

Views

Author

Keywords

Comments

S(n,sqrt(5)), with the Chebyshev polynomials A049310, is an integer sequence in the real quadratic number field Q(sqrt(5)) with basis numbers <1,phi>, phi:=(1+sqrt(5))/2. S(n,sqrt(5)) = A(n) + 2*B(n)*phi, with A(n)= a(n+1)*(-1)^n and B(n)= A147600(n-1), n>=0, with A147600(-1):=0.
a(n) = p(n+1) where p(x) is the unique degree-(n-1) polynomial such that p(k) = Fibonacci(k) for k = 1, ..., n. - Michael Somos, Jan 08 2012
Row sums of A227431. - Richard R. Forberg, Jul 29 2013
This is the sequence of Lehmer numbers u_n(sqrt(R),Q) with the parameters R = 5 and Q = 1. It is a strong divisibility sequence, that is, gcd(a(n), a(m)) = a(gcd(n,m)) for all natural numbers n and m. The sequence satisfies a linear recurrence of order four. - Peter Bala, Apr 18 2014
The sequence of convergents of the 2-periodic continued fraction [0; 1, -5, 1, -5, ...] = 1/(1 - 1/(5 - 1/(1 - 1/(5 - ...)))) = (1/2)*(5 - sqrt(5)) begins [0/1, 1/1, 5/4, 4/3, 15/11, 11/8, 40/29, ...]; the denominators give the present sequence. The sequence of numerators [0, 1, 5, 4, 15, 11, 40, ...] is A203976. Cf. A108412 and A026741. - Peter Bala, May 19 2014
Define a binary operation o on the real numbers by x o y = x*sqrt(1 + y^2) + y*sqrt(1 + x^2). The operation o is commutative and associative with identity 0. We have (1/2)*a(2*n + 1) = 1/2 o 1/2 o ... o 1/2 (2*n + 1 terms) and (1/2)*sqrt(5)* a(2*n) = 1/2 o 1/2 o ... o 1/2 (2*n terms). Cf. A084068 and A049629. - Peter Bala, Mar 23 2018

Examples

			G.f. = x + x^2 + 4*x^3 + 3*x^4 + 11*x^5 + 8*x^6 + 29*x^7 + 21*x^8 + 76*x^9 + ...
a(3) = 4 since p(x) = (x^2 - 3*x + 4) / 2 interpolates p(1) = 1, p(2) = 1, p(3) = 2, and p(4) = 4. - _Michael Somos_, Jan 08 2012
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • GAP
    a:=[0,1,1,4];; for n in [5..40] do a[n]:=3*a[n-2]-a[n-4]; od; a; # Muniru A Asiru, Oct 21 2018
  • Haskell
    a005013 n = a005013_list !! n
    a005013_list = alt a000045_list a000032_list where
       alt (f::fs) (:l:ls) = f : l : alt fs ls
    -- Reinhard Zumkeller, Jan 10 2012
    
  • Magma
    I:=[0,1,1,4]; [n le 4 select I[n]  else 3*Self(n-2) - Self(n-4): n in [1..40]]; // Vincenzo Librandi, Feb 09 2016
    
  • Maple
    with(combinat): A005013 := n-> if n mod 2 = 0 then fibonacci(n) else fibonacci(n+1)+fibonacci(n-1); fi;
    A005013:=z*(z**2+z+1)/((z**2+z-1)*(z**2-z-1)); # Simon Plouffe in his 1992 dissertation
  • Mathematica
    CoefficientList[Series[(x + x^2 + x^3)/(1 - 3x^2 + x^4), {x, 0, 40}], x]
    f[n_] = Product[(1 + 4*Sin[k*Pi/n]^2), {k, 1, Floor[(n - 1)/2]}]; a = Table[f[n], {n, 0, 30}]; Round[a]; FullSimplify[ExpandAll[a]] (* Roger L. Bagula and Gary W. Adamson, Nov 26 2008 *)
    LinearRecurrence[{0, 3, 0, -1}, {0, 1, 1, 4}, 100] (* G. C. Greubel, Feb 08 2016 *)
  • PARI
    {a(n) = if( n%2, fibonacci(n+1) + fibonacci(n-1), fibonacci(n))}; /* Michael Somos, Jan 08 2012 */
    
  • PARI
    {a(n) = if( n<0, -a(-n), subst( polinterpolate( vector( n, k, fibonacci(k))), x, n+1))}; /* Michael Somos, Jan 08 2012 */
    

Formula

a(1) = a(2) = 1, a(3) = 4, a(n) = (a(n-1) * a(n-2) - 1) / a(n-3), unless n=3. a(-n) = -a(n).
a(2n) = A001906(n), a(2n+1) = A002878(n). a(n)=F(n+1)+(-1)^(n+1)F(n-1). - Mario Catalani (mario.catalani(AT)unito.it), Sep 20 2002
G.f.: x*(1+x+x^2)/((1-x-x^2)*(1+x-x^2)).
a(n) = Product_{k=1..floor((n-1)/2)} (1 + 4*sin(k*Pi/n)^2). - Roger L. Bagula and Gary W. Adamson, Nov 26 2008
Binomial transform is A096140. - Michael Somos, Apr 13 2012
From Peter Bala, Apr 18 2014: (Start)
a(n) = (alpha^n - beta^n)/(alpha - beta) for n odd, and a(n) = (alpha^n - beta^n)/(alpha^2 - beta^2) for n even, where alpha = (1/2)*(sqrt(5) + 1) and beta = (1/2)*(sqrt(5) - 1). Equivalently, a(n) = U(n-1, sqrt(5)/2) for n odd and a(n) = (1/sqrt(5))*U(n-1, sqrt(5)/2) for n even, where U(n,x) is the Chebyshev polynomial of the second kind. (End)
E.g.f.: (Phi/sqrt(5))*exp(-Phi*x)*(exp(x)-1)*(exp(sqrt(5)*x) - 1/(Phi)^2), where Phi = (1+sqrt(5))/2. - G. C. Greubel, Feb 08 2016
a(n) = (5^floor((n-1)/2)/2^(n-1))*Sum_{k=0..n-1} binomial(n-1,k)/5^floor(k/2). - Tony Foster III, Oct 21 2018
a(n) = hypergeom([(1 - n)/2, (n + 1) mod 2 - n/2], [1 - n], -4) for n >= 2. - Peter Luschny, Sep 03 2019

Extensions

Additional comments from Michael Somos, Jun 01 2000

A108412 Expansion of (1 + x + x^2)/(1 - 4x^2 + x^4).

Original entry on oeis.org

1, 1, 5, 4, 19, 15, 71, 56, 265, 209, 989, 780, 3691, 2911, 13775, 10864, 51409, 40545, 191861, 151316, 716035, 564719, 2672279, 2107560, 9973081, 7865521, 37220045, 29354524, 138907099, 109552575, 518408351, 408855776, 1934726305
Offset: 0

Views

Author

Ralf Stephan, Jun 05 2005

Keywords

Comments

This is the sequence of Lehmer numbers u_n(sqrt(R),Q) with the parameters R = 6 and Q = 1. It is a strong divisibility sequence, that is, gcd(a(n),a(m)) = a(gcd(n,m)) for all natural numbers n and m. The sequence satisfies a linear recurrence of order four. - Peter Bala, Apr 18 2014
The sequence of convergents of the 2-periodic continued fraction [0; 1, -6, 1, -6, ...] = 1/(1 - 1/(6 - 1/(1 - 1/(6 - ...)))) = 3 - sqrt(3) begins [0/1, 1/1, 6/5, 5/4, 24/19, 19/15, 90/71,...]. The present sequence is the sequence of denominators; the sequence of numerators of the continued fraction convergents [1, 6, 5, 24, 19, 90,...] is also a strong divisibility sequence. Cf. A005013 and A203976. - Peter Bala, May 19 2014
From Peter Bala, Mar 25 2018: (Start)
The following remarks assume an offset of 1.
Define a binary operation o on the real numbers by x o y = x*sqrt(1 + (1/2)*y^2) + y*sqrt(1 + (1/2)*x^2). The operation o is commutative and associative with identity 0. We have a(2*n + 1) = 1 o 1 o ... o 1 (2*n + 1 terms) and sqrt(6)*a(2*n) = (1 o 1 o ... o 1) (2*n terms). Cf. A005013 and A084068. For example, 1 o 1 = sqrt(6) and 1 o 1 o 1 = sqrt(6) o 1 = 5 = a(3).
From the obvious identity ( 1 o 1 o ... o 1 (2*n terms) ) o ( 1 o 1 o ... o 1 (2*m terms) ) = 1 o 1 o ... o 1 (2*n + 2*m terms) we find the relation a(2*n+2*m) = a(2*n)*sqrt(1 + 3*a(2*m)^2) + a(2*m)*sqrt(1 + 3*a(2*n)^2).
Similarly, from a(2*n+1) o a(2*m+1) = sqrt(6)*a(2*n+2*m+2) we find sqrt(6)*a(2*n+2*m+2) = a(2*n+1)*sqrt(1 + (1/2)*a(2*m+1)^2) + a(2*m+1)*sqrt(1 + (1/2)*a(2*n+1)^2). (End)

Examples

			G.f. = 1 + x + 5*x^2 + 4*x^3 + 19*x^4 + 15*x^5 + 71*x^6 + 56*x^7 + ...
		

Crossrefs

Programs

  • Maple
    a := proc (n) if `mod`(n, 2) = 1 then 1/sqrt(2)*( ((sqrt(6) + sqrt(2))/2 )^n - ( (sqrt(6) - sqrt(2))/2 )^n) else 1/sqrt(12)*( ((sqrt(6) + sqrt(2))/2 )^n - ( (sqrt(6) - sqrt(2))/2 )^n) end if;
    end proc:
    seq(simplify(a(n)), n = 1..30); # Peter Bala, Mar 25 2018
  • Mathematica
    CoefficientList[Series[(1+x+x^2)/(1-4x^2+x^4),{x,0,40}],x] (* or *) LinearRecurrence[{0,4,0,-1},{1,1,5,4},40] (* Harvey P. Dale, Nov 15 2012 *)
  • PARI
    {a(n) = my( w = quadgen(24)); simplify( polchebyshev( n, 2, w/2) / if( n%2, w, 1))}; /* Michael Somos, Feb 10 2015 */

Formula

a(0)=a(1)=1, a(2)=5, a(n)a(n+3) - a(n+1)a(n+2) = -1.
a(0)=1, a(1)=1, a(2)=5, a(3)=4, a(n) = 4*a(n-2)-a(n-4). - Harvey P. Dale, Nov 15 2012
a(n) = (alpha^n - beta^n)/(alpha - beta) for n odd, and a(n) = (alpha^n - beta^n)/(alpha^2 - beta^2) for n even, where alpha = (1/2)*(sqrt(6) + sqrt(2)) (A188887) and beta = (1/2)*(sqrt(6) - sqrt(2)) (A101263). Equivalently, a(n) = U(n-1,sqrt(6)/2) for n odd and a(n) = (1/sqrt(6))*U(n-1,sqrt(6)/2) for n even, where U(n,x) is the Chebyshev polynomial of the second kind. - Peter Bala, Apr 18 2014
a(2*n) = A001834(n). a(2*n + 1) = A001353(n+1). - Michael Somos, Feb 10 2015
a(n) = -a(-2-n) for all n in Z. - Michael Somos, Feb 10 2015

A330050 a(n) = 2*((-1)^n - 1)*(F(n) - 1) - (3*(-1)^n + 7)/2 * F(n+1) + 5*F(n+1)^2.

Original entry on oeis.org

0, 3, 10, 35, 100, 288, 780, 2115, 5610, 14883, 39160, 103040, 270280, 708963, 1857450, 4866435, 12744060, 33373728, 87382900, 228795875, 599019850, 1568318403, 4105974960, 10749749760, 28143378000, 73680759363, 192899171530, 505017737315, 1322154751060
Offset: 0

Views

Author

Michael Somos, Nov 29 2019

Keywords

Examples

			G.f. = 3*x + 10*x^2 + 35*x^3 + 100*x^4 + 288*x^5 + 780*x^6 + 2115*x^7 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := 2((-1)^n - 1)(Fibonacci[n] - 1) - (3(-1)^n + 7)/2 Fibonacci[n + 1] + 5 Fibonacci[n + 1]^2;
    LinearRecurrence[{4,-1,-11,11,1,-4,1},{0,3,10,35,100,288,780},30] (* Harvey P. Dale, Feb 10 2024 *)
  • PARI
    {a(n) = n = abs(n+1)-1; polcoeff( x * O(x^n) + (3*x - 2*x^2 - 2*x^3 + 3*x^4) / (1 - 4*x + x^2 + 11*x^3 - 11*x^4 - x^5 + 4*x^6 - x^7), n)};

Formula

G.f.: (3*x - 2*x^2 - 2*x^3 + 3*x^4) / (1 - 4*x + x^2 + 11*x^3 - 11*x^4 - x^5 + 4*x^6 - x^7).
a(n) = 2 + L(2*n+2) - F(n+4) - (L(-n+2) + F(n+1))/2 where F=A000045, L=A000032.
a(n) + b(n) * sqrt(5) = F(2*n+2) * Product_{k=2..n} 1 / (1 - q^k/(1 - q^(2*k))) where q = (sqrt(5)-1)/2 and b=A330051.
a(n) = A203976(floor(n/2)+1) * A329421(n).
a(n) = a(-2-n) for all n in Z.

A226377 Lucas numbers differences triangle T(n,k), k<=n, where column k+1 holds the k-th differences of A000204, read by rows.

Original entry on oeis.org

1, 3, 2, 4, 1, -1, 7, 3, 2, 3, 11, 4, 1, -1, -4, 18, 7, 3, 2, 3, 7, 29, 11, 4, 1, -1, -4, -11, 47, 18, 7, 3, 2, 3, 7, 18, 76, 29, 11, 4, 1, -1, -4, -11, -29, 123, 47, 18, 7, 3, 2, 3, 7, 18, 47, 199, 76, 29, 11, 4, 1, -1, -4, -1, -29, -76, -199
Offset: 1

Views

Author

Richard R. Forberg, Jul 31 2013

Keywords

Comments

Consecutive columns (i.e. k =1,2,3...) shift the Lucas sequence (A000204) down by 2 indices.
Diagonal (n=k) produces A061084, and Lucas numbers at increasingly negative indices for n=k>2.
Row sums equal A203976(n) for n=>1, which equals Lucas numbers A000204(n) if n is odd, and 5 * A000045(2*n) (Fibonacci) if n is even.
Compare A227431 which is a differences triangle for the Fibonacci sequence A000045.

Examples

			Triangle begins:
1;
3,  2;
4,  1, -1;
7,  3,  2,  3;
11,  4,  1, -1, -4;
18,  7,  3,  2,  3,  7;
29, 11,  4,  1, -1, -4, -11;
47, 18,  7,  3,  2,  3,   7,  18;
76, 29, 11,  4,  1, -1,  -4, -11, -29;
...
		

Crossrefs

Formula

T(n,1) = A000204(n) for n>0, T(n,k) = T(n,k-1) - T(n-1,k-1).
Showing 1-7 of 7 results.