This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A117461 #17 Apr 21 2024 11:39:14 %S A117461 1,2,3,14,30,43,74,142,184,214,238,241,256,287,292,308,313,346,443, %T A117461 449,472,544,593,601,607,623,715,737,791,814,836,854,874,881,883,913, %U A117461 931,973,980,995,1088,1156,1237,1307,1316,1343,1381,1396,1462,1565,1622 %N A117461 Indices associated with primes in A117460. Both primes and their indices, after calculation of their respective digit sums, bear the relationship that both are prime and that sod(i) < sod(p) and sod(p) is the next prime after to sod(i), where sod is the sum of digits function. %C A117461 A117458-A117459 is the opposite case where sod(i) > sod(p). %C A117461 A117460-A117461 is sod(i) < sod(p). %C A117461 A033548-A033549 is sod(i) = sod(p). - _G. L. Honaker, Jr._ %F A117461 SOD's are calculated for these indices; if they and their associated prime SOD's are both prime and bear the relation in the Brief description above, they are added to the sequence. %e A117461 a(4) = 30. Its associated prime is 113 with sod = 5; sod(a(4)) = 3. Since 3 < 5 and 5 is the next prime after 3, a(4) belongs in the sequence. %o A117461 (UBASIC) %o A117461 10 'use of str,mid,len,val %o A117461 20 'in SOD prime index and SOD prime %o A117461 30 Y=1 %o A117461 40 Y=nxtprm(Y) %o A117461 50 C=C+1:print C;Y;"-"; %o A117461 60 D=str(C):Z=str(Y) %o A117461 70 E=len(D):F=len(Z) %o A117461 80 for Q=2 to E %o A117461 90 A=mid(D,Q,1):G=val(A) %o A117461 100 I=I+G:print I; %o A117461 110 next Q %o A117461 120 for R=2 to F %o A117461 130 B=mid(Z,R,1):H=val(B) %o A117461 140 J=J+H:print J; %o A117461 150 next R %o A117461 160 if I=prmdiv(I) and J=prmdiv(J) and I<J and J=nxtprm(I) then stop %o A117461 170 I=0:J=0 %o A117461 180 goto 40 %Y A117461 Cf. A007953 (sum of digits). %Y A117461 Cf. A117460, A117458, A117459, A033548, A033549. %K A117461 easy,nonn,base %O A117461 0,2 %A A117461 _Enoch Haga_, Mar 18 2006