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.
%I A356178 #13 Aug 03 2022 12:40:18 %S A356178 1,3,199,351,1583,1955,2579,2627,3251,3407,3503,5311,6359,6819,7295, %T A356178 7547,8791,9663,10143,10591,11499,11579,12199,12443,14527,15563,15583, %U A356178 16051,16543,16655,18047,18319,20691,20847,23979,24079,24575,25667,26491,28235,30395,30627,32235,32259,33091,33287,33527 %N A356178 Numbers k such that both Sum_{i=1..k} i*prime(i) and Sum_{i=1..k} (k+1-i)*prime(i) are prime. %C A356178 Numbers k such that A014148(k) and A014285(k) are both prime. %C A356178 a(n) == 3 (mod 4) for n > 1. %H A356178 Robert Israel, <a href="/A356178/b356178.txt">Table of n, a(n) for n = 1..10000</a> %e A356178 a(2) = 3 is a term because Sum_{i=1..3} i*prime(i) = 1*2 + 2*3 + 3*5 = 23 and Sum_{i=1..3} (4-i)*prime(i) = 3*2 + 2*3 + 1*5 = 17 are prime. %p A356178 S1:= 2: S2:= 2: S3:= 2*S2-S1: R:= 1: count:= 1: p:= 2: %p A356178 for n from 2 to 40000 do %p A356178 p:= nextprime(p); %p A356178 S1:= S1 + n*p; %p A356178 S2:= S2 + p; %p A356178 if n mod 4 = 3 and isprime(S1) then %p A356178 S3:= (n+1)*S2 - S1; %p A356178 if isprime(S3) then %p A356178 count:= count+1; R:= R, n; %p A356178 fi %p A356178 fi; %p A356178 od: %p A356178 R; %t A356178 r = Range[35000]; p = Prime[r]; Intersection[Position[Accumulate[r*p], _?PrimeQ], Position[Accumulate[Accumulate[p]], _?PrimeQ]] // Flatten (* _Amiram Eldar_, Jul 28 2022 *) %o A356178 (PARI) isok(k) = my(vp=primes(k)); isprime(sum(i=1, k, i*vp[i])) && isprime(sum(i=1, k, (k+1-i)*vp[i])); \\ _Michel Marcus_, Jul 29 2022 %Y A356178 Cf. A014148, A014285. %K A356178 nonn %O A356178 1,2 %A A356178 _J. M. Bergot_ and _Robert Israel_, Jul 28 2022