login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A022820 [ n/1 ] - [ (n-1)/2 ] + [ (n-2)/3 ] - ... + ((-1)^n)[ 2/(n-1) ]. 0

%I #7 Mar 23 2013 14:12:57

%S 2,2,3,4,5,4,6,7,8,7,8,9,12,10,11,12,13,12,15,16,17,14,16,17,20,19,20,

%T 21,22,19,22,23,26,24,25,26,29,26,27,28,29,28,33,34,35,30,32,33,36,35,

%U 36,37,40,37,40,41,42,39,40,41,46,42,45,46,47,46,49,50,51,46

%N [ n/1 ] - [ (n-1)/2 ] + [ (n-2)/3 ] - ... + ((-1)^n)[ 2/(n-1) ].

%o (PARI) a(n) = sum(i=1, n-1, (-1)^(i+1)*floor((n-i+1)/i)) \\ for n>1 _Michel Marcus_, Mar 22 2013

%K nonn

%O 2,1

%A _Clark Kimberling_

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 26 04:38 EDT 2024. Contains 375454 sequences. (Running on oeis4.)