OFFSET
1,1
COMMENTS
No more terms below 2^32
EXAMPLE
a(3)=13 because the run of the 3 consecutive primes {13, 17, 19} is such that the sum of digits for each prime is {4, 8, 10}.
PROG
(UBASIC)
10 P=1:KM=0:K=0:'puzzle 1290, Meller
20 P=nxtprm(P):if P>2^32-20 then end
30 gosub *SODP:if S<>prmdiv(S) then K=K+1:Q=P:goto 20
40 if K>KM then print K, Q:KM=K
50 K=0:goto 20
200 *SODP:S=0:L=alen(P)
210 for I=1 to L:D=val(mid(str(P), I+1, 1))
220 S=S+D:next I
230 return
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Carlos Rivera, Apr 24 2014
STATUS
approved