login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A154585 a(n)=abs{(-1)^k*Sum{k=1..n}{[(n-k+1) mod k]}} 3
0, 1, 1, 0, 1, 2, 4, 0, 3, 4, 5, 4, 1, 10, 4, 3, 1, 2, 9, 2, 11, 12, 17, 11, 0, 13, 0, 1, 6, 7, 23, 8, 7, 20, 10, 9, 8, 25, 14, 13, 4, 3, 20, 13, 34, 35, 34, 26, 8, 13, 6, 5, 8, 25, 24, 1, 26, 27, 34, 33, 4, 37, 25, 6, 11, 12, 11, 16, 37, 38, 60, 59, 24, 25, 0, 19, 40, 41, 54, 14, 25, 26, 51 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,6

LINKS

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

FORMULA

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

EXAMPLE

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

MAPLE

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);

CROSSREFS

A004125, A154586

Sequence in context: A018220 A004580 A215451 * A020822 A197514 A112635

Adjacent sequences:  A154582 A154583 A154584 * A154586 A154587 A154588

KEYWORD

easy,nonn

AUTHOR

Paolo P. Lava and Giorgio Balzarotti, Jan 12 2009

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 July 30 04:51 EDT 2021. Contains 346348 sequences. (Running on oeis4.)