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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A163301 Sum_{x=nth even nonprime..nth odd nonprime}-x*(-1)^x 1
1, 3, 5, 7, 8, 8, 10, 10, 11, 13, 14, 14, 15, 15, 17, 17, 18, 20, 20, 21, 22, 22, 23, 23, 23, 24, 26, 28, 29, 29, 29, 29, 29, 29, 30, 31, 31, 33, 33, 33, 33, 35, 35, 36, 36, 37, 38, 38, 39, 39, 41, 41, 41, 41, 43, 45, 45, 45, 45, 45, 46, 46, 46, 46, 46, 47, 49, 50, 50, 52, 52 (list; graph; refs; listen; history; internal format)
OFFSET

1,2

COMMENTS

Here n-th even nonprime = A163300(n), n-th odd nonprime = A014076(n) and A163300 U A0140076 = A141468.

FORMULA

a(n)=sum_{x=nth A163300..nth A014076}-x*(-1)^x

a(n) = A001057( A014076(n)) - A001057(A163300(n)-1). [From R. J. Mathar (mathar(AT)strw.leidenuniv.nl), May 21 2010]

EXAMPLE

a(1)=-0*(-1)^0-1*(-1)^1=0+1=1; a(2)=-4*(-1)^4-5*(-1)^5-6*(-1)6-7*(-1)^7-8*(-1)^8-9*(-1)^9=-4+5-6+7-8+9=3.

MAPLE

Contribution from R. J. Mathar (mathar(AT)strw.leidenuniv.nl), May 21 2010: (Start)

A163300 := proc(n) if n <= 2 then op(n, [0, 4]) ; else for a from procname(n-1)+2 by 2 do if not isprime(a) then return a; end if; end do; end if; end proc:

A014076 := proc(n) if n = 1 then 1; else for a from procname(n-1)+2 by 2 do if not isprime(a) then return a ; end if; end do: end if; end proc:

A001057 := proc(n) (1-(-1)^n*(2*n+1))/4; end proc:

A163301 := proc(n) A001057( A014076(n)) - A001057(A163300(n)-1) ; end proc: seq(A163301(n), n=1..120) ; (End)

CROSSREFS

Cf. A014076, A141468, A163300.

Sequence in context: A161696 A196084 A008508 * A036593 A086674 A137203

Adjacent sequences:  A163298 A163299 A163300 * A163302 A163303 A163304

KEYWORD

nonn

AUTHOR

Juri-Stepan Gerasimov (2stepan(AT)rambler.ru), Jul 26 2009

EXTENSIONS

Corrected from a(39) onwards by R. J. Mathar (mathar(AT)strw.leidenuniv.nl), May 21 2010

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 15 21:56 EST 2012. Contains 205860 sequences.