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 A273913 #35 Jun 22 2016 23:39:44 %S A273913 1902,1902,730,230,550,420,502,1902,2150,1074,1074,1074,1902,1902, %T A273913 8170,730,550,730,600,230,80,230,470,550,1074,4045,4990,180,230,106, %U A273913 90,4990,1062,102,902,1230,730,108,1406,1017,1410,630,2038,505,230,1810,150,2306,630 %N A273913 Consider the sequence b(k) with initial values b(1) = 1 and b(2) = n and satisfying b(k) = b(k-1) + Pd(b(k-2)), where Pd(x) is the product of the digits of x. Then b(k) eventually becomes constant, and this constant is a(n). %C A273913 Maximum value in the first 10^5 terms is a(6874) = 209875, from b(128) on. %C A273913 First n's whose last repetitive number of the sequence b(k) is a multiple: 1, 2, 5, 6, 34, 42, 135, 195, 460, 893, 2370, 4230, 7165, 237945. %H A273913 Paolo P. Lava, <a href="/A273913/b273913.txt">Table of n, a(n) for n = 1..10000</a> %e A273913 b(1) = 1, b(2) = 7. Then: %e A273913 b(3) = 7 + Pd(1) = 7+1 = 8; b(4) = 8 + Pd(7) = 8+7 = 15; %e A273913 b(5) = 15 + Pd(8) = 15+8 = 23; b(6) = 23 + Pd(15) = 23+5 = 28; %e A273913 b(7) = 28 + Pd(23) = 28+6 = 34; b(8) = 34 + Pd(28) = 34+16 = 50; %e A273913 … %e A273913 b(19) = 270 + Pd(214) = 270+8 = 278; b(20) = 278 + Pd(270) = 278+0 = 278; %e A273913 b(21) = 278 + Pd(278) = 278+112 = 390; b(22) = 390 + Pd(278) = 390+112 = 502; %e A273913 b(23) = 502 + Pd(502) = 502+0 = 502; therefore a(7) = 502. %p A273913 with(numtheory); T:=proc(w) local x, y, z; x:=w; y:=1; %p A273913 for z from 1 to ilog10(x)+1 do y:=y*(x mod 10); x:=trunc(x/10); od; y; end: %p A273913 P:=proc(q) local a1,a2,a3,n; for n from 1 to q do a1:=1; a2:=n; a3:=T(a1)+a2; %p A273913 while not (a1=a2 and a2=a3) do a1:=a2; a2:=a3; a3:=T(a1)+a2; od; print(a1); %p A273913 od; end: P(10^7); %t A273913 a[n_] := Block[{b=0, c=1, d=n, p}, While[! (b == c == d), b=c; p = Times @@ IntegerDigits@ c; c = d; d += p]; d]; Array[a, 50] (* _Giovanni Resta_, Jun 20 2016 *) %o A273913 (PARI) pd(n) = my(d=digits(n)); prod(k=1, #d, d[k]); %o A273913 a(n) = {ba = 1; bb = n; bc = bb + pd(ba); while (!((ba ==bb) && (bc == bb)), newb = bb + pd(ba); ba = bb; bb = bc; bc = bb + pd(ba);); bc;} \\ _Michel Marcus_, Jun 20 2016 %Y A273913 Cf. A007954, A063108. %K A273913 nonn,base,easy %O A273913 1,1 %A A273913 _Paolo P. Lava_, Jun 17 2016