login
a(n) = floor(n/2) + floor(n/3).
10

%I #28 Mar 30 2023 02:37:02

%S 0,1,2,3,3,5,5,6,7,8,8,10,10,11,12,13,13,15,15,16,17,18,18,20,20,21,

%T 22,23,23,25,25,26,27,28,28,30,30,31,32,33,33,35,35,36,37,38,38,40,40,

%U 41,42,43,43,45,45,46,47,48,48,50,50,51,52,53,53,55,55,56,57,58,58,60,60

%N a(n) = floor(n/2) + floor(n/3).

%H Vincenzo Librandi, <a href="/A010761/b010761.txt">Table of n, a(n) for n = 1..2000</a>

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

%F a(n) = A004526(n) + A002264(n). - _Reinhard Zumkeller_, Jul 25 2005

%F From _Michael Somos_, Aug 07 2005: (Start)

%F G.f.: x^2*(1+2*x+2*x^2)/((1-x^2)*(1-x^3)).

%F a(-n) = -2-a(n-1). (End)

%F a(n) = a(n-2)+a(n-3)-a(n-5). - _Wesley Ivan Hurt_, Jan 27 2022

%F Sum_{n>=2} (-1)^n/a(n) = sqrt(2*(1-1/sqrt(5)))*Pi/10 + log(phi)/sqrt(5), where phi is the golden ratio (A001622). - _Amiram Eldar_, Mar 30 2023

%p seq(floor(n/2) + floor(n/3), n=1..64);

%t Table[Floor[n/2] + Floor[n/3], {n, 100}] (* _Wesley Ivan Hurt_, Feb 21 2014 *)

%t LinearRecurrence[{0,1,1,0,-1},{0,1,2,3,3},80] (* _Harvey P. Dale_, May 05 2018 *)

%o (PARI) a(n)=n\2+n\3

%o (Magma) [Floor (n/2)+Floor(n/3): n in [0..100]]; // _Vincenzo Librandi_, Feb 22 2014

%Y Cf. A001622, A010762, A110532.

%Y Cf. A002264, A004526.

%K nonn,easy

%O 1,3

%A _Simon Plouffe_