login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A049798 a(n) = (1/2)*Sum_{k=2..n} T(n,k), array T as in A049800. 3
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, 46, 33, 47, 47, 48, 61, 65, 45, 62, 77, 79, 68, 87, 74, 94, 97, 86, 105, 127, 98, 114, 120, 124, 129, 154, 141, 151, 142, 147, 172, 200, 151, 180 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,6

COMMENTS

This is also the sum of Mod[n+1,k], k=2..floor((n+1)/2). - Lei Zhou, Mar 10 2014

LINKS

Lei Zhou, Table of n, a(n) for n = 1..10000

FORMULA

a(n) = A004125(n+1) - A008805(n-2), for n>1. - Carl Najafi, Jan 31 2013

a(n) = Sum_{i=1..ceiling(n/2)} ((n-i+1) mod i). - Wesley Ivan Hurt, Jan 05 2017

EXAMPLE

n=3, n+1=4, Floor[(n+1)/2]=2, Mod[4,2]=0, so a(3)=0;

n=4, n+1=5, Floor[(n+1)/2]=2, Mod[5,2]=1, so a(4)=1;

...

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, so a(12) = 1+1+1+3+1 = 7.

MATHEMATICA

Table[a = 0; Do[a = a + Mod[n + 1, i], {i, 2, Floor[(n + 1)/2]}]; a, {n, 1, 60}] (* Lei Zhou, Mar 10 2014 *)

PROG

(Sage)

def a(n):

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

# Ralf Stephan, Mar 14 2014

CROSSREFS

Cf. A004125, A008611, A008805, A049800.

Sequence in context: A143596 A091712 A125721 * A165198 A245526 A024682

Adjacent sequences:  A049795 A049796 A049797 * A049799 A049800 A049801

KEYWORD

nonn,easy

AUTHOR

Clark Kimberling

EXTENSIONS

Examples added by Lei Zhou, Mar 10 2014

STATUS

approved

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 23 16:52 EDT 2019. Contains 321432 sequences. (Running on oeis4.)