cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A238778 Sum of all primes p such that 2n - p is also a prime.

This page as a plain text file.
%I A238778 #17 Apr 27 2025 08:00:33
%S A238778 2,3,8,15,12,21,32,36,40,55,72,65,56,90,64,119,144,57,120,168,132,161,
%T A238778 240,200,156,270,168,203,360,155,320,396,136,350,432,333,380,546,320,
%U A238778 369,672,387,352,810,368,423,672,294,600,816,520,583,864,660,784
%N A238778 Sum of all primes p such that 2n - p is also a prime.
%C A238778 Sum of n-th row in triangle A171637.
%H A238778 Reinhard Zumkeller, <a href="/A238778/b238778.txt">Table of n, a(n) for n = 2..10000</a>
%F A238778 a(n) = A008472(A238711(n)).
%F A238778 a(n) mod 2 = A010051(n).
%F A238778 a(n) = n*A035026(n). - _Robert G. Wilson v_, Apr 28 2018
%t A238778 Table[Total@Select[Select[Prime[Range[2 n]], # < 2 n &], PrimeQ[2 n - #] &], {n, 2, 56}] (* _Robert Price_, Apr 26 2025 *)
%o A238778 (Haskell)
%o A238778 a238778 n = sum $ filter ((== 1) . a010051') $
%o A238778    map (2 * n -) $ takeWhile (<= 2 * n) a000040_list
%o A238778 (PARI) a(n) = my(s=0); forprime(p=2, 2*n, if(isprime(2*n-p), s+=p)); s; \\ _Michel Marcus_, Jan 24 2022
%Y A238778 Cf. A008472, A238711.
%Y A238778 Cf. A010051, A035026, A171637
%K A238778 nonn
%O A238778 2,1
%A A238778 _Reinhard Zumkeller_, Mar 06 2014