OFFSET
2,1
COMMENTS
This sequence has a relatively high density of primes given its simple formula and high values: 38 in the first 100. The composites in the first 157 elements are mainly p1*p2 or p1*p2^2 or p^1^3, with the rest having three distinct primes. The first composite of four distinct primes is at n = 158, a(n)= 18722 = 2*11*23*37.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 2..1000
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
FORMULA
a(n) = (-11+3*(-1)^n+6*n^2)/8. a(n) = 2*a(n-1)-2*a(n-3)+a(n-4). G.f.: x^2*(x-2)*(x^2+x+1) / ((x-1)^3*(x+1)). - Colin Barker, Aug 27 2013
EXAMPLE
a(14) = floor(3*14^2/4)-1 = 146.
MATHEMATICA
Table[Floor[3*n^2/4] - 1, {n, 2, 100}] (* T. D. Noe, Aug 23 2013 *)
LinearRecurrence[{2, 0, -2, 1}, {2, 5, 11, 17}, 60] (* Harvey P. Dale, May 08 2022 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Richard R. Forberg, Aug 20 2013
EXTENSIONS
a(14) corrected by Colin Barker, Aug 27 2013
STATUS
approved