1,6

Table of n, a(n) for n=1..83.

a(n)=abs{(-1)^k*A004125}

a(5)=-(5 mod 1)+(4 mod 2)-(3 mod 3)+(2 mod 4)-(1 mod 5)=-0+0-0+2-1=1

P:=proc(i) local a, n; for n from 1 by 1 to i do a:=abs(sum('(-1)^k*((n-k+1) mod k)', 'k'=1..n)); print(a); od; end: P(100);

A004125, A154586

Sequence in context: A018220 A004580 A215451 * A020822 A197514 A112635

Adjacent sequences: A154582 A154583 A154584 * A154586 A154587 A154588

easy,nonn

Paolo P. Lava and Giorgio Balzarotti, Jan 12 2009

approved