login
a(n) = floor((n^2 + n + 8) / 4).
0

%I #33 Dec 14 2023 05:29:02

%S 2,3,5,7,9,12,16,20,24,29,35,41,47,54,62,70,78,87,97,107,117,128,140,

%T 152,164,177,191,205,219,234,250,266,282,299,317,335,353,372,392,412,

%U 432,453,475,497,519,542,566,590,614,639

%N a(n) = floor((n^2 + n + 8) / 4).

%C Number of different coefficient values in expansion of Product_{i=1..n} (1 + q^2 + q^4 + ... + q^(2i)).

%C The given terms have a second difference that is periodic with the period 1, 0, 0, 1, ... of length 4, an implicit recurrence. - _John W. Layman_, Jan 23 2001

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

%F O.g.f.: -x*(2*x^4 - 4*x^3 + 4*x^2 - 3*x + 2)/((x-1)^3*(x^2+1)). - _R. J. Mathar_, Dec 05 2007

%F a(n) = A039823(n) + 1. - _Bruno Berselli_, Jul 25 2012

%F a(n) = 3*a(n-1) - 4*a(n-2) + 4*a(n-3) - 3*a(n-4) + a(n-5). - _Wesley Ivan Hurt_, May 08 2022

%o (Magma) [Floor((n^2+n+8)/4): n in [1..50]]; // _Bruno Berselli_, Jul 25 2012

%Y Cf. A039823.

%K nonn,easy

%O 1,1

%A _Olivier GĂ©rard_