login
A058846
Numbers k such that the sum of odd primes up to k is palindromic.
3
3, 5, 229, 257, 1031, 7213, 11863, 133853, 1002073, 31924583, 97137589, 1837875227
OFFSET
1,1
COMMENTS
Sum is 3 + 5 + 7 + 11 + 13 + 17 + ... + k.
a(13) > 8.79*10^13, if it exists. - Giovanni Resta, Sep 01 2018
FORMULA
a(n) = A065091(A058845(n)). - R. J. Mathar, Sep 09 2015
PROG
(PARI) lista(nn) = {s = 0; p = 2; for (n=1, nn, p = nextprime(p+1); s += p; d = digits(s); if (Vecrev(d) == d, print1(p, ", ")); ); } \\ Michel Marcus, Aug 09 2017
(Python)
from sympy import primerange
def ispal(n): s = str(n); return s == s[::-1]
def afind(limit):
s = 0
for p in primerange(3, limit):
s += p
if ispal(s): print(p, end=", ")
afind(2*10**6) # Michael S. Branicky, Mar 05 2021
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Patrick De Geest, Dec 15 2000
STATUS
approved