|
Search: id:A162938
|
|
|
| A162938 |
|
A 2-based alternate sum over the numbers from 0 to the n-th nonprime. |
|
+0 2
|
|
| 2, 5, 8, 11, 14, 25, 17, 20, 23, 40, 26, 29, 32, 55, 35, 38, 65, 41, 70, 44, 47, 50, 85, 53, 90, 56, 59, 100, 62, 65, 68, 115, 71, 74, 125, 77, 130, 80, 83, 140, 86, 145, 89, 92, 95, 160, 98, 165, 101, 104, 175, 107, 110, 113, 190, 116, 195, 119, 122, 205, 125, 128, 215
(list; graph; listen)
|
|
|
OFFSET
|
1,1
|
|
|
COMMENT
|
Define a 2-based sum S(n) = sum_{i=0..n} (2- (-1)^i*i) = 2*n-(-1)^n*A152832(n).
a(n) is this sum evaluated at A141468(n).
|
|
FORMULA
|
a(n)=sum_{x=0..nth nonprime}2-x*(-1)^x. - Juri-Stepan Gerasimov (2stepan(AT)rambler.ru), Jul 28 2009
|
|
EXAMPLE
|
a(1)=2-0*(-1)^0=2. a(2)=2-0*(-1)^0+2-1*(-1)^1=2+3=5.
a(3)=2-0*(-1)^0+2-1*(-1)^1+2-2*(-1)^2+2-3*(-1)^3+2-4*(-1)^4=2+3+0+5-2=8.
|
|
MAPLE
|
A152832 := proc(n) option remember; if n = 0 then -2; else n-procname(n-1) ; fi; end:
A141468 := proc(n) option remember ; local a; if n <=2 then n-1; else for a from procname(n-1)+1 do if not isprime(a) then RETURN(a); fi; od: fi; end:
A162938 := proc(n) local npr; npr := A141468(n) ; 2*npr-(-1)^npr*A152832(npr) ; end:
seq(A162938(n), n=1..100) ; # R. J. Mathar, Jul 21 2009
|
|
CROSSREFS
|
Cf. A141468.
Sequence in context: A070214 A031210 A102795 this_sequence A118518 A163249 A088366
Adjacent sequences: A162935 A162936 A162937 this_sequence A162939 A162940 A162941
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
Juri-Stepan Gerasimov (2stepan(AT)rambler.ru), Jul 18 2009
|
|
EXTENSIONS
|
Definition edited by R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Jul 21 2009
|
|
|
Search completed in 0.002 seconds
|