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

A001924 Apply partial sum operator twice to Fibonacci numbers.

Original entry on oeis.org

0, 1, 3, 7, 14, 26, 46, 79, 133, 221, 364, 596, 972, 1581, 2567, 4163, 6746, 10926, 17690, 28635, 46345, 75001, 121368, 196392, 317784, 514201, 832011, 1346239, 2178278, 3524546, 5702854, 9227431, 14930317, 24157781, 39088132, 63245948, 102334116, 165580101
Offset: 0

Views

Author

Keywords

Comments

Leading coefficients in certain rook polynomials (for n>=2; see p. 18 of the Riordan paper). - Emeric Deutsch, Mar 08 2004
(1, 3, 7, 14, ...) = row sums of triangle A141289. - Gary W. Adamson, Jun 22 2008
a(n) is the number of nonempty subsets of {1,2,...,n} such that the difference of successive elements is at most 2. See example below. Generally, the o.g.f. for the number of nonempty subsets of {1,2,...,n} such that the difference of successive elements is <= k is: x/((1-x)*(1-2*x+x^(k+1))). Cf. A000217 the case for k=1, A001477 the case for k=0 (counts singleton subsets). - Geoffrey Critzer, Feb 17 2012
-Fibonacci(n-2) = p(-1) where p(x) is the unique degree-n polynomial such that p(k) = a(k) for k = 0, 1, ..., n. - Michael Somos, Dec 31 2012
a(n) is the number of bit strings of length n+1 with the pattern 00 and without the pattern 011, see example. - John M. Campbell, Feb 10 2013
From Jianing Song, Apr 28 2025: (Start)
For n >= 2, a(n-2) is the number of subsets of {1,2,...,n} with 2 or more elements that contain no consecutive elements (i.e., such that the difference of successive elements is at least 2). Note that the number of such subsets with k elements is binomial(n+1-k,k), and Sum_{k=2..floor((n+1)/2)} binomial(n+1-k,k) = F(n+2) - binomial(n+1,0) - binomial(n,1) = F(n+2) - (n+1).
If subsets of {1,2,...,n} are required to contain no consecutive elements module n, then the result is A023548(n-3). (End)

Examples

			a(5) = 26 because there are 31 nonempty subsets of {1,2,3,4,5} but 5 of these have successive elements that differ by 3 or more: {1,4}, {1,5}, {2,5}, {1,2,5}, {1,4,5}. - _Geoffrey Critzer_, Feb 17 2012
From _John M. Campbell_, Feb 10 2013: (Start)
There are a(5) = 26 bit strings with the pattern 00 and without the pattern 011 of length 5+1:
   000000, 000001, 000010, 000100, 000101, 001000,
   001001, 001010, 010000, 010001, 010010, 010100,
   100000, 100001, 100010, 100100, 100101, 101000, 101001,
   110000, 110001, 110010, 110100, 111000, 111001, 111100.
(End)
		

References

  • J. Riordan, Discordant permutations, Scripta Math., 20 (1954), 14-23.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Right-hand column 4 of triangle A011794.
Cf. A065220.

Programs

  • GAP
    List([0..40], n-> Fibonacci(n+4) -n-3); # G. C. Greubel, Jul 08 2019
  • Haskell
    a001924 n = a001924_list !! n
    a001924_list = drop 3 $ zipWith (-) (tail a000045_list) [0..]
    -- Reinhard Zumkeller, Nov 17 2013
    
  • Magma
    [Fibonacci(n+4)-(n+3): n in [0..40]]; // Vincenzo Librandi, Jun 23 2016
    
  • Maple
    A001924:=-1/(z**2+z-1)/(z-1)**2; # Conjectured by Simon Plouffe in his 1992 dissertation.
    ##
    a:= n-> (<<0|1|0|0>, <0|0|1|0>, <0|0|0|1>, <1|-1|-2|3>>^n.
             <<0, 1, 3, 7>>)[1, 1]:
    seq(a(n), n=0..40);  # Alois P. Heinz, Oct 05 2012
  • Mathematica
    a[n_]:= Fibonacci[n+4] -3-n; Array[a, 40, 0]  (* Robert G. Wilson v *)
    LinearRecurrence[{3,-2,-1,1},{0,1,3,7},40] (* Harvey P. Dale, Jan 24 2015 *)
    Nest[Accumulate,Fibonacci[Range[0,40]],2] (* Harvey P. Dale, Jun 15 2016 *)
  • PARI
    a(n)=fibonacci(n+4)-n-3 \\ Charles R Greathouse IV, Feb 24 2011
    
  • Sage
    [fibonacci(n+4) -n-3 for n in (0..40)] # G. C. Greubel, Jul 08 2019
    

Formula

From Wolfdieter Lang: (Start)
G.f.: x/((1-x-x^2)*(1-x)^2).
Convolution of natural numbers n >= 1 with Fibonacci numbers F(k).
a(n) = Fibonacci(n+4) - (3+n). (End)
From Henry Bottomley, Jan 03 2003: (Start)
a(n) = a(n-1) + a(n-2) + n = a(n-1) + A000071(n+2).
a(n) = A001891(n) - a(n-1) = n + A001891(n-1).
a(n) = A065220(n+4) + 1 = A000126(n+1) - 1. (End)
a(n) = Sum_{k=0..n} Sum_{i=0..k} Fibonacci(i). - Benoit Cloitre, Jan 26 2003
a(n) = (sqrt(5)/2 + 1/2)^n*(7*sqrt(5)/10 + 3/2) + (3/2 - 7*sqrt(5)/10)*(sqrt(5)/2 - 1/2)^n*(-1)^n - n - 3. - Paul Barry, Mar 26 2003
a(n) = Sum_{k=0..n} Fibonacci(k)*(n-k). - Benoit Cloitre, Jun 07 2004
A107909(a(n)) = A000225(n) = 2^n - 1. - Reinhard Zumkeller, May 28 2005
a(n) - a(n-1) = A101220(1,1,n). - Ross La Haye, May 31 2006
F(n) + a(n-3) = A133640(n). - Gary W. Adamson, Sep 19 2007
a(n) = A077880(-3-n) = 2*a(n-1) - a(n-3) + 1. - Michael Somos, Dec 31 2012
INVERT transform is A122595. PSUM transform is A014162. PSUMSIGN transform is A129696. BINOMIAL transform of A039834 with 0,1 prepended is this sequence. - Michael Somos, Dec 31 2012
a(n) = A228074(n+1,3) for n > 1. - Reinhard Zumkeller, Aug 15 2013
a(n) = Sum_{k=0..n} Sum_{i=0..n} i * C(n-k,k-i). - Wesley Ivan Hurt, Sep 21 2017
E.g.f.: exp(x/2)*(15*cosh(sqrt(5)*x/2) + 7*sqrt(5)*sinh(sqrt(5)*x/2))/5 - exp(x)*(3 + x). - Stefano Spezia, Jun 25 2022

Extensions

Description improved by N. J. A. Sloane, Jan 01 1997

A000126 A nonlinear binomial sum.

Original entry on oeis.org

1, 2, 4, 8, 15, 27, 47, 80, 134, 222, 365, 597, 973, 1582, 2568, 4164, 6747, 10927, 17691, 28636, 46346, 75002, 121369, 196393, 317785, 514202, 832012, 1346240, 2178279, 3524547, 5702855, 9227432, 14930318, 24157782, 39088133, 63245949
Offset: 1

Views

Author

Keywords

Comments

a(n)-1 counts ternary numbers with no 0 digit (A007931) and at least one 2 digit, where the total of ternary digits is <= n. E.g., a(4)-1 = 7: 2 12 21 22 112 121 211. - Frank Ellermann, Dec 02 2001
A107909(a(n-1)) = A000079(n-1) = 2^(n-1). - Reinhard Zumkeller, May 28 2005
a(n) is the permanent of the n X n 0-1 matrix whose (i,j) entry is 1 iff i=1 or j=n or |i-j|<=1. For example, a(5)=15 is per([[1, 1, 1, 1, 1], [1, 1, 1, 0, 1], [0, 1, 1, 1, 1], [0, 0, 1, 1, 1], [0, 0, 0, 1, 1]]). - David Callan, Jun 07 2006
Conjecture. Let S(1)={1} and, for n>1, let S(n) be the smallest set containing x+1 and 2x+1 for each element x in S(n-1). Then a(n) is the sum of the elements in S(n). (See A122554 for a sequence defined in this way.) - John W. Layman, Nov 21 2007
a(n+1) indexes the corner blocks on the Fibonacci spiral built from blocks of unit area (using F(1) and F(2) as the sides of the first block). - Paul Barry, Mar 06 2008
The number of length n binary words with fewer than 2 0-digits between any pair of consecutive 1-digits. - Jeffrey Liese, Dec 23 2010
If b(n) = a(n+1) then b(0) = 1 and 2*b(n) >= b(n+1) for all n > 1 which is sufficient for b(n) to be a complete sequence. - Frank M Jackson, Mar 17 2013
From Gus Wiseman, Feb 10 2019: (Start)
Also the number of non-singleton subsets of {1, ..., n + 1} with no successive elements. For example, the a(5) = 15 subsets are:
{},
{1,3}, {1,4}, {1,5}, {1,6}, {2,4}, {2,5}, {2,6}, {3,5}, {3,6}, {4,6},
{1,3,5}, {1,3,6}, {1,4,6}, {2,4,6}.
Also the number of binary sequences with all zeros or at least 2 ones and no adjacent ones. For example, the a(1) = 1 through a(4) = 8 sequences are:
(00) (000) (0000) (00000)
(101) (0101) (00101)
(1001) (01001)
(1010) (01010)
(10001)
(10010)
(10100)
(10101)
(End)

References

  • Ralph P. Grimaldi, A generalization of the Fibonacci sequence. Proceedings of the seventeenth Southeastern international conference on combinatorics, graph theory, and computing (Boca Raton, Fla., 1986). Congr. Numer. 54 (1986), 123--128. MR0885268 (89f:11030). - N. J. A. Sloane, Apr 08 2012
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Heap-transform of A000071. - John W. Layman
Cf. A007931: binary strings with leading 0's, or ternary strings without 0's.
Differences are A000071.
Cf. A122554.
Cf. A000045.

Programs

  • GAP
    List([1..40], n-> Fibonacci(n+3)-(n+1)); # G. C. Greubel, Jul 09 2019
  • Magma
    [Fibonacci(n+3)-(n+1): n in [1..40]]; // G. C. Greubel, Jul 09 2019
    
  • Maple
    a:= n-> (Matrix([[1,1,1,2]]). Matrix(4, (i,j)-> if (i=j-1) then 1 elif j=1 then [3,-2,-1,1][i] else 0 fi)^n)[1,2]; seq(a(n), n=1..36); # Alois P. Heinz, Aug 26 2008
    # alternative
    A000126 := proc(n)
        combinat[fibonacci](n+3)-n-1 ;
    end proc:
    seq(A000126(n),n=1..40) ; # R. J. Mathar, Aug 05 2022
  • Mathematica
    LinearRecurrence[{3,-2,-1,1},{1,2,4,8},40] (* or *) CoefficientList[ Series[-(1-x+x^3)/((x^2+x-1)(x-1)^2),{x,0,40}],x]  (* Harvey P. Dale, Apr 24 2011 *)
    Table[Length[Select[Subsets[Range[n]],Min@@Abs[Subtract@@@Partition[#,2,1,1]]>1&]],{n,15}] (* Gus Wiseman, Feb 10 2019 *)
  • PARI
    Vec((1-x+x^3)/(1-x-x^2)/(1-x)^2+O(x^40)) \\ Charles R Greathouse IV, Oct 06 2011
    
  • PARI
    vector(40, n, fibonacci(n+3) -(n+1)) \\ G. C. Greubel, Jul 09 2019
    
  • Python
    def seq(n):
        if n < 0:
            return 1
        a, b = 1, 1
        for i in range(n + 1):
            a, b = b, a + b + i
        return a
    [seq(i) for i in range(n)] # Reza K Ghazi, Mar 03 2019
    
  • Sage
    [fibonacci(n+3)-(n+1) for n in (1..40)] # G. C. Greubel, Jul 09 2019
    

Formula

G.f.: (1 - x + x^3 ) / (( 1 - x - x^2 )*( 1 - x )^2). - Simon Plouffe in his 1992 dissertation.
From Henry Bottomley, Oct 22 2001: (Start)
a(n) = Fibonacci(n+3) - (n+1) = a(n-1) + a(n-2) + n - 2
a(n) = A001924(n-1) + 1 = A065220(n+3) + 2. (End)
a(n) = 2*a(n-1) - a(n-3) + 1. - Franklin T. Adams-Watters, Jan 13 2006
a(n+1) = 1 + Sum_{k=0..n} (Fibonacci(k+2) - 1) = Sum_{k=0..n} Fibonacci(k+2) - n. - Paul Barry, Mar 06 2008
a(n) = 3*a(n-1)-2*a(n-2)-a(n-3)+a(n-4). - Harvey P. Dale, May 05 2011
Closed-form without extra leading 1: ((15+7*sqrt(5))*((1+sqrt(5))/2)^n+(15-7*sqrt(5))*((1-sqrt(5))/2)^n-10*n-20)/10; closed-form with extra leading 1: ((20+8*sqrt(5))*((1+sqrt(5))/2)^n+(20-8*sqrt(5))*((1-sqrt(5))/2)^n-20*n-20)/20. - Tim Monahan, Jul 16 2011
G.f. for closed-form with extra leading 1: (1-2*x+x^2+x^3)/((1-x-x^2)*(x-1)^2). - Tim Monahan, Jul 17 2011

A188553 T(n,k) = Number of n X k binary arrays without the pattern 0 1 diagonally, vertically, antidiagonally or horizontally.

Original entry on oeis.org

2, 3, 3, 4, 5, 4, 5, 8, 7, 5, 6, 12, 12, 9, 6, 7, 17, 20, 16, 11, 7, 8, 23, 32, 28, 20, 13, 8, 9, 30, 49, 48, 36, 24, 15, 9, 10, 38, 72, 80, 64, 44, 28, 17, 10, 11, 47, 102, 129, 112, 80, 52, 32, 19, 11, 12, 57, 140, 201, 192, 144, 96, 60, 36, 21, 12, 13, 68, 187, 303, 321, 256, 176
Offset: 1

Views

Author

R. H. Hardin, Apr 04 2011

Keywords

Comments

From Miquel A. Fiol, Feb 06 2024: (Start)
Also, T(n,k) is the number of words of length k, x(1)x(2)...x(k), on the alphabet {0,1,...,n}, such that, for i=2,...,k, x(i)=either x(i-1) or x(i)=x(i-1)-1.
For the bijection between arrays and sequences, notice that the i-th column consists of 1's and then 0's, and there are x(i)=0 to n of 1's.
Such a bijection implies that all the empirical/conjectured formulas in A188554, A188555, A188556, A188557, A188558, and A188559 become correct.
(End)

Examples

			Table starts
..2..3..4..5...6...7...8...9...10...11...12....13....14....15....16.....17
..3..5..8.12..17..23..30..38...47...57...68....80....93...107...122....138
..4..7.12.20..32..49..72.102..140..187..244...312...392...485...592....714
..5..9.16.28..48..80.129.201..303..443..630...874..1186..1578..2063...2655
..6.11.20.36..64.112.192.321..522..825.1268..1898..2772..3958..5536...7599
..7.13.24.44..80.144.256.448..769.1291.2116..3384..5282..8054.12012..17548
..8.15.28.52..96.176.320.576.1024.1793.3084..5200..8584.13866.21920..33932
..9.17.32.60.112.208.384.704.1280.2304.4097..7181.12381.20965.34831..56751
.10.19.36.68.128.240.448.832.1536.2816.5120..9217.16398.28779.49744..84575
.11.21.40.76.144.272.512.960.1792.3328.6144.11264.20481.36879.65658.115402
Some solutions for 5 X 3:
  1 1 1   1 0 0   0 0 0   1 1 1   1 1 1   1 1 1   1 1 1
  1 1 1   0 0 0   0 0 0   1 1 1   1 1 1   1 1 1   1 1 1
  1 1 1   0 0 0   0 0 0   1 1 1   1 0 0   1 1 0   1 1 1
  1 1 1   0 0 0   0 0 0   1 1 0   0 0 0   1 0 0   1 1 1
  1 1 1   0 0 0   0 0 0   1 0 0   0 0 0   0 0 0   1 1 0
Some solutions for T(5,3): By taking the sums of the columns in the above arrays we get 555, 100, 000, 543, 322, 432, 554. - _Miquel A. Fiol_, Feb 04 2024
		

Crossrefs

Diagonal is A045623.
Column 4 is A086570.
Upper diagonals T(n,n+i) for i=1..8 give: A001792, A001787(n+1), A000337(n+1), A045618, A045889, A034009, A055250, A055251.
Lower diagonals T(n+i,n) for i=1..7 give: A045891(n+1), A034007(n+2), A111297(n+1), A159694(n-1), A159695(n-1), A159696(n-1), A159697(n-1).
Antidiagonal sums give A065220(n+5).

Programs

  • Maple
    T:= (n,k)-> `if`(k<=n+1, (2*n+3-k)*2^(k-2), (n+1-k)*binomial(k-1, n) * add(binomial(n, j-1)/(k-j)*T(n, j)*(-1)^(n-j), j=1..n+1)): seq(seq(T(n, 1+d-n), n=1..d), d=1..15); #Alois P. Heinz in the Sequence Fans Mailing List, Apr 04 2011 [We do not permit programs based on conjectures, but this program is now justified by Fiol's comment. - N. J. A. Sloane, Mar 09 2024]

Formula

Empirical: T(n,k) = (n+1)*2^(k-1) + (1-k)*2^(k-2) for k < n+3, and then the entire row n is a polynomial of degree n in k.
From Miquel A. Fiol, Feb 06 2024: (Start)
The above empirical formula is correct.
It can be proved that T(n,k) satisfies the recurrence
T(n,k) = Sum_{r=1..n+1} (-1)^(r+1)*binomial(n+1,r)*T(n,k-r)
with initial values
T(n,k) = Sum_{r=0..k-1} (n+1-r)*binomial(k-1,r) for k = 1..n+1. (End)

A064551 Ado [Simone Caramel]'s function: a(0) = 1, a(n) = a(n-1) + 2*(Fibonacci(n+1)-n), n > 0.

Original entry on oeis.org

1, 1, 1, 1, 3, 9, 23, 51, 103, 195, 353, 619, 1061, 1789, 2981, 4925, 8087, 13221, 21547, 35039, 56891, 92271, 149541, 242231, 392233, 634969, 1027753, 1663321, 2691723, 4355745, 7048223, 11404779, 18453871, 29859579, 48314441, 78175075, 126490637, 204666901, 331158797
Offset: 0

Views

Author

Roger L. Bagula, Oct 08 2001

Keywords

Comments

A Pickover sequence with properties analogous to the primes.

References

  • Ado [Simone Caramel], Postings in egroups and newsgroups.

Crossrefs

Programs

  • ARIBAS
    function a064551(maxarg: integer); var n,r,rm,q,qm1,qm2: integer; begin qm2 := 0; qm1 := 0; rm := 0; for n := 0 to maxarg do if n < 2 then q := 1; else q := qm1 + qm2; end; qm2 := qm1; qm1 := q; if n = 0 then r := 1; else r := rm + 2*(q - n); end; rm := r; write(r," "); end; end; a064551(35);
    
  • Haskell
    a064551 n = a064551_list !! n
    a064551_list = 1 : zipWith (+) a064551_list
                       (map (* 2) $ zipWith (-) (drop 2 a000045_list) [1..])
    -- Reinhard Zumkeller, Sep 13 2013
  • Maple
    a:= proc(n) option remember: a(n-1)+2*(combinat[fibonacci](n+1)-n) end: a(0):=1: for n from 0 to 60 do printf(`%d, `, a(n)) od:
  • Mathematica
    a[0] = f[0] = f[1] = 1; f[n_] := f[n] = f[n - 1] + f[n - 2]; a[n_] := a[n] = a[n - 1] + 2*(f[n] - n); Table[ a[n], {n, 0, 40} ]
    LinearRecurrence[{4,-5,1,2,-1},{1,1,1,1,3},50] (* Harvey P. Dale, Sep 27 2011 *)

Formula

From T. D. Noe, Oct 12 2007: (Start)
G.f.: (1 - 3x + 2x^2 + x^3 + x^4)/((x-1)^3 (x^2 + x - 1)).
a(n) = 4*a(n-1) - 5*a(n-2) + a(n-3) + 2*a(n-4) - a(n-5). (End)
a(n) = (1/5)*2^(-n)*(-15*2^n + (10-4*sqrt(5))*(1-sqrt(5))^n + (1+sqrt(5))^n*(10+4*sqrt(5))) - n - n^2. - Jean-François Alcover, May 28 2013
a(n) = a(n-1) - 2 * A065220(n), n > 0. - Reinhard Zumkeller, Sep 13 2013
a(n) = 2*F(n+3) - n^2 - n - 3 = 1 + 2*Sum_{k=1..n} F(k+1) - k = 1 + 2*Sum_{k=1..n} A001924(k-3), F=A000045. - Ehren Metcalfe, Dec 27 2018
E.g.f.: 4*exp(x/2)*(5*cosh(sqrt(5)*x/2) + 2*sqrt(5)*sinh(sqrt(5)*x/2))/5 - exp(x)*(3 + x*(2 + x)). - Stefano Spezia, Oct 16 2023

A210730 a(n) = a(n-1) + a(n-2) + n + 2 with n>1, a(0)=a(1)=0.

Original entry on oeis.org

0, 0, 4, 9, 19, 35, 62, 106, 178, 295, 485, 793, 1292, 2100, 3408, 5525, 8951, 14495, 23466, 37982, 61470, 99475, 160969, 260469, 421464, 681960, 1103452, 1785441, 2888923, 4674395, 7563350, 12237778, 19801162, 32038975, 51840173, 83879185, 135719396
Offset: 0

Views

Author

Alex Ratushnyak, May 10 2012

Keywords

Comments

Deleting the 0's leaves row 4 of the convolution array A213579. - Clark Kimberling, Jun 20 2012

Crossrefs

Cf. A033818: a(n)=a(n-1)+a(n-2)+n-5, a(0)=a(1)=0 (except first 2 terms and sign).
Cf. A002062: a(n)=a(n-1)+a(n-2)+n-4, a(0)=a(1)=0 (except the first term and sign).
Cf. A065220: a(n)=a(n-1)+a(n-2)+n-3, a(0)=a(1)=0.
Cf. A001924: a(n)=a(n-1)+a(n-2)+n-1, a(0)=a(1)=0 (except the first term).
Cf. A023548: a(n)=a(n-1)+a(n-2)+n, a(0)=a(1)=0 (except first 2 terms).
Cf. A023552: a(n)=a(n-1)+a(n-2)+n+1, a(0)=a(1)=0 (except first 2 terms).
Cf. A210731: a(n)=a(n-1)+a(n-2)+n+3, a(0)=a(1)=0.

Programs

  • GAP
    F:=Fibonacci;; List([0..40], n-> F(n+3)+3*F(n+1)-n-5); # G. C. Greubel, Jul 08 2019
  • Magma
    I:=[0, 0, 4, 9]; [n le 4 select I[n] else 3*Self(n-1)-2*Self(n-2)-Self(n-3)+Self(n-4): n in [1..37]]; // Bruno Berselli, May 10 2012
    
  • Magma
    F:=Fibonacci; [F(n+3)+3*F(n+1)-n-5: n in [0..40]]; // G. C. Greubel, Jul 08 2019
    
  • Mathematica
    RecurrenceTable[{a[0]==a[1]==0, a[n]==a[n-1] +a[n-2] +n+2}, a, {n, 40}] (* Bruno Berselli, May 10 2012 *)
    LinearRecurrence[{3,-2,-1,1},{0,0,4,9},40] (* Harvey P. Dale, Jul 24 2013 *)
    With[{F=Fibonacci}, Table[F[n+3]+2*F[n+1]-n-5, {n, 40}]] (* G. C. Greubel, Jul 08 2019 *)
  • PARI
    concat(vector(2), Vec(x^2*(4-3*x)/((1-x)^2*(1-x-x^2)) + O(x^50))) \\ Colin Barker, Mar 11 2017
    
  • PARI
    vector(40, n, n--; f=fibonacci; f(n+3)+3*f(n+1)-n-5) \\ G. C. Greubel, Jul 08 2019
    
  • Sage
    f=fibonacci; [f(n+3)+3*f(n+1)-n-5 for n in (0..40)] # G. C. Greubel, Jul 08 2019
    

Formula

G.f.: x^2*(4-3*x)/((1-x)^2*(1-x-x^2)). - Bruno Berselli, May 10 2012
a(n) = A210677(n)-1. - Bruno Berselli, May 10 2012
a(0)=0, a(1)=0, a(2)=4, a(3)=9, a(n) = 3*a(n-1)-2*a(n-2)-a(n-3)+a(n-4). - Harvey P. Dale, Jul 24 2013
a(n) = -5 + (2^(-1-n)*((1-sqrt(5))^n*(-7+5*sqrt(5)) + (1+sqrt(5))^n*(7+5*sqrt(5)))) / sqrt(5) - n. - Colin Barker, Mar 11 2017
a(n) = Fibonacci(n+3) + 3*Fibonacci(n+1) - n - 5. - G. C. Greubel, Jul 08 2019

A210731 a(n) = a(n-1) + a(n-2) + n + 3 with n>1, a(0) = a(1) = 0.

Original entry on oeis.org

0, 0, 5, 11, 23, 42, 74, 126, 211, 349, 573, 936, 1524, 2476, 4017, 6511, 10547, 17078, 27646, 44746, 72415, 117185, 189625, 306836, 496488, 803352, 1299869, 2103251, 3403151, 5506434, 8909618, 14416086, 23325739, 37741861, 61067637, 98809536
Offset: 0

Views

Author

Alex Ratushnyak, May 10 2012

Keywords

Crossrefs

Cf. A033818: a(n)=a(n-1)+a(n-2)+n-5, a(0)=a(1)=0 (except first 2 terms and sign).
Cf. A002062: a(n)=a(n-1)+a(n-2)+n-4, a(0)=a(1)=0 (except the first term and sign).
Cf. A065220: a(n)=a(n-1)+a(n-2)+n-3, a(0)=a(1)=0.
Cf. A001924: a(n)=a(n-1)+a(n-2)+n-1, a(0)=a(1)=0 (except the first term).
Cf. A023548: a(n)=a(n-1)+a(n-2)+n, a(0)=a(1)=0 (except first 2 terms).
Cf. A023552: a(n)=a(n-1)+a(n-2)+n+1, a(0)=a(1)=0 (except first 2 terms).
Cf. A210730: a(n)=a(n-1)+a(n-2)+n+2, a(0)=a(1)=0.

Programs

  • GAP
    F:=Fibonacci;; List([0..40], n-> F(n+3)+4*F(n+1)-n-6); # G. C. Greubel, Jul 09 2019
  • Magma
    F:=Fibonacci; [F(n+3)+4*F(n+1)-n-6: n in [0..40]]; // G. C. Greubel, Jul 09 2019
    
  • Mathematica
    With[{F = Fibonacci}, Table[F[n+3]+4*F[n+1]-n-6, {n,0,40}]] (* G. C. Greubel, Jul 09 2019 *)
    nxt[{n_,a_,b_}]:={n+1,b,a+b+n+4}; NestList[nxt,{1,0,0},40][[;;,2]] (* or *) LinearRecurrence[{3,-2,-1,1},{0,0,5,11},40] (* Harvey P. Dale, Dec 30 2024 *)
  • PARI
    vector(40, n, n--; f=fibonacci; f(n+3)+4*f(n+1)-n-6) \\ G. C. Greubel, Jul 09 2019
    
  • Sage
    f=fibonacci; [f(n+3)+4*f(n+1)-n-6 for n in (0..40)] # G. C. Greubel, Jul 09 2019
    

Formula

From Colin Barker, Jun 29 2012: (Start)
a(n) = 3*a(n-1) - 2*a(n-2) - a(n-3) + a(n-4).
G.f.: x^2*(5-4*x)/((1-x)^2*(1-x-x^2)). (End)
a(n) = Fibonacci(n+3) + 4*Fibonacci(n+1) - (n+6). - G. C. Greubel, Jul 09 2019

A069109 Primes of the form F(k)-k where F(k) is the k-th Fibonacci number.

Original entry on oeis.org

2, 13, 971, 121367, 317783, 3416454622906631, 3807901929474025356630904133903, 757791618667731139247631372099907
Offset: 1

Views

Author

Benoit Cloitre, Apr 06 2002

Keywords

Comments

a(9) is a 169-digit certified prime (Primo). - Rick L. Shepherd, Apr 26 2002

Crossrefs

Programs

  • Mathematica
    Select[Table[Fibonacci[k] - k, {k, 1, 160}], PrimeQ] (* Amiram Eldar, Jun 04 2022 *)
  • PARI
    for(n=1, 4036, if(ispseudoprime(t=fibonacci(n)-n), print1(t", "))); \\ Charles R Greathouse IV, Feb 17 2011

Formula

A065220 INTERSECT A000040. - R. J. Mathar, Apr 24 2017
a(n) = A065220(A270821(n)). - Amiram Eldar, Jun 04 2022

A210728 a(n) = a(n-1) + a(n-2) + n + 2 with n>1, a(0)=1, a(1)=2.

Original entry on oeis.org

1, 2, 7, 14, 27, 48, 83, 140, 233, 384, 629, 1026, 1669, 2710, 4395, 7122, 11535, 18676, 30231, 48928, 79181, 128132, 207337, 335494, 542857, 878378, 1421263, 2299670, 3720963, 6020664, 9741659, 15762356, 25504049, 41266440, 66770525, 108037002, 174807565
Offset: 0

Views

Author

Alex Ratushnyak, May 10 2012

Keywords

Crossrefs

Cf. A065220: a(n)=a(n-1)+a(n-2)+n-5, a(0)=1,a(1)=2 (except first 2 terms).
Cf. A168043: a(n)=a(n-1)+a(n-2)+n-3, a(0)=1,a(1)=2 (except first 2 terms).
Cf. A131269: a(n)=a(n-1)+a(n-2)+n-2, a(0)=1,a(1)=2.
Cf. A000126: a(n)=a(n-1)+a(n-2)+n-1, a(0)=1,a(1)=2.
Cf. A104161: a(n)=a(n-1)+a(n-2)+n, a(0)=1,a(1)=2 (except the first term).
Cf. A192969: a(n)=a(n-1)+a(n-2)+n+1, a(0)=1,a(1)=2.
Cf. A210729: a(n)=a(n-1)+a(n-2)+n+3, a(0)=1,a(1)=2.

Programs

  • Mathematica
    RecurrenceTable[{a[0] == 1, a[1] == 2, a[n] == a[n - 1] + a[n - 2] + n + 2}, a, {n, 36}] (* Bruno Berselli, Jun 27 2012 *)
    nxt[{n_,a_,b_}]:={n+1,b,a+b+n+3}; NestList[nxt,{1,1,2},40][[;;,2]] (* Harvey P. Dale, Aug 26 2024 *)

Formula

G.f.: (1-x+3*x^2-2*x^3)/((1-x)^2*(1-x-x^2)). - Bruno Berselli, Jun 27 2012
a(n) = ((5+sqrt(5))*(1+sqrt(5))^(n+1)-(5-sqrt(5))*(1-sqrt(5))^(n+1))/(2^(n+1)*sqrt(5))-n-5. - Bruno Berselli, Jun 27 2012
a(n) = -n-5+A022112(n+1). R. J. Mathar, Jul 03 2012

A210729 a(n) = a(n-1) + a(n-2) + n + 3 with n>1, a(0)=1, a(1)=2.

Original entry on oeis.org

1, 2, 8, 16, 31, 55, 95, 160, 266, 438, 717, 1169, 1901, 3086, 5004, 8108, 13131, 21259, 34411, 55692, 90126, 145842, 235993, 381861, 617881, 999770, 1617680, 2617480, 4235191, 6852703, 11087927, 17940664, 29028626, 46969326, 75997989, 122967353
Offset: 0

Views

Author

Alex Ratushnyak, May 10 2012

Keywords

Crossrefs

Cf. A065220: a(n)=a(n-1)+a(n-2)+n-5, a(0)=1,a(1)=2 (except first 2 terms).
Cf. A168043: a(n)=a(n-1)+a(n-2)+n-3, a(0)=1,a(1)=2 (except first 2 terms).
Cf. A131269: a(n)=a(n-1)+a(n-2)+n-2, a(0)=1,a(1)=2.
Cf. A000126: a(n)=a(n-1)+a(n-2)+n-1, a(0)=1,a(1)=2.
Cf. A104161: a(n)=a(n-1)+a(n-2)+n, a(0)=1,a(1)=2 (except the first term).
Cf. A192969: a(n)=a(n-1)+a(n-2)+n+1, a(0)=1,a(1)=2.
Cf. A210728: a(n)=a(n-1)+a(n-2)+n+2, a(0)=1,a(1)=2.

Programs

  • GAP
    F:=Fibonacci;; List([0..40], n-> 2*F(n+3)+3*F(n+1)-n-6); # G. C. Greubel, Jul 09 2019
  • Magma
    [3*Fibonacci(n+1)+2*Fibonacci(n+3)-n-6: n in [0..40]]; // Vincenzo Librandi, Jul 18 2013
    
  • Mathematica
    Table[3*Fibonacci[n+1]+2*Fibonacci[n+3]-n-6,{n,0,40}] (* Vaclav Kotesovec, May 13 2012 *)
  • PARI
    vector(40, n, n--; f=fibonacci; 2*f(n+3)+3*f(n+1)-n-6) \\ G. C. Greubel, Jul 09 2019
    
  • Python
    prpr, prev = 1,2
    for n in range(2, 99):
        current = prev+prpr+n+3
        print(prpr, end=',')
        prpr = prev
        prev = current
    
  • Sage
    f=fibonacci; [2*f(n+3)+3*f(n+1)-n-6 for n in (0..40)] # G. C. Greubel, Jul 09 2019
    

Formula

G.f.: (1-x+4*x^2-3*x^3)/((1-x-x^2)*(1-x)^2).
a(n) = 3*Fibonacci(n+1)+2*Fibonacci(n+3)-n-6. - Vaclav Kotesovec, May 13 2012
a(n) = 2*Lucas(n+2) + Fibonacci(n+1) - (n+6). - G. C. Greubel, Jul 09 2019

A270821 Numbers n such that F(n) - n is a prime, where F(n) denotes the n-th Fibonacci number.

Original entry on oeis.org

6, 8, 16, 26, 28, 76, 148, 159, 808, 848, 916, 1143, 4036, 4959, 43239, 73432, 98716, 144039, 146132
Offset: 1

Views

Author

Paolo P. Lava, Mar 30 2016

Keywords

Examples

			fibonacci(6) - 6 = 8 - 6 = 2 that is a prime;
fibonacci(8) - 8 = 21 - 8 = 13 that is a prime.
		

Crossrefs

Programs

  • Maple
    with(combinat): P:=proc(q) local n;
    for n from 0 to q do
    if isprime(fibonacci(n)-n) then print(n); fi; od; end: P(10^5);
  • Mathematica
    Select[Range[150000],PrimeQ[Fibonacci[#]-#]&] (* Harvey P. Dale, May 03 2018 *)
  • PARI
    lista(nn) = {for(n=1, nn, if(ispseudoprime(fibonacci(n)-n), print1(n, ", ")));} \\ Altug Alkan, Mar 30 2016

Extensions

a(15)-a(19) from Giovanni Resta, Apr 14 2016
Showing 1-10 of 13 results. Next