login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A104247 Primes that are the sum of digits of the first k primes for some k. 3
2, 5, 17, 19, 23, 31, 41, 61, 71, 83, 181, 269, 389, 419, 449, 631, 683, 727, 743, 809, 929, 1039, 1061, 1069, 1091, 1277, 1381, 1481, 1567, 1613, 1747, 1873, 1951, 1993, 2039, 2129, 2281, 2297, 2339, 2381, 2549, 2579 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

M. F. Hasler, Table of n, a(n) for n = 1..1000

FORMULA

a(n) = A007605(1) + ... + A007605(A058049(n)).

EXAMPLE

a(4)=19 because A058049(4)= 5 and sum of digits of the first 5 primes, 2+3+5+7+(1+1)=19 is prime.

MAPLE

P:=proc(q) local a, b, n; a:=0; b:=[]; for n from 1 to q do a:=a+convert(convert(ithprime(n), base, 10), `+`);

if isprime(a) then b:=[op(b), a]; fi; od; op(b); end: P(200); # Paolo P. Lava, Sep 27 2018

PROG

(Python)

from sympy import isprime, nextprime

def sd(n): return sum(map(int, str(n)))

def aupto(limit):

    alst, k, p, s = [], 1, 2, 2

    while s <= limit:

        if isprime(s): alst.append(s)

        k += 1; p = nextprime(p); s += sd(p)

    return alst

print(aupto(2579)) # Michael S. Branicky, Jul 18 2021

CROSSREFS

Corresponding n's: A058049. Primes: A000040, sum of digits of primes: A007605.

Cf. A051351, A075544.

Sequence in context: A025553 A343775 A075544 * A215425 A205511 A215276

Adjacent sequences:  A104244 A104245 A104246 * A104248 A104249 A104250

KEYWORD

nonn,base

AUTHOR

Zak Seidov, Feb 26 2005

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 25 05:14 EDT 2021. Contains 347652 sequences. (Running on oeis4.)