[go: up one dir, main page]

login
Integers k such that the remainder of the sum of the first k primes divided by the k-th prime is equal to k.
1

%I #28 May 18 2023 08:33:01

%S 2,7,12,83408,5290146169416

%N Integers k such that the remainder of the sum of the first k primes divided by the k-th prime is equal to k.

%C Integers k such that A071089(k) = k.

%C From _Robert Israel_, Mar 27 2018: (Start)

%C No more terms below 10^7.

%C Heuristically, the probability that k is a term is 1/prime(k) ~ 1/(k log k).

%C Since Sum_{k>=2} 1/(k log(k)) diverges, there should be infinitely many terms. However, the sum diverges very slowly, so terms may be very sparse: approximately log(log(k)) terms <= k. (End)

%C No more terms below 10^9. - _Michel Marcus_, Mar 28 2018

%C No more terms below 1.44*10^12. - _Giovanni Resta_, Apr 06 2018

%C No mroe terms below 10^13. - _Lucas A. Brown_, May 18 2023

%H Lucas A. Brown, <a href="https://github.com/lucasaugustus/oeis/blob/main/A301852.py">Python program</a>.

%e 2 is a term because prime(1)+prime(2) = 5 = 2 mod prime(2).

%p res:= NULL: p:= 1: s:= 0:

%p for m from 1 to 10^6 do

%p p:= nextprime(p);

%p s:= s+p;

%p if s mod p = m then res:= res, m fi

%p od:

%p res; # _Robert Israel_, Mar 27 2018

%o (PARI) lista(nn)= my(p = 2, s = 2); for (n=1, nn, if ((s % p) == n, print1(n, ", ")); q = nextprime(p+1); s += q; p = q;); \\ _Michel Marcus_, Mar 27 2018

%Y Cf. A000040, A071089.

%K nonn,more

%O 1,1

%A _J. M. Bergot_, Mar 27 2018

%E a(4) from _Michel Marcus_, Mar 27 2018

%E a(5) from _Lucas A. Brown_, May 18 2023