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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A061009 -2+sum_j (-(n-1)! mod n) over 0<j<=n. 3
-2, -1, 0, 2, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 17, 17, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24 (list; graph; refs; listen; history; internal format)
OFFSET

1,1

FORMULA

a(n) =a(n-1)+A061007(n) =A061008(n)-2. For n>3, a(n)=pi(n)=A000720(n) where pi(n) is the number of primes less than or equal to n.

EXAMPLE

a(6)=3 since -2 + (-1 mod 1) + (-1 mod 2) + (-2 mod 3) + (-6 mod 4) + (-24 mod 5) + (-120 mod 6) = -2+0+1+1+2+1+0 = 3.

MAPLE

P:=proc(n) local a, i, w; a:=-2; print(a); for i from 1 by 1 to n do w:=((i-1)! mod (i+1)); a:=a+w; print(a); od; end: P(1000); - Paolo P. Lava (paoloplava(AT)gmail.com), Apr 23 2007

CROSSREFS

Cf. A000040, A000142, A061006, A061007, A061008.

Sequence in context: A167749 A104770 A110280 * A144106 A104558 A206022

Adjacent sequences:  A061006 A061007 A061008 * A061010 A061011 A061012

KEYWORD

sign

AUTHOR

Henry Bottomley (se16(AT)btinternet.com), Apr 12 2001

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 14 20:38 EST 2012. Contains 205663 sequences.