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 11-20 of 32 results. Next

A084214 Inverse binomial transform of a math magic problem.

Original entry on oeis.org

1, 1, 4, 6, 14, 26, 54, 106, 214, 426, 854, 1706, 3414, 6826, 13654, 27306, 54614, 109226, 218454, 436906, 873814, 1747626, 3495254, 6990506, 13981014, 27962026, 55924054, 111848106, 223696214, 447392426, 894784854, 1789569706, 3579139414, 7158278826, 14316557654
Offset: 0

Views

Author

Paul Barry, May 19 2003

Keywords

Comments

Inverse binomial transform of A060816.

Crossrefs

Programs

  • Haskell
    a084214 n = a084214_list !! n
    a084214_list = 1 : xs where
       xs = 1 : 4 : zipWith (+) (map (* 2) xs) (tail xs)
    -- Reinhard Zumkeller, Aug 01 2011
    
  • Magma
    [(5*2^n-3*0^n+4*(-1)^n)/6: n in [0..35]]; // Vincenzo Librandi, Jun 15 2011
    
  • Maple
    A084214 := proc(n)
        (5*2^n - 3*0^n + 4*(-1)^n)/6 ;
    end proc:
    seq(A084214(n),n=0..60) ; # R. J. Mathar, Aug 18 2024
  • Mathematica
    f[n_]:=2/(n+1);x=3;Table[x=f[x];Numerator[x],{n,0,5!}] (* Vladimir Joseph Stephan Orlovsky, Mar 12 2010 *)
    LinearRecurrence[{1,2},{1,1,4},50] (* Harvey P. Dale, Mar 05 2021 *)
  • PARI
    a(n) = 5<<(n-1)\3 + bitnegimply(1,n); \\ Kevin Ryde, Dec 20 2023

Formula

a(n) = (5*2^n - 3*0^n + 4*(-1)^n)/6.
G.f.: (1+x^2)/((1+x)*(1-2*x)).
E.g.f.: (5*exp(2*x) - 3*exp(0) + 4*exp(-x))/6.
From Paul Barry, May 04 2004: (Start)
The binomial transform of a(n+1) is A020989(n).
a(n) = A001045(n-1) + A001045(n+1) - 0^n/2. (End)
a(n) = Sum_{k=0..n} A001045(n+1)*C(1, k/2)*(1+(-1)^k)/2. - Paul Barry, Oct 15 2004
a(n) = a(n-1) + 2*a(n-2) for n > 2. - Klaus Brockhaus, Dec 01 2009
From Yuchun Ji, Mar 18 2019: (Start)
a(n+1) = Sum_{i=0..n} a(i) + 1 - (-1)^n, a(0)=1.
a(n) = A000975(n-3)*10 + 5 + (-1)^(n-3), a(0)=1, a(1)=1, a(2)=4. (End)
a(n) = A081254(n) + (n-1 mod 2). - Kevin Ryde, Dec 20 2023
a(n) = 2*A048573(n-2) for n>=2. - Alois P. Heinz, May 20 2025

A374439 Triangle read by rows: the coefficients of the Lucas-Fibonacci polynomials. T(n, k) = T(n - 1, k) + T(n - 2, k - 2) with initial values T(n, k) = k + 1 for k < 2.

Original entry on oeis.org

1, 1, 2, 1, 2, 1, 1, 2, 2, 2, 1, 2, 3, 4, 1, 1, 2, 4, 6, 3, 2, 1, 2, 5, 8, 6, 6, 1, 1, 2, 6, 10, 10, 12, 4, 2, 1, 2, 7, 12, 15, 20, 10, 8, 1, 1, 2, 8, 14, 21, 30, 20, 20, 5, 2, 1, 2, 9, 16, 28, 42, 35, 40, 15, 10, 1, 1, 2, 10, 18, 36, 56, 56, 70, 35, 30, 6, 2
Offset: 0

Views

Author

Peter Luschny, Jul 22 2024

Keywords

Comments

There are several versions of Lucas and Fibonacci polynomials in this database. Our naming follows the convention of calling polynomials after the values of the polynomials at x = 1. This assumes a regular sequence of polynomials, that is, a sequence of polynomials where degree(p(n)) = n. This view makes the coefficients of the polynomials (the terms of a row) a refinement of the values at the unity.
A remarkable property of the polynomials under consideration is that they are dual in this respect. This means they give the Lucas numbers at x = 1 and the Fibonacci numbers at x = -1 (except for the sign). See the example section.
The Pell numbers and the dual Pell numbers are also values of the polynomials, at the points x = -1/2 and x = 1/2 (up to the normalization factor 2^n). This suggests a harmonized terminology: To call 2^n*P(n, -1/2) = 1, 0, 1, 2, 5, ... the Pell numbers (A000129) and 2^n*P(n, 1/2) = 1, 4, 9, 22, ... the dual Pell numbers (A048654).
Based on our naming convention one could call A162515 (without the prepended 0) the Fibonacci polynomials. In the definition above only the initial values would change to: T(n, k) = k + 1 for k < 1. To extend this line of thought we introduce A374438 as the third triangle of this family.
The triangle is closely related to the qStirling2 numbers at q = -1. For the definition of these numbers see A333143. This relates the triangle to A065941 and A103631.

Examples

			Triangle starts:
  [ 0] [1]
  [ 1] [1, 2]
  [ 2] [1, 2, 1]
  [ 3] [1, 2, 2,  2]
  [ 4] [1, 2, 3,  4,  1]
  [ 5] [1, 2, 4,  6,  3,  2]
  [ 6] [1, 2, 5,  8,  6,  6,  1]
  [ 7] [1, 2, 6, 10, 10, 12,  4,  2]
  [ 8] [1, 2, 7, 12, 15, 20, 10,  8,  1]
  [ 9] [1, 2, 8, 14, 21, 30, 20, 20,  5,  2]
  [10] [1, 2, 9, 16, 28, 42, 35, 40, 15, 10, 1]
.
Table of interpolated sequences:
  |  n | A039834 & A000045 | A000032 |   A000129   |   A048654  |
  |  n |     -P(n,-1)      | P(n,1)  |2^n*P(n,-1/2)|2^n*P(n,1/2)|
  |    |     Fibonacci     |  Lucas  |     Pell    |    Pell*   |
  |  0 |        -1         |     1   |       1     |       1    |
  |  1 |         1         |     3   |       0     |       4    |
  |  2 |         0         |     4   |       1     |       9    |
  |  3 |         1         |     7   |       2     |      22    |
  |  4 |         1         |    11   |       5     |      53    |
  |  5 |         2         |    18   |      12     |     128    |
  |  6 |         3         |    29   |      29     |     309    |
  |  7 |         5         |    47   |      70     |     746    |
  |  8 |         8         |    76   |     169     |    1801    |
  |  9 |        13         |   123   |     408     |    4348    |
		

Crossrefs

Triangles related to Lucas polynomials: A034807, A114525, A122075, A061896, A352362.
Triangles related to Fibonacci polynomials: A162515, A053119, A168561, A049310, A374441.
Sums include: A000204 (Lucas numbers, row), A000045 & A212804 (even sums, Fibonacci numbers), A006355 (odd sums), A039834 (alternating sign row).
Type m^n*P(n, 1/m): A000129 & A048654 (Pell, m=2), A108300 & A003688 (m=3), A001077 & A048875 (m=4).
Adding and subtracting the values in a row of the table (plus halving the values obtained in this way): A022087, A055389, A118658, A052542, A163271, A371596, A324969, A212804, A077985, A069306, A215928.
Columns include: A040000 (k=1), A000027 (k=2), A005843 (k=3), A000217 (k=4), A002378 (k=5).
Diagonals include: A000034 (k=n), A029578 (k=n-1), abs(A131259) (k=n-2).
Cf. A029578 (subdiagonal), A124038 (row reversed triangle, signed).

Programs

  • Magma
    function T(n,k) // T = A374439
      if k lt 0 or k gt n then return 0;
      elif k le 1 then return k+1;
      else return T(n-1,k) + T(n-2,k-2);
      end if;
    end function;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jan 23 2025
    
  • Maple
    A374439 := (n, k) -> ifelse(k::odd, 2, 1)*binomial(n - irem(k, 2) - iquo(k, 2), iquo(k, 2)):
    # Alternative, using the function qStirling2 from A333143:
    T := (n, k) -> 2^irem(k, 2)*qStirling2(n, k, -1):
    seq(seq(T(n, k), k = 0..n), n = 0..10);
  • Mathematica
    A374439[n_, k_] := (# + 1)*Binomial[n - (k + #)/2, (k - #)/2] & [Mod[k, 2]];
    Table[A374439[n, k], {n, 0, 10}, {k, 0, n}]//Flatten (* Paolo Xausa, Jul 24 2024 *)
  • Python
    from functools import cache
    @cache
    def T(n: int, k: int) -> int:
        if k > n: return 0
        if k < 2: return k + 1
        return T(n - 1, k) + T(n - 2, k - 2)
    
  • Python
    from math import comb as binomial
    def T(n: int, k: int) -> int:
        o = k & 1
        return binomial(n - o - (k - o) // 2, (k - o) // 2) << o
    
  • Python
    def P(n, x):
        if n < 0: return P(n, x)
        return sum(T(n, k)*x**k for k in range(n + 1))
    def sgn(x: int) -> int: return (x > 0) - (x < 0)
    # Table of interpolated sequences
    print("|  n | A039834 & A000045 | A000032 |   A000129   |   A048654  |")
    print("|  n |     -P(n,-1)      | P(n,1)  |2^n*P(n,-1/2)|2^n*P(n,1/2)|")
    print("|    |     Fibonacci     |  Lucas  |     Pell    |    Pell*   |")
    f = "| {0:2d} | {1:9d}         |  {2:4d}   |   {3:5d}     |    {4:4d}    |"
    for n in range(10): print(f.format(n, -P(n, -1), P(n, 1), int(2**n*P(n, -1/2)), int(2**n*P(n, 1/2))))
    
  • SageMath
    from sage.combinat.q_analogues import q_stirling_number2
    def A374439(n,k): return (-1)^((k+1)//2)*2^(k%2)*q_stirling_number2(n+1, k+1, -1)
    print(flatten([[A374439(n, k) for k in range(n+1)] for n in range(13)])) # G. C. Greubel, Jan 23 2025

Formula

T(n, k) = 2^k' * binomial(n - k' - (k - k') / 2, (k - k') / 2) where k' = 1 if k is odd and otherwise 0.
T(n, k) = (1 + (k mod 2))*qStirling2(n, k, -1), see A333143.
2^n*P(n, -1/2) = A000129(n - 1), Pell numbers, P(-1) = 1.
2^n*P(n, 1/2) = A048654(n), dual Pell numbers.
T(2*n, n) = (1/2)*(-1)^n*( (1+(-1)^n)*A005809(n/2) - 2*(1-(-1)^n)*A045721((n-1)/2) ). - G. C. Greubel, Jan 23 2025

A221174 a(0)=-4, a(1)=5; thereafter a(n) = 2*a(n-1) + a(n-2).

Original entry on oeis.org

-4, 5, 6, 17, 40, 97, 234, 565, 1364, 3293, 7950, 19193, 46336, 111865, 270066, 651997, 1574060, 3800117, 9174294, 22148705, 53471704, 129092113, 311655930, 752403973, 1816463876, 4385331725, 10587127326, 25559586377, 61706300080, 148972186537, 359650673154
Offset: 0

Views

Author

N. J. A. Sloane, Jan 04 2013

Keywords

Comments

From Greg Dresden, May 08 2023: (Start)
For n >= 3, 2*a(n) is the number of ways to tile this figure of length n-1 with two colors of squares and one color of domino. For n=8, we have here the figure of length n-1=7, and it has 2*a(8) = 2728 different tilings.
.
|||_ _ _
|||_|||_|_|
(End)

Crossrefs

Programs

  • Haskell
    a221174 n = a221174_list !! n
    a221174_list = -4 : 5 : zipWith (+)
                            (map (* 2) $ tail a221174_list) a221174_list
    -- Reinhard Zumkeller, Jan 04 2013
    
  • Mathematica
    LinearRecurrence[{2, 1}, {-4, 5}, 50] (* Paolo Xausa, Sep 02 2024 *)
  • PARI
    Vec(-(13*x-4)/(x^2+2*x-1) + O(x^50)) \\ Colin Barker, Jul 10 2015

Formula

a(n) = 13*A000129(n) - 4*A000129(n+1). - R. J. Mathar, Jan 14 2013
G.f.: -(13*x-4) / (x^2+2*x-1). - Colin Barker, Jul 10 2015
a(n) is the numerator of the continued fraction [4, 2, ..., 2, 4] with n-3 2's in the middle. For denominators, see A048654. - Greg Dresden and Tongjia Rao, Sep 02 2021

A048694 Generalized Pellian with second term equal to 7.

Original entry on oeis.org

1, 7, 15, 37, 89, 215, 519, 1253, 3025, 7303, 17631, 42565, 102761, 248087, 598935, 1445957, 3490849, 8427655, 20346159, 49119973, 118586105, 286292183, 691170471, 1668633125, 4028436721, 9725506567
Offset: 0

Views

Author

Keywords

Comments

Pisano period lengths: 1, 1, 8, 4, 12, 8, 6, 4, 24, 12, 24, 8, 28, 6, 24, 8, 16, 24, 40, 12, ... . - R. J. Mathar, Aug 10 2012

Crossrefs

Programs

  • Maple
    with(combinat): a:=n->5*fibonacci(n, 2)+fibonacci(n+1, 2): seq(a(n), n=0..26); # Zerinvary Lajos, Apr 04 2008
  • Mathematica
    a[n_]:=(MatrixPower[{{1,2},{1,1}},n].{{6},{1}})[[2,1]]; Table[a[n],{n,0,40}] (* Vladimir Joseph Stephan Orlovsky, Feb 20 2010 *)
    LinearRecurrence[{2,1},{1,7},40] (* Harvey P. Dale, Jul 22 2011 *)
  • Maxima
    a[0]:1$
    a[1]:7$
    a[n]:=2*a[n-1]+a[n-2]$
    A048694(n):=a[n]$
    makelist(A048694(n),n,0,30); /* Martin Ettl, Nov 03 2012 */

Formula

a(n) = ((6+sqrt(2))(1+sqrt(2))^n - (6-sqrt(2))(1-sqrt(2))^n)/2*sqrt(2).
a(n) = 2*a(n-1) + a(n-2); a(0)=1, a(1)=7.
G.f.: (1+5*x)/(1 - 2*x - x^2). - Philippe Deléham, Nov 03 2008
a(n) = ((1+sqrt(18))(1+sqrt(2))^n+(1-sqrt(18))(1-sqrt(2))^n)/2 offset 0. a(n) = first binomial transform of 1,6,2,12,4,24. - Al Hakanson (hawkuu(AT)gmail.com), Aug 01 2009

A048696 Generalized Pellian with second term equal to 9.

Original entry on oeis.org

1, 9, 19, 47, 113, 273, 659, 1591, 3841, 9273, 22387, 54047, 130481, 315009, 760499, 1836007, 4432513, 10701033, 25834579, 62370191, 150574961, 363520113, 877615187, 2118750487, 5115116161, 12348982809, 29813081779, 71975146367
Offset: 0

Views

Author

Keywords

Comments

Binomial transform of 5,6,10,12,20,24,40. - Al Hakanson (hawkuu(AT)gmail.com), Aug 12 2009
Binomial transform of A164587. Inverse binomial transform of A164298. - Klaus Brockhaus, Aug 17 2009
For n > 0: a(n) = A105082(n) - A105082(n-1). - Reinhard Zumkeller, Dec 15 2013

Crossrefs

Programs

  • Haskell
    a048696 n = a048696_list !! n
    a048696_list = 1 : 9 : zipWith (+)
                   a048696_list (map (2 *) $ tail a048696_list)
    -- Reinhard Zumkeller, Dec 15 2013
  • Magma
    [ n le 2 select 8*n-7 else 2*Self(n-1)+Self(n-2): n in [1..28] ]; // Klaus Brockhaus, Aug 17 2009
    
  • Maple
    with(combinat): a:=n->7*fibonacci(n, 2)+fibonacci(n+1, 2): seq(a(n), n=0..25); # Zerinvary Lajos, Apr 04 2008
  • Mathematica
    a[n_]:=(MatrixPower[{{1,2},{1,1}},n].{{8},{1}})[[2,1]]; Table[a[n],{n,0,40}] (* Vladimir Joseph Stephan Orlovsky, Feb 20 2010 *)
    LinearRecurrence[{2,1},{1,9},30] (* Harvey P. Dale, Apr 20 2012 *)
  • Maxima
    a[0]:1$
    a[1]:9$
    a[n]:=2*a[n-1]+a[n-2]$
    A048696(n):=a[n]$
    makelist(A048696(n),n,0,30); /* Martin Ettl, Nov 03 2012 */
    

Formula

a(n) = 2*a(n-1) + a(n-2); a(0)=1, a(1)=9.
a(n) = ((4*sqrt(2)+1)(1+sqrt(2))^n - (4*sqrt(2)-1)(1-sqrt(2))^n)/2.
G.f.: (1+7*x)/(1 - 2*x - x^2). - Philippe Deléham, Nov 03 2008

A164073 a(n) = 2*a(n-2) for n > 2; a(1) = 1, a(2) = 3.

Original entry on oeis.org

1, 3, 2, 6, 4, 12, 8, 24, 16, 48, 32, 96, 64, 192, 128, 384, 256, 768, 512, 1536, 1024, 3072, 2048, 6144, 4096, 12288, 8192, 24576, 16384, 49152, 32768, 98304, 65536, 196608, 131072, 393216, 262144, 786432, 524288, 1572864, 1048576, 3145728, 2097152, 6291456
Offset: 1

Views

Author

Klaus Brockhaus, Aug 09 2009

Keywords

Comments

Interleaving of A000079 and A007283.
Binomial transform is A048654. Second binomial transform is A111567. Third binomial transform is A081179 without initial 0. Fourth binomial transform is A164072. Fifth binomial transform is A164031.
Absolute second differences are the sequence itself. - Eric Angelini, Jul 30 2013
Least number having n - 1 Gaussian prime factors, counted with multiplicity, excluding units. See A239628 for a similar sequence. - T. D. Noe, Mar 31 2014
Writing the prime factorizations of the terms of this sequence, the exponents of prime factor 2 give the integers repeated (A004526), while the exponents of prime factor 3 give the sequence of alternating 0's and 1's (A000035). - Alonso del Arte, Nov 30 2016

Crossrefs

Programs

  • Magma
    [ n le 2 select 2*n-1 else 2*Self(n-2): n in [1..42] ];
    
  • Mathematica
    terms = 50; CoefficientList[Series[x * (1 + 3 * x)/(1 - 2 * x^2), {x, 0, terms}], x] (* T. D. Noe, Mar 31 2014 *)
    Flatten[Table[{2^n, 3 * 2^n}, {n, 0, 31}]] (* Alonso del Arte, Nov 30 2016 *)
    CoefficientList[Series[x (1 + 3 x)/(1 - 2 x^2), {x, 0, 44}], x] (* Michael De Vlieger, Dec 13 2016 *)
  • PARI
    a(n) = (5 + (-1)^n) * 2^((2*n-9)\/4)
    
  • PARI
    Vec(x*(1+3*x)/(1-2*x^2)+O(x^99)) \\ Charles R Greathouse IV, Dec 13 2016

Formula

a(n) = (5 + (-1)^n) * 2^(1/4 * (2*n - 1 + (-1)^n))/4.
G.f.: x*(1 + 3 * x)/(1 - 2 * x^2).
a(n) = A074323(n), n>=1.
a(n) = A162255(n-1), n>=2.
a(n) = A072946(n-2), n > 2. - R. J. Mathar, Aug 17 2009
a(n+3) = a(n + 2) * a(n + 1)/a(n). - Reinhard Zumkeller, Mar 04 2011
a(n) = (2/3)a(n - 1) for odd n > 1, a(n) = 3a(n - 1) for even n. - Alonso del Arte, Nov 30 2016

A048693 Generalized Pellian with 2nd term equal to 6.

Original entry on oeis.org

1, 6, 13, 32, 77, 186, 449, 1084, 2617, 6318, 15253, 36824, 88901, 214626, 518153, 1250932, 3020017, 7290966, 17601949, 42494864, 102591677, 247678218, 597948113, 1443574444, 3485097001, 8413768446
Offset: 0

Views

Author

Keywords

Comments

Pisano period lengths: 1, 2, 8, 4, 12, 8, 6, 8, 24, 12, 24, 8, 28, 6, 24, 16, 16, 24, 40, 12, ... (is this A175181?). - R. J. Mathar, Aug 10 2012

Examples

			a(n)=[ (5+sqrt(2))(1+sqrt(2))^n-(5-sqrt(2))(1-sqrt(2))^n ]/2*sqrt(2)
		

Crossrefs

Programs

  • Maple
    with(combinat): a:=n->4*fibonacci(n-1,2)+fibonacci(n,2): seq(a(n), n=1..26); # Zerinvary Lajos, Apr 04 2008
  • Mathematica
    a[n_]:=(MatrixPower[{{1,2},{1,1}},n].{{5},{1}})[[2,1]]; Table[a[n],{n,0,40}] (* Vladimir Joseph Stephan Orlovsky, Feb 20 2010 *)
    LinearRecurrence[{2,1},{1,6},30] (* Harvey P. Dale, Mar 29 2013 *)
  • Maxima
    a[0]:1$
    a[1]:6$
    a[n]:=2*a[n-1]+a[n-2]$
    A048693(n):=a[n]$
    makelist(A048693(n),n,0,30); /* Martin Ettl, Nov 03 2012 */

Formula

a(n) = 2*a(n-1) + a(n-2); a(0)=1, a(1)=6.
G.f.: (1+4*x)/(1 - 2*x - x^2). - Philippe Deléham, Nov 03 2008
a(n) = 4*A000129(n) + A000129(n+1). - R. J. Mathar, Aug 10 2012

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

Original entry on oeis.org

5, 14, 33, 80, 193, 466, 1125, 2716, 6557, 15830, 38217, 92264, 222745, 537754, 1298253, 3134260, 7566773, 18267806, 44102385, 106472576, 257047537, 620567650, 1498182837, 3616933324, 8732049485, 21081032294, 50894114073
Offset: 0

Views

Author

Creighton Dement, Apr 06 2005

Keywords

Comments

A floretion-generated, Pellian related sequence.
Floretion Algebra Multiplication Program, FAMP Code: lesloop(infty)-tesforseq[ + .25'i + .25i' - .25'ii' - .25'jj' - .25'kk' + .25'jk' + .25'kj' - .25e ], Fortype: 1A.
For n > 0: A048696(n) = a(n) - a(n-1). - Reinhard Zumkeller, Dec 15 2013

Crossrefs

Programs

  • Haskell
    a105082 n = a105082_list !! n
    a105082_list = scanl (+) 5 $ tail a048696_list
    -- Reinhard Zumkeller, Dec 15 2013

Formula

a(n+2) = 2*a(n+1) + a(n); FAMP result: a(n) = 2*A001333(n) + 3*A048654(n); SuperSeeker results: a(n+1) - a(n) = A048696(n+1); a(n) + a(n+1) = A048696(n+2)
a(n) = ((9+5*sqrt(2))*(1+sqrt(2))^n - (9-5*sqrt(2))*(1-sqrt(2))^n)/(2*sqrt(2)) - Lambert Herrgesell (zero815(AT)googlemail.com), Jan 26 2007

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

Original entry on oeis.org

2, 2, 1, 3, 4, 8, 9, 19, 22, 46, 53, 111, 128, 268, 309, 647, 746, 1562, 1801, 3771, 4348, 9104, 10497, 21979, 25342, 53062, 61181, 128103, 147704, 309268, 356589, 746639, 860882, 1802546, 2078353, 4351731, 5017588, 10506008, 12113529, 25363747, 29244646, 61233502
Offset: 0

Views

Author

Raphie Frank, Dec 30 2015

Keywords

Comments

This sequence gives all x in N | 2*x^2 - 7(-1)^x = y^2. The companion sequence to this sequence, giving y values, is A266505.
A266505(n)/a(n) converges to sqrt(2).
Alternatively, 1/4*(3*A002203(floor[n/2]) - A002203(n-(-1)^n)), where A002203 gives the Companion Pell numbers, or, in Lucas sequence notation, V_n(2, -1).
Alternatively, bisection of A266506.
Alternatively, A048654(n -1) and A078343(n + 1) interlaced.
Alternatively, A100525(n-1), A266507(n), A038761(n) and A253811(n) interlaced.
Let b(n) = (a(n) - a(n)(mod 2))/2, that is b(n) = {1, 1, 0, 1, 2, 4, 4, 9, 11, 23, 26, 55, 64, ...}. Then:
A006452(n) = {b(4n+0) U b(4n+1)} gives n in N such that n^2 - 1 is triangular;
A216134(n) = {b(4n+2) U b(4n+3)} gives n in N such that n^2 + n + 1 is triangular (indices of Sophie Germain triangular numbers);
A216162(n) = {b(4n+0) U b(4n+2) U b(4n+1) U b(4n+3)}, sequences A006452 and A216134 interlaced.

Crossrefs

Programs

  • Magma
    I:=[2,2,1,3]; [n le 4 select I[n] else 2*Self(n-2)+Self(n-4): n in [1..70]]; // Vincenzo Librandi, Dec 31 2015
    
  • Mathematica
    LinearRecurrence[{0, 2, 0, 1}, {2, 2, 1, 3}, 70] (* Vincenzo Librandi, Dec 31 2015 *)
    Table[SeriesCoefficient[(1 - x) (2 + 4 x + x^2)/(1 - 2 x^2 - x^4), {x, 0, n}], {n, 0, 41}] (* Michael De Vlieger, Dec 31 2015 *)
  • PARI
    Vec((1-x)*(2+4*x+x^2)/(1-2*x^2-x^4) + O(x^50)) \\ Colin Barker, Dec 31 2015

Formula

a(n) = 1/sqrt(8)*(+sqrt(2)*(1+sqrt(2))^(floor(n/2)-(-1)^n)*(-1)^n - 3*(1-sqrt(2))^(floor(n/2)-(-1)^n) + sqrt(2)*(1-sqrt(2))^(floor(n/2)-(-1)^n)*(-1)^n + 3*(1+sqrt(2))^(floor(n/2)-(-1)^n)).
a(n) = 1/4*((3*((1+sqrt(2))^floor(n/2)+(1-sqrt(2))^floor(n/2))) - (-1)^n*((1+sqrt(2))^(floor(n/2)-(-1)^n)+(1-sqrt(2))^(floor(n/2)-(-1)^n))).
a(2n) = (+sqrt(2)*(1+sqrt(2))^(n-1) - 3 *(1-sqrt(2))^(n-1) + sqrt(2)*(1-sqrt(2))^(n-1) + 3*(1 + sqrt(2))^(n-1))/sqrt(8) = A048654(n -1).
a(2n) = 1/4*((3*((1+sqrt(2))^n+(1-sqrt(2))^n)) - ((1+sqrt(2))^(n-1)+(1-sqrt(2))^(n-1))) = A048654(n -1).
a(2n + 1) = (-sqrt(2)*(1+sqrt(2))^(n+1) - 3 *(1-sqrt(2))^(n+1) - sqrt(2)*(1-sqrt(2))^(n+1) + 3*(1+sqrt(2))^(n+1))/sqrt(8) = A078343(n + 1).
a(2n + 1) =1/4*((3*((1+sqrt(2))^n+(1-sqrt(2))^n)) + ((1+sqrt(2))^(n+1)+(1-sqrt(2))^(n+1))) = A078343(n + 1).
a(4n + 0) = 6*a(4n - 4) - a(4n - 8) = A100525(n-1).
a(4n + 1) = 6*a(4n - 3) - a(4n - 7) = A266507(n).
a(4n + 2) = 6*a(4n - 2) - a(4n - 6) = A038761(n).
a(4n + 3) = 6*a(4n - 1) - a(4n - 5) = A253811(n).
sqrt(2*a(n)^2 - 7(-1)^a(n))*sgn(2*n - 1) = A266505(n).
(a(2n + 1) + a(2n))/2 = A002203(n), where A002203 gives the companion Pell numbers.
(a(2n + 1) - a(2n))/2 = A000129(n), where A000129 gives the Pell numbers.
(a(2n+2) + a(2n+1))*2 = A002203(n+2)
(a(2n+2) - a(2n+1))*2 = A002203(n-1).
G.f.: (1-x)*(2+4*x+x^2) / (1-2*x^2-x^4). - Colin Barker, Dec 31 2015

A048697 Generalized Pellian with second term equal to 10.

Original entry on oeis.org

1, 10, 21, 52, 125, 302, 729, 1760, 4249, 10258, 24765, 59788, 144341, 348470, 841281, 2031032, 4903345, 11837722, 28578789, 68995300, 166569389, 402134078, 970837545, 2343809168, 5658455881
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a048697 n = a048697_list !! n
    a048697_list = 1 : 10 : zipWith (+)
                            a048697_list (map (* 2) $ tail a048697_list)
    -- Reinhard Zumkeller, Sep 05 2014
  • Maple
    with(combinat): a:=n->8*fibonacci(n-1,2)+fibonacci(n,2): seq(a(n), n=1..25); # Zerinvary Lajos, Apr 04 2008
  • Mathematica
    a[n_]:=(MatrixPower[{{1,2},{1,1}},n].{{9},{1}})[[2,1]]; Table[a[n],{n,0,40}] (* Vladimir Joseph Stephan Orlovsky, Feb 20 2010 *)
    LinearRecurrence[{2,1},{1,10},35] (* Harvey P. Dale, Jul 26 2011 *)

Formula

a(n) = 2*a(n-1) + a(n-2); a(0)=1, a(1)=10.
a(n) = ((9+sqrt(2))(1+sqrt(2))^n - (9-sqrt(2))(1-sqrt(2))^n) / 2*sqrt(2).
G.f.: (1+8*x)/(1 - 2*x - x^2). - Philippe Deléham, Nov 03 2008
Previous Showing 11-20 of 32 results. Next