OFFSET
1,1
COMMENTS
LINKS
Ray Chandler, Table of n, a(n) for n = 1..2500
EXAMPLE
MAPLE
N:=100:
for n from 1 to N do
X:=add(ithprime(k), k=1..ithprime(n));
Y:=add(ithprime(r), r=1..X);
if isprime(Y)then print(n);
end if:
end do:
MATHEMATICA
primeSum[n_] := Sum[Prime[i], {i, n}]; Select[Range[200], PrimeQ[ primeSum[primeSum[Prime[#]]]] &] (* Amiram Eldar, Nov 09 2018 *)
PROG
(Perl)
use ntheory qw(:all);
for (my ($i, $k) = (1, 1); ; ++$k) {
if (is_prime sum_primes nth_prime sum_primes nth_prime nth_prime $k) {
print "a($i) = $k\n"; ++$i;
}
} # Daniel Suteu, Nov 11 2018
(PARI)
sumprimes(n)={my(p=0, s=0); for(i=1, n, p=nextprime(1+p); s+=p); s}
ok(k)={isprime(sumprimes(sumprimes(prime(k))))}
for(n=1, 100, if(ok(n), print1(n, ", "))) \\ Andrew Howroyd, Nov 11 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
David James Sycamore, Nov 09 2018
EXTENSIONS
a(30)-a(54) from Daniel Suteu, Nov 11 2018
STATUS
approved