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 A261198 #54 Nov 16 2024 02:01:01 %S A261198 2,23,0,23,11,0,19,23,0,11,13,0,17,19,0,23,37,0,29,41,0,41,101,0,37, %T A261198 41,0,101,59,0,43,37,0,41,43,0,47,101,0,59,67,0,89,59,0,67,71,0,101, %U A261198 89,0,59,61,0,89,67,0,71,73,0,103,101,0,127,89,0,109,103,0,101,79,0,83,127,0,89,101,0,109,109,0,103,107,0,127,101,0,109,113,0,101,103,0,107,109,0,113,127,0,101 %N A261198 Start with n and repeat the map x -> x+sumdigits(x) until reaching a prime, which is a(n), or 0 if no prime is reached. %C A261198 Multiples of 3 never reach a prime because (3*x + sumdigits(3*x)) is always a multiple of 3. %H A261198 Maghraoui Abdelkader, <a href="/A261198/b261198.txt">Table of n, a(n) for n = 1..100</a> %e A261198 a(3)=0; a(6)=0; a(9)=0 as 3,6,9 are multiples of 3. %e A261198 n=2; a0=2; a1=2+sumdigits(2)=4; a2=4+sumdigits(4)=8; a3=8+sumdigits(8)=16; %e A261198 a4=16+sumdigits(16)=16+7=23; a4 is prime, so a(2)=23; %e A261198 a(14)=14+(1+4=19); 19 is prime. %e A261198 a(16)=16+(1+6)=23; 23 is prime. %o A261198 (PARI) %o A261198 verif(n)={if((n%3)==0, print1(0,", ");return();); %o A261198 b=1; a=n; %o A261198 while(b<10, a=a+sumdigits(a) ;if(isprime(a),print1(a,", "); b=20))} %o A261198 for(n=1, 100, verif(n);) %Y A261198 Cf. A000040, A001651, A008585, A154561. %K A261198 nonn,base %O A261198 1,1 %A A261198 _Maghraoui Abdelkader_, Sep 30 2015