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.

A321343 Primes p such that if k is the sum of the first p primes then the sum of the first k primes is prime.

This page as a plain text file.
%I A321343 #38 Dec 30 2018 12:42:41
%S A321343 19,73,103,157,277,313,317,421,443,523,571,607,701,823,853,907,911,
%T A321343 977,1051,1087,1117,1181,1187,1223,1451,1453,1531,1667,1861,2551,2999,
%U A321343 3169,3257,3389,3583,3671,3889,3907,3911,4597,4691,4919,5347,5527,5569,5623,5657,5839
%N A321343 Primes p such that if k is the sum of the first p primes then the sum of the first k primes is prime.
%C A321343 Primes p such that A007504(A007504(p)) is prime; subsequence of A321342.
%H A321343 Ray Chandler, <a href="/A321343/b321343.txt">Table of n, a(n) for n = 1..2500</a>
%e A321343 The smallest prime p such that A007504(p) is prime is 19 (sum of first 19 primes is 100 and sum of first 100 primes is 24133, which is prime). Therefore a(1) = 19.
%p A321343 N:=2000:
%p A321343 for n from 1 to N by 2 do
%p A321343 X:=add(ithprime(k),k=1..n);
%p A321343 Y:=add(ithprime(j),j=1..X);
%p A321343 if isprime(n)and isprime(Y) then print(n);
%p A321343 end if:
%p A321343 end do:
%t A321343 primeSum[n_] := Sum[Prime[i], {i, n}]; Select[Range[300], PrimeQ[#] && PrimeQ[primeSum[primeSum[#]]] &] (* _Amiram Eldar_, Nov 07 2018 *)
%o A321343 (PARI) upto(n) = {my(v = vector(n+1), res = List, t = 1, setv, s = 0, Ap = 0, AAp=0, q =0); v[1] = 2; forprime(p = 3, prime(n+1), t++; v[t] = v[t-1] + p); t=1; vt = v[1]; forprime(p = 2, , AAp += p; q++; if(q == vt, if(isprime(t) && isprime(AAp), listput(res, t); print1(t", ")); t++; if(t>=n, return(res)); vt = v[t])); res} \\ _David A. Corneth_, Nov 09 2018
%o A321343 (Perl)
%o A321343 use ntheory qw(:all);
%o A321343 for (my ($i, $k) = (1, 1); ; ++$k) {
%o A321343     my $p = nth_prime($k);
%o A321343     if (is_prime sum_primes nth_prime sum_primes nth_prime $p) {
%o A321343         print "a($i) = $p\n"; ++$i;
%o A321343     }
%o A321343 } # _Daniel Suteu_, Nov 11 2018
%Y A321343 Cf. A007504, A013916, A321439, A321342.
%K A321343 nonn
%O A321343 1,1
%A A321343 _David James Sycamore_, Nov 06 2018