# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a136288 Showing 1-1 of 1 %I A136288 #34 Oct 28 2021 02:06:48 %S A136288 2,3,5,7,13,19,29,53,61,71,79,83,97,103,113,139,149,151,157,163,167, %T A136288 191,199,233,251,281,337,347,353,397,421,433,461,563,599,643,719,773, %U A136288 797,811,859,883,953,977,1031,1039,1061,1063,1091,1097,1153,1187,1201,1213 %N A136288 Primes which are the absolute value of the alternating sum and difference of the first n primes. %H A136288 Dmitry Kamenetsky, Table of n, a(n) for n = 1..10000 (first 144 terms by Paolo P. Lava and Giorgio Balzarotti) %F A136288 A000040 INTERSECT A008347. - _R. J. Mathar_, Apr 04 2008 %e A136288 5 = abs(2-3+5-7+11-13) (first 6 primes), %e A136288 7 = abs(2-3+5-7+11-13+17-19) (first 8 primes), %e A136288 etc. %p A136288 P:=proc(n) local i,s; s:=0; for i from 1 by 1 to n do s:=s+(-1)^i*ithprime(i); if isprime(abs(s)) then print(abs(s)); fi; od; end: P(1000); %t A136288 Select[Abs@Accumulate@Table[(-1)^(k+1)*Prime@k,{k,355}],PrimeQ] (* _Giorgos Kalogeropoulos_, Sep 22 2021 *) %Y A136288 Cf. A000040, A008347, A013918. %K A136288 easy,nonn %O A136288 1,1 %A A136288 _Paolo P. Lava_ and _Giorgio Balzarotti_, Mar 20 2008 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE