login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A242002 Sum_{k=1..n} (-1)^isprime(k)*2^k. 2
2, -2, -10, 6, -26, 38, -90, 166, 678, 1702, -346, 3750, -4442, 11942, 44710, 110246, -20826, 241318, -282970, 765606, 2862758, 7057062, -1331546, 15445670, 49000102, 116108966, 250326694, 518762150, -18108762, 1055633062 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Inspired by A243106. In contrast to that sequence, the absolute values are not increasing here.
This can be explained as follows: By comparison of the absolute values among both sequences, after replacing for each term at the other sequence: 8,9 with 0,1 it is obtained the a(n) corresponding here expressed in binary with one or more "leading zeros". This induces the described effect, cf. example. - R. J. Cano, Aug 20 2014
LINKS
EXAMPLE
From R. J. Cano, Aug 20 2014: (Start)
By looking at A243106's b-file for n=28..30:
28 11110911090911090911090908910
29 -88889088909088909088909091090
30 911110911090911090911090908910
After taking the absolute values, making the replacements, and deleting the leading zeros, we obtain:
28 11110111010111010111010100110
29 1000101000101000101011010 (4 leading zeros deleted)
30 111110111010111010111010100110
From where it is noticeable that abs(a(28))>abs(a(29))<abs(a(30)); Now by reading from binary:
abs(a(28))=518762150
abs(a(29))=18108762 (it was negative)
abs(a(30))=1055633062 (End)
PROG
(PARI) a(n, b=2)=sum(k=1, n, (-1)^isprime(k)*b^k)
CROSSREFS
Sequence in context: A163808 A223126 A127058 * A094359 A293060 A293061
KEYWORD
sign
AUTHOR
M. F. Hasler, Aug 20 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:06 EDT 2024. Contains 371964 sequences. (Running on oeis4.)