OFFSET
1,2
EXAMPLE
a(10) = 430 because prime(430) = 2999, 2 + 9 + 9 + 9 = 29 = prime(10) and this is the smallest such number.
MATHEMATICA
Module[{nn=522*10^4, tbl}, tbl=Table[{n, Total[IntegerDigits[Prime[n]]]}, {n, nn}]; Table[SelectFirst[tbl, #[[2]]==Prime[n]&], {n, 20}]][[;; , 1]] (* The program generates the first 20 terms of the sequence. *) (* Harvey P. Dale, Feb 19 2023 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Ilya Gutkovskiy, Jul 19 2021
STATUS
approved