A086790 a(n) = floor((1+n+2*n^2+4*n^3)/(1+2*n+n^2)).
1, 2, 4, 8, 11, 15, 19, 23, 26, 30, 34, 38, 42, 46, 50, 54, 58, 62, 66, 70, 74, 78, 82, 86, 90, 94, 98, 102, 106, 110, 114, 118, 122, 126, 130, 134, 138, 142, 146, 150, 154, 158, 162, 166, 170, 174, 178, 182, 186, 190, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230
Offset: 1
Examples
a(2)=floor((1+2^1+2*2^2+4*2^3)/(1+2*2^1+2^2))=floor(43/9)=floor(4.77778)=4
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (2,-1).
Programs
-
Mathematica
LinearRecurrence[{2,-1},{1,2,4,8,11,15,19,23,26,30},60] (* Harvey P. Dale, Jun 20 2020 *)
-
PARI
a(n)=floor(4*n-6+9/(n+1)-2/(n+1)^2) \\ Charles R Greathouse IV, Oct 07 2015
Formula
a(n) = floor(4*n-6+9/(n+1)-2/(n+1)^2). For n>=8 a(n)=4*n-6 - Benoit Cloitre, Aug 06 2003
Extensions
More terms from Benoit Cloitre, Aug 06 2003