The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A049798 a(n) = (1/2)*Sum_{k = 1..n} T(n,k), array T as in A049800. 6

%I

%S 0,0,0,1,0,2,2,2,3,7,2,7,10,8,8,15,11,19,16,15,22,32,19,25,34,34,33,

%T 46,33,47,47,48,61,65,45,62,77,79,68,87,74,94,97,86,105,127,98,114,

%U 120,124,129,154,141,151,142,147,172,200,151,180

%N a(n) = (1/2)*Sum_{k = 1..n} T(n,k), array T as in A049800.

%C This is also Sum_{k=2..floor((n+1)/2)} ((n+1) mod k). - _Lei Zhou_, Mar 10 2014

%H Lei Zhou, <a href="/A049798/b049798.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A004125(n+1) - A008805(n-2), for n >= 2. - _Carl Najafi_, Jan 31 2013

%F a(n) = Sum_{i = 1..ceiling(n/2)} ((n-i+1) mod i). - _Wesley Ivan Hurt_, Jan 05 2017

%e For n = 3, n+1 = 4, floor((n+1)/2) = 2, mod(4,2) = 0, and so a(3) = 0.

%e For n = 4, n+1 = 5, floor((n+1)/2) = 2, mod(5,2) = 1, and so a(4) = 1.

%e ...

%e For n = 12, n+1 = 13, floor((n+1)/2) = 6, mod(13,2) = 1, mod(13,3) = 1, mod(13,4) = 1, mod(13,5) = 3, mod(13,6) = 1, and so a(12) = 1 + 1 + 1 + 3 + 1 = 7.

%p seq( add( (n+1) mod floor((k+1)/2), k=1..n)/2, n=1..60); # _G. C. Greubel_, Dec 09 2019

%t Table[Sum[Mod[n+1, Floor[(k+1)/2]], {k,n}]/2, {n, 60}] (* _G. C. Greubel_, Dec 09 2019 *)

%o (Sage)

%o def a(n):

%o return sum([(n+1)%k for k in range(2,floor((n+3)/2))])

%o # _Ralf Stephan_, Mar 14 2014

%o (PARI) vector(60, n, sum(k=1,n, lift(Mod(n+1, (k+1)\2)) )/2 ) \\ _G. C. Greubel_, Dec 09 2019

%o (MAGMA) [ (&+[(n+1) mod Floor((k+1)/2): k in [1..n]])/2: n in [1..60]]; // _G. C. Greubel_, Dec 09 2019

%o (GAP) List([1..60], n-> Sum([1..n], k-> (n+1) mod Int((k+1)/2))/2 ); # _G. C. Greubel_, Dec 09 2019

%Y Cf. A004125, A008611, A008805, A049797, A049799, A049801.

%Y Half row sums of A049800.

%K nonn,easy

%O 1,6

%A _Clark Kimberling_

%E Examples added by _Lei Zhou_, Mar 10 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 15 01:40 EDT 2020. Contains 336484 sequences. (Running on oeis4.)