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!)
A163296 Absolute value of the Sum_{x=0..A141468(n)} 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

LINKS

G. C. Greubel, Table of n, a(n) for n = 1..1000

FORMULA

a(n) = |A130472(A141468(n))|. - 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) ; # R. J. Mathar, Jul 26 2009

MATHEMATICA

nonPrime[n_Integer] := FixedPoint[n + PrimePi@# &, n + PrimePi@n]; Table[Abs[Sum[k*(-1)^k, {k, 0, nonPrime[n]}]], {n, 0, 50}] (* G. C. Greubel, Dec 18 2016 *)

CROSSREFS

Cf. A141468.

Sequence in context: A070545 A254828 A091863 * A247971 A317334 A331266

Adjacent sequences:  A163293 A163294 A163295 * A163297 A163298 A163299

KEYWORD

nonn,less

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 | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 24 16:24 EDT 2021. Contains 346273 sequences. (Running on oeis4.)