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.

A340564 Primes p such that the sum of (p mod q) for primes q < p is prime.

This page as a plain text file.
%I A340564 #9 Jan 11 2021 23:08:03
%S A340564 5,13,23,113,137,151,163,251,317,461,479,487,521,661,691,719,887,907,
%T A340564 991,1129,1213,1453,1901,1949,1987,2053,2141,2243,2333,2399,2549,2797,
%U A340564 3041,3049,3119,3221,3433,3457,3527,3529,3691,3697,3911,4013,4241,4649,4817,5099,5407,5413,5689,5693,6217
%N A340564 Primes p such that the sum of (p mod q) for primes q < p is prime.
%C A340564 a(n) = prime(m) if A033955(m) is prime.
%H A340564 Robert Israel, <a href="/A340564/b340564.txt">Table of n, a(n) for n = 1..4000</a>
%e A340564 a(3) = 23 is a term because (23 mod 2) + ... + (23 mod 19) = 1+2+3+2+1+10+6+4 = 29 is prime.
%p A340564 f:= proc(n) local i,p;
%p A340564   p:= ithprime(n);
%p A340564   add(p mod ithprime(i),i=1..n-1)
%p A340564 end proc:
%p A340564 map(ithprime, select(t -> isprime(f(t)), [$1..2000]));
%o A340564 (PARI) isok(p) = if (isprime(p), my(s=0); forprime(q=2, precprime(p-1), s += p % q); isprime(s);); \\ _Michel Marcus_, Jan 11 2021
%Y A340564 Cf. A033955.
%K A340564 nonn
%O A340564 1,1
%A A340564 _J. M. Bergot_ and _Robert Israel_, Jan 11 2021