login
a(n) = n - 1 + ceiling((-3 + n^2)/2) if n > 1 with a(1)=1, complement of A182835.
5

%I #50 Sep 16 2022 04:01:02

%S 1,2,5,10,15,22,29,38,47,58,69,82,95,110,125,142,159,178,197,218,239,

%T 262,285,310,335,362,389,418,447,478,509,542,575,610,645,682,719,758,

%U 797,838,879,922,965,1010,1055,1102,1149,1198,1247,1298,1349,1402,1455

%N a(n) = n - 1 + ceiling((-3 + n^2)/2) if n > 1 with a(1)=1, complement of A182835.

%H Guenther Schrack, <a href="/A179207/b179207.txt">Table of n, a(n) for n = 1..10010</a>

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

%F a(n) = n - 1 + ceiling((-3 + n^2)/2) if n > 1.

%F a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4). - _Joerg Arndt_, Apr 02 2011

%F From _Guenther Schrack_, Jun 06 2018: (Start)

%F a(n) = (2*n^2 + 4*n - 9 + (-1)^n)/4 for n > 1.

%F a(n) = a(n-2) + 2*n for n > 3.

%F a(-n) = a(n-2) for n > 1.

%F a(n) = n - 1 + A047838(n) for n > 1. (End)

%F G.f.: x * (1 + x^2 + 2*x^3 - 2*x^4) / (1 - 2*x + 2*x^3 - x^4). - _Michael Somos_, Oct 28 2018

%F Sum_{n>=1} 1/a(n) = 8/3 + tan(sqrt(5)*Pi/2)*Pi/(2*sqrt(5)) - cot(sqrt(3/2)*Pi)*Pi/(2*sqrt(6)). - _Amiram Eldar_, Sep 16 2022

%p a:=n->n-1+ceil((-3+n^2)/2): 1,seq(a(n),n=2..60); # _Muniru A Asiru_, Aug 05 2018

%t Table[n-1+Ceiling[(n*n-3)/2], {n,60}] (* _Vladimir Joseph Stephan Orlovsky_, Apr 02 2011 *)

%t Join[{1},LinearRecurrence[{2,0,-2,1},{2,5,10,15},52]] (* _Ray Chandler_, Jul 15 2015 *)

%o (GAP) a:=[2,5,10,15];; for n in [5..60] do a[n]:=2*a[n-1]-2*a[n-3]+a[n-4]; od; a:=Concatenation([1],a); # _Muniru A Asiru_, Aug 05 2018

%Y Cf. A182835, A047838.

%Y First differences: A109613(n) for n > 2. - _Guenther Schrack_, Jun 06 2018

%K nonn,easy

%O 1,2

%A _Clark Kimberling_, Jan 07 2011