login
a(n) = (9*n^3 + 5*n)/2.
0

%I #18 Nov 30 2019 01:30:55

%S 7,41,129,298,575,987,1561,2324,3303,4525,6017,7806,9919,12383,15225,

%T 18472,22151,26289,30913,36050,41727,47971,54809,62268,70375,79157,

%U 88641,98854,109823,121575,134137,147536,161799,176953,193025,210042,228031,247019

%N a(n) = (9*n^3 + 5*n)/2.

%C 7 and 41 are the only primes in the sequence.

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4,-6,4,-1).

%F a(n) = ceiling(1/f(n))/2, where f(n) = (n + 1/(3*n)) - (n^3 + n)^(1/3), n > 0.

%F Note that (n^3 + n)^(1/3) converges to n + 1/(3*n) as n -> infinity. Therefore f(n) is the residual.

%F From _Colin Barker_, Apr 01 2014: (Start)

%F a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4).

%F G.f.: x*(7*x^2 + 13*x + 7) / (x-1)^4. (End)

%o (PARI) Vec(x*(7*x^2+13*x+7)/(x-1)^4 + O(x^100)) \\ _Colin Barker_, Apr 01 2014

%K nonn,easy

%O 1,1

%A _Richard R. Forberg_, Feb 22 2014

%E More terms from _Colin Barker_, Apr 01 2014