This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A163296 Absolute value of the sum_{x=0..n-th nonprime}x*(-1)^x 1
 0, 1, 2, 3, 4, 5, 5, 6, 7, 8, 8, 9, 10, 11, 11, 12, 13, 13, 14, 14, 15, 16, 17, 17, 18, 18, 19, 20, 20, 21, 22, 23, 23, 24, 25, 25, 26, 26, 27, 28, 28, 29, 29, 30, 31, 32, 32, 33, 33, 34, 35, 35, 36, 37, 38, 38, 39, 39, 40, 41, 41, 42, 43, 43, 44, 44, 45, 46, 46, 47, 47, 48, 48 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS Here n-th nonprime=A141468(n). LINKS FORMULA a(n) = |A130472(A141468(n))|. [From R. J. Mathar, Jul 26 2009] EXAMPLE a(1)=abs(0*(-1)^0)=1, a(2)=abs(0*(-1)^0+1*(-1)^1)=1-1=0, a(3)=abs(1-1+2-3+4)=3, a(4)=abs(1-1+2-3+4-5+6)=4, a(5)=abs(1-1+2-3+4-5+6-7+8)=5, a(6)=abs(1-1+2-3+4-5+6-7+8-9)=abs(-4)=4. MAPLE A130472 := proc(n) (-1)^n*floor((n+1)/2) ; end: A141468 := proc(n) option remember; local a; if n = 1 then 0 ; else for a from procname(n-1)+1 do if not isprime(a) then RETURN(a) ; fi; od: fi; end: A163296 := proc(n) abs(A130472( A141468(n))) ; end: seq(A163296(n), n=1..100) ; [From R. J. Mathar, Jul 26 2009] CROSSREFS Cf. A141468. Sequence in context: A065515 A070545 A091863 * A172103 A123731 A195181 Adjacent sequences:  A163293 A163294 A163295 * A163297 A163298 A163299 KEYWORD nonn AUTHOR Juri-Stepan Gerasimov, Jul 24 2009 EXTENSIONS Corrected by R. J. Mathar, Jul 26 2009 STATUS approved

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 .