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-10 of 13 results. Next

A241948 Number of possible representations of n as a sum of distinct positive integers from the Fibonacci-type sequences 0,1,1,2,3,5,8,13,... and 0,2,2,4,6,10,16,... (A000045 and A118658).

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 4, 5, 6, 7, 8, 8, 10, 11, 12, 14, 14, 16, 18, 18, 21, 22, 23, 26, 26, 29, 31, 32, 35, 36, 39, 41, 41, 46, 47, 49, 53, 52, 57, 60, 60, 65, 66, 70, 74, 73, 79, 81, 84, 89, 88, 94, 97, 97, 105, 105, 109, 115, 113, 121, 124, 125, 132, 132, 139, 143, 141, 151, 152, 157, 164, 161, 171, 175
Offset: 0

Views

Author

Casey Mongoven, May 03 2014

Keywords

Examples

			a(10) = 7 because 10 can be represented in 7 possible ways as a sum of integers in the set {1,2,3,4,5,6,8,10,13,16,...}: 10, 8+2, 6+4, 6+3+1, 5+4+1, 5+3+2, 4+3+2+1.
		

Crossrefs

Extensions

a(0)=1 from Alois P. Heinz, Sep 16 2015

A241950 Number of possible representations of n as a sum of distinct positive integers from the Fibonacci-type sequences 0,2,2,4,6,10,16,... and 0,3,3,6,9,15,... (A118658 and A022086).

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 2, 1, 1, 3, 2, 2, 3, 3, 2, 5, 4, 3, 5, 6, 4, 6, 6, 4, 7, 8, 7, 7, 10, 8, 10, 11, 9, 10, 12, 12, 11, 13, 11, 14, 14, 15, 15, 16, 17, 19, 18, 17, 20, 19, 20, 22, 22, 20, 26, 25, 23, 27, 27, 25, 29, 30, 24, 31, 30, 29, 31, 34, 32, 35, 39, 34, 39, 39, 39, 39, 42, 39, 44, 44, 43, 47, 47, 48, 51, 51, 48, 56, 52, 53, 55, 56, 54, 61, 62, 56, 66
Offset: 0

Views

Author

Casey Mongoven, May 03 2014

Keywords

Examples

			a(9) = 3 because 9 can be represented in 3 possible ways as a sum of integers in the set {2,3,4,6,9,10,15,16,...}: 9, 6+3, 4+3+2.
		

Crossrefs

Extensions

a(0)=1 from Alois P. Heinz, Sep 16 2015

A241952 Number of possible representations of n as a sum of distinct positive integers from the Fibonacci-type sequences 2,1,3,4,7,11,... and 0,2,2,4,6,10,16,... (A000032 and A118658).

Original entry on oeis.org

1, 1, 2, 2, 2, 3, 4, 3, 4, 6, 6, 6, 8, 8, 7, 10, 11, 11, 12, 14, 15, 15, 17, 17, 17, 19, 21, 22, 24, 25, 26, 28, 29, 30, 31, 34, 35, 36, 40, 40, 39, 43, 44, 44, 47, 50, 52, 53, 57, 58, 58, 61, 63, 65, 68, 70, 73, 76, 76, 80, 81, 82, 86, 88, 92, 93, 95, 99, 99, 101, 104, 105, 108, 111, 115, 118, 119, 124, 126, 127, 133, 134, 137, 142, 143, 149
Offset: 1

Views

Author

Casey Mongoven, May 03 2014

Keywords

Examples

			a(10) = 6 because 10 can be represented in 6 possible ways as a sum of integers in the set {1,2,3,4,6,7,10,11,16,...}: 10, 7+3, 7+2+1, 6+4, 6+3+1, 4+3+2+1.
		

Crossrefs

A006355 Number of binary vectors of length n containing no singletons.

Original entry on oeis.org

1, 0, 2, 2, 4, 6, 10, 16, 26, 42, 68, 110, 178, 288, 466, 754, 1220, 1974, 3194, 5168, 8362, 13530, 21892, 35422, 57314, 92736, 150050, 242786, 392836, 635622, 1028458, 1664080, 2692538, 4356618, 7049156, 11405774, 18454930, 29860704, 48315634
Offset: 0

Views

Author

David M. Bloom

Keywords

Comments

Number of cvtemplates at n-2 letters given <= 2 consecutive consonants or vowels (n >= 4).
Number of (n,2) Freiman-Wyner sequences.
Diagonal sums of the Riordan array ((1-x+x^2)/(1-x), x/(1-x)), A072405 (where this begins 1,0,1,1,1,1,...). - Paul Barry, May 04 2005
Central terms of the triangle in A094570. - Reinhard Zumkeller, Mar 22 2011
Pisano period lengths: 1, 1, 8, 3, 20, 8, 16, 6, 24, 20, 10, 24, 28, 16, 40, 12, 36, 24, 18, 60, ... . - R. J. Mathar, Aug 10 2012
Also the number of matchings in the (n-2)-pan graph for n >= 5. - Eric W. Weisstein, Oct 03 2017
a(n) is the number of bimultus bitstrings of length n. A bitstring is bimultus if each of its 1's possess at least one neighboring 1 and each of its 0's possess at least one neighboring 0. - Steven Finch, May 26 2020

Examples

			a(6)=10 because we have: 000000, 000011, 000111, 001100, 001111, 110000, 110011, 111000, 111100, 111111. - _Geoffrey Critzer_, Jan 26 2014
		

References

  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 16, 51.

Crossrefs

Except for initial term, = 2*Fibonacci numbers (A000045).
Essentially the same as A047992, A054886, A055389, A068922, and A090991.
Column 2 in A265584.

Programs

  • Haskell
    a006355 n = a006355_list !! n
    a006355_list = 1 : fib2s where
       fib2s = 0 : map (+ 1) (scanl (+) 1 fib2s)
    -- Reinhard Zumkeller, Mar 20 2013
    
  • Magma
    [1] cat [Lucas(n) - Fibonacci(n): n in [1..50]]; // Vincenzo Librandi, Aug 02 2014
    
  • Maple
    a:= n-> if n=0 then 1 else (Matrix([[2,-2]]). Matrix([[1,1], [1,0]])^n) [1,1] fi: seq(a(n), n=0..38); # Alois P. Heinz, Aug 18 2008
    a := n -> ifelse(n=0, 1, -2*I^n*ChebyshevU(n-2, -I/2)):
    seq(simplify(a(n)), n = 0..38);  # Peter Luschny, Dec 03 2023
  • Mathematica
    Join[{1}, Last[#] - First[#] & /@ Partition[Fibonacci[Range[-1, 40]], 4, 1]] (* Harvey P. Dale, Sep 30 2011 *)
    Join[{1}, LinearRecurrence[{1, 1}, {0, 2}, 38]] (* Jean-François Alcover, Sep 23 2017 *)
    (* Programs from Eric W. Weisstein, Oct 03 2017 *)
    Join[{1}, Table[2 Fibonacci[n], {n, 0, 40}]]
    Join[{1}, 2 Fibonacci[Range[0, 40]]]
    CoefficientList[Series[(1-x+x^2)/(1-x-x^2), {x, 0, 40}], x] (* End *)
  • PARI
    a(n)=if(n,2*fibonacci(n-1),1) \\ Charles R Greathouse IV, Mar 14 2012
    
  • PARI
    my(x='x+O('x^50)); Vec((1-x+x^2)/(1-x-x^2)) \\ Altug Alkan, Nov 01 2015
    
  • SageMath
    def A006355(n): return 2*fibonacci(n-1) - int(n==0)
    print([A006355(n) for n in range(51)]) # G. C. Greubel, Apr 18 2025

Formula

a(n+2) = F(n-1) + F(n+2), for n > 0.
G.f.: (1-x+x^2)/(1-x-x^2). - Paul Barry, May 04 2005
a(n) = A119457(n-1,n-2) for n > 2. - Reinhard Zumkeller, May 20 2006
a(n) = 2*F(n-1) for n > 0, F(n)=A000045(n) and a(0)=1. - Mircea Merca, Jun 28 2012
G.f.: 1 - x + x*Q(0), where Q(k) = 1 + x^2 + (2*k+3)*x - x*(2*k+1 + x)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Oct 05 2013
a(n) = A118658(n) - 0^n. - M. F. Hasler, Nov 05 2014
a(n) = 2^(-n)*((1+r)*(1-r)^n - (1-r)*(1+r)^n)/r for n > 0, where r=sqrt(5). - Colin Barker, Jan 28 2017
a(n) = a(n-1) + a(n-2) for n >= 3. - Armend Shabani, Nov 25 2020
E.g.f.: 2*exp(x/2)*(5*cosh(sqrt(5)*x/2) - sqrt(5)*sinh(sqrt(5)*x/2))/5 - 1. - Stefano Spezia, Apr 18 2022
a(n) = F(n-3) + F(n-2) + F(n-1) for n >= 3, where F(n)=A000045(n). - Gergely Földvári, Aug 03 2024

Extensions

Corrected by T. D. Noe, Oct 31 2006

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

A163733 Number of n X 2 binary arrays with all 1's connected, all corners 1, and no 1 having more than two 1's adjacent.

Original entry on oeis.org

1, 1, 2, 2, 4, 6, 10, 16, 26, 42, 68, 110, 178, 288, 466, 754, 1220, 1974, 3194, 5168, 8362, 13530, 21892, 35422, 57314, 92736, 150050, 242786, 392836, 635622, 1028458, 1664080, 2692538, 4356618, 7049156, 11405774, 18454930, 29860704, 48315634, 78176338
Offset: 1

Views

Author

R. H. Hardin, Aug 03 2009

Keywords

Comments

Same recurrence for A163695.
Same recurrence for A163714.
Appears to coincide with diagonal sums of A072405. - Paul Barry, Aug 10 2009
From Gary W. Adamson, Sep 15 2016: (Start)
Let the sequence prefaced with a 1: (1, 1, 1, 2, 2, 4, 6, ...) equate to r(x). Then (r(x) * r(x^2) * r(x^4) * r(x^8) * ...) = the Fibonacci sequence, (1, 1, 2, 3, 5, ...). Let M = the following production matrix:
1, 0, 0, 0, 0, ...
1, 0, 0, 0, 0, ...
1, 1, 0, 0, 0, ...
2, 1, 0, 0, 0, ...
2, 1, 1, 0, 0, ...
4, 2, 1, 0, 0, ...
6, 2, 1, 1, 0, ...
...
Limit of the matrix power M^k as k->infinity results in a single column vector equal to the Fibonacci sequence. (End)
Apparently a(n) = A128588(n-2) for n > 3. - Georg Fischer, Oct 14 2018

Examples

			All solutions for n=8:
   1 1   1 1   1 1   1 1   1 1   1 1   1 1   1 1   1 1   1 1
   0 1   1 0   1 0   1 0   1 0   1 0   0 1   0 1   0 1   0 1
   0 1   1 0   1 0   1 0   1 1   1 0   0 1   0 1   1 1   0 1
   0 1   1 0   1 0   1 1   0 1   1 0   0 1   0 1   1 0   1 1
   0 1   1 0   1 1   0 1   0 1   1 0   0 1   1 1   1 0   1 0
   0 1   1 0   0 1   0 1   0 1   1 1   1 1   1 0   1 0   1 0
   0 1   1 0   0 1   0 1   0 1   0 1   1 0   1 0   1 0   1 0
   1 1   1 1   1 1   1 1   1 1   1 1   1 1   1 1   1 1   1 1
------
   1 1   1 1   1 1   1 1   1 1   1 1
   0 1   0 1   0 1   1 0   1 0   1 0
   1 1   1 1   0 1   1 0   1 1   1 1
   1 0   1 0   1 1   1 1   0 1   0 1
   1 1   1 0   1 0   0 1   0 1   1 1
   0 1   1 1   1 1   1 1   1 1   1 0
   0 1   0 1   0 1   1 0   1 0   1 0
   1 1   1 1   1 1   1 1   1 1   1 1
		

Crossrefs

Programs

Formula

Empirical: a(n) = a(n-1) + a(n-2) for n >= 5.
G.f.: (1-x^3)/(1-x-x^2) (conjecture). - Paul Barry, Aug 10 2009
a(n) = round(phi^(k-1)) - round(phi^(k-1)/sqrt(5)), phi = (1 + sqrt(5))/2 (conjecture). - Federico Provvedi, Mar 26 2013
G.f.: 1 + 2*x - x*Q(0), where Q(k) = 1 + x^2 - (2*k+1)*x + x*(2*k-1 - x)/Q(k+1); (conjecture), (continued fraction). - Sergei N. Gladkovskii, Oct 05 2013
G.f.: If prefaced with a 1, (1, 1, 1, 2, 2, 4, ...): (1 - x^2 - x^4)/(1 - x - x^2); where the modified sequence satisfies A(x)/A(x^2), A(x) is the Fibonacci sequence. - Gary W. Adamson, Sep 15 2016

A128587 Row sums of A128586.

Original entry on oeis.org

1, 1, 1, -1, 3, -5, 9, -15, 25, -41, 67, -109, 177, -287, 465, -753, 1219, -1973, 3193, -5167, 8361, -13529, 21891, -35421, 57313, -92735, 150049, -242785, 392835, -635621, 1028457, -1664079, 2692537, -4356617, 7049155, -11405773, 18454929
Offset: 1

Views

Author

Gary W. Adamson, Mar 11 2007

Keywords

Comments

Binomial transform of A128587 = A128588: (1, 2, 4, 6, 10, 16, 26, ...).

Examples

			a(5) = 3 = ( -3, 8, 0, -7, 5).
		

Crossrefs

This is a signed version of A001595. - Franklin T. Adams-Watters, Sep 30 2009
Cf. A000045.

Programs

  • GAP
    List([1..40], n-> (-1)^(n-1)*(2*Fibonacci(n-2)-1)); # G. C. Greubel, Jul 10 2019
  • Magma
    [(-1)^(n-1)*(2*Fibonacci(n-2)-1): n in [1..40]]; // G. C. Greubel, Jul 10 2019
    
  • Mathematica
    Table[(-1)^(n-1)*(2*Fibonacci[n-2] -1), {n, 40}] (* G. C. Greubel, Jul 10 2019 *)
  • PARI
    vector(40, n, f=fibonacci; (-1)^(n-1)*(2*f(n-2)-1)) \\ G. C. Greubel, Jul 10 2019
    
  • Sage
    [(-1)^(n-1)*(2*fibonacci(n-2)-1) for n in (1..40)] # G. C. Greubel, Jul 10 2019
    

Formula

Row sums of triangle A128586, inverse binomial transform of A128588.
From R. J. Mathar, Jun 03 2009: (Start)
a(n) = -2*a(n-1) + a(n-3) = (-1)^n*(1 - A118658(n-1)).
G.f.: x*(1+3*x+3*x^2)/((1+x)*(1+x-x^2)). (End)
a(n+3) = (-1)^n * A001595(n) for all n>=0. - M. F. Hasler and Franklin T. Adams-Watters, Sep 30 2009
a(n) = (-1)^(n-1)*(2*Fibonacci(n-2) - 1). - G. C. Greubel, Jul 10 2019

Extensions

More terms from R. J. Mathar, Jun 03 2009
Duplicate of a formula removed by R. J. Mathar, Oct 23 2009
Deleted certain dangerous or potentially dangerous links. - N. J. A. Sloane, Jan 30 2021

A294116 Fibonacci sequence beginning 2, 21.

Original entry on oeis.org

2, 21, 23, 44, 67, 111, 178, 289, 467, 756, 1223, 1979, 3202, 5181, 8383, 13564, 21947, 35511, 57458, 92969, 150427, 243396, 393823, 637219, 1031042, 1668261, 2699303, 4367564, 7066867, 11434431, 18501298, 29935729, 48437027, 78372756, 126809783, 205182539, 331992322, 537174861
Offset: 0

Views

Author

Bruno Berselli, Oct 23 2017

Keywords

References

  • Steven Vajda, Fibonacci and Lucas Numbers, and the Golden Section: Theory and Applications, Dover Publications (2008), page 24 (formula 8).

Crossrefs

Subsequence of A047201, A047592, A113763.
Sequences of the type g(2,k;n): A118658 (k=0), A000032 (k=1), 2*A000045 (k=2,4), A020695 (k=3), A001060 (k=5), A022112 (k=6), A022113 (k=7), A294157 (k=8), A022114 (k=9), A022367 (k=10), A022115 (k=11), A022368 (k=12), A022116 (k=13), A022369 (k=14), A022117 (k=15), A022370 (k=16), A022118 (k=17), A022371 (k=18), A022119 (k=19), A022372 (k=20), this sequence (k=21), A022373 (k=22); A022374 (k=24); A022375 (k=26); A022376 (k=28), A190994 (k=29), A022377 (k=30); A022378 (k=32).

Programs

  • Magma
    a0:=2; a1:=21; [GeneralizedFibonacciNumber(a0, a1, n): n in [0..40]];
    
  • Mathematica
    LinearRecurrence[{1, 1}, {2, 21}, 40]
  • PARI
    Vec((2 + 19*x)/(1 - x - x^2) + O(x^40)) \\ Colin Barker, Oct 25 2017
    
  • Sage
    a = BinaryRecurrenceSequence(1, 1, 2, 21)
    print([a(n) for n in range(38)]) # Peter Luschny, Oct 25 2017

Formula

G.f.: (2 + 19*x)/(1 - x - x^2).
a(n) = a(n-1) + a(n-2).
Let g(r,s;n) be the n-th generalized Fibonacci number with initial values r, s. We have:
a(n) = Lucas(n) + g(0,20;n), see A022354;
a(n) = Fibonacci(n) + g(2,20;n), see A022372;
a(n) = 2*g(1,21;n) - g(0,21;n);
a(n) = g(1,k;n) + g(1,21-k;n) for all k in Z.
a(h+k) = a(h)*Fibonacci(k-1) + a(h+1)*Fibonacci(k) for all h, k in Z (see S. Vajda in References section). For h=0 and k=n:
a(n) = 2*Fibonacci(n-1) + 21*Fibonacci(n).
Sum_{j=0..n} a(j) = a(n+2) - 21.
a(n) = (2^(-n)*((1-sqrt(5))^n*(-20+sqrt(5)) + (1+sqrt(5))^n*(20+sqrt(5)))) / sqrt(5). - Colin Barker, Oct 25 2017

A316528 a(n) = 3*a(n-1) - a(n-2) - 2*a(n-3) for n > 2, a(0)=1, a(1)=4, a(2)=10.

Original entry on oeis.org

1, 4, 10, 24, 54, 118, 252, 530, 1102, 2272, 4654, 9486, 19260, 38986, 78726, 158672, 319318, 641830, 1288828, 2586018, 5185566, 10393024, 20821470, 41700254, 83493244, 167136538, 334515862, 669424560, 1339484742, 2679997942, 5361659964, 10726012466, 21456381550
Offset: 0

Views

Author

Vincenzo Librandi, Jul 14 2018

Keywords

Comments

Row sums of triangle A316939.

Crossrefs

Programs

  • GAP
    a:=[1,4,10];; for n in [4..35] do a[n]:=3*a[n-1]-a[n-2]-2*a[n-3]; od; a; # Muniru A Asiru, Jul 14 2018
    
  • Magma
    I:=[1,4,10]; [n le 3 select I[n] else 3*Self(n-1)-Self(n-2)-2*Self(n-3): n in [1..40]];
    
  • Maple
    seq(coeff(series((1+x-x^2)/(1-3*x+x^2+2*x^3), x,n+1),x,n),n=0..35); # Muniru A Asiru, Jul 14 2018
  • Mathematica
    RecurrenceTable[{a[n] == 3 a[n - 1] - a[n - 2] - 2 a[n - 3], a[0] == 1, a[1] == 4, a[2] == 10}, a, {n, 0, 40}]
    Table[5 2^n - 2 Fibonacci[n + 3], {n, 0, 40}] (* Bruno Berselli, Jul 16 2018 *)
    LinearRecurrence[{3,-1,-2},{1,4,10},40] (* Harvey P. Dale, Jul 18 2020 *)
  • PARI
    Vec((1 + x - x^2)/((1 - 2*x)*(1 - x - x^2)) + O(x^40)) \\ Colin Barker, Jul 23 2018

Formula

G.f.: (1 + x - x^2)/((1 - 2*x)*(1 - x - x^2)).
a(n) = 2*A116712(n) for n > 0, a(0)=1.
a(n) = 5*2^n - 2*Fibonacci(n+3). - Bruno Berselli, Jul 16 2018
a(n) = (5*2^n - (2^(1-n)*((1-sqrt(5))^n*(-2+sqrt(5)) + (1+sqrt(5))^n*(2+sqrt(5))))/sqrt(5)). - Colin Barker, Jul 23 2018

A258574 Numbers n such that Fibonacci(n)+Lucas(n) is squarefree.

Original entry on oeis.org

0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 25, 27, 28, 30, 31, 33, 34, 36, 37, 39, 40, 42, 43, 45, 46, 48, 51, 52, 54, 57, 58, 60, 61, 63, 64, 66, 67, 69, 70, 72, 73, 75, 76, 78, 79, 81, 82, 84, 85, 87, 88, 91, 93, 94, 96, 97, 100
Offset: 1

Views

Author

Vincenzo Librandi, Jun 01 2015

Keywords

Comments

It appears that the sequence consists of the numbers congruent to 0 or 1 mod 3 (A032766) except for 24, 49, 55, 90, 99, 109, 111, ... What are these exceptions?
Also numbers n such that 2*Fibonacci(n+1) is squarefree because Lucas(n) = Fibonacci(n-1)+Fibonacci(n+1). - Michel Lagneau, Jun 04 2015
Numbers n such that Fibonacci(n+1) is odd and squarefree. - Chai Wah Wu, Jun 04 2015
Is it a theorem that this is a subsequence of A032766? - N. J. A. Sloane, Jun 04 2015
This sequence is a subsequence of A032766. Proof: since Fibonacci(0) = 0 and Fibonacci(1) = 1, Fibonacci(n) mod 2 has the pattern: 0, 1, 1, 0, 1, 1, 0, ..., i.e. if n mod 3 = 0, then Fibonacci(n) is even, and n-1 is not a member of this sequence. In other words, members of this sequence must be congruent to 0 or 1 mod 3. - Chai Wah Wu, Jun 04 2015

Crossrefs

Programs

  • Magma
    [n: n in [0..200] | IsSquarefree(Fibonacci(n)+Lucas(n))];
    
  • Mathematica
    Select[Range[0, 200], SquareFreeQ[Fibonacci[#] + LucasL[#]] &]
  • PARI
    is(n)=n%3<2 && issquarefree(fibonacci(n+1)) \\ Charles R Greathouse IV, Jun 04 2015
    
  • Python
    from sympy import factorint
    A258574_list = []
    a, b = 0, 2
    for n in range(10**2):
        if max(factorint(b).values()) <= 1:
            A258574_list.append(n)
        a, b = b, a + b # Chai Wah Wu, Jun 04 2015
    
  • Sage
    [n for n in (0..110) if is_squarefree(2*fibonacci(n+1))] # Bruno Berselli,

Extensions

Edited by N. J. A. Sloane, Jun 04 2015
Showing 1-10 of 13 results. Next