OFFSET
0,1
FORMULA
Find prime indices with associated primes where both SODs are the same and prime.
EXAMPLE
a(3) = 182, with SOD 11. The associated prime is 1091, also SOD 11. SODs must be prime and equal.
PROG
(UBASIC)
20 'SOD prime index and SOD prime
30 Y=1
40 Y=nxtprm(Y)
50 C=C+1:print C; Y; "-";
60 D=str(C):Z=str(Y)
70 E=len(D):F=len(Z)
80 for Q=2 to E
90 A=mid(D, Q, 1):G=val(A)
100 I=I+G:print I;
110 next Q
120 for R=2 to F
130 B=mid(Z, R, 1):H=val(B)
140 J=J+H:print J;
150 next R
160 if I=prmdiv(I) and J=prmdiv(J) and I=J then stop
170 I=0:J=0
180 goto 40
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Enoch Haga, Mar 19 2006
EXTENSIONS
Typo in comment fixed by Franklin T. Adams-Watters, Dec 03 2009
STATUS
approved