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 A138791 #25 Dec 30 2015 03:13:41 %S A138791 1,11,16,15,14,38,34,29,28,19,49,76,68,98,269,79,458,397,379,299,779, %T A138791 769,689,898,799,3889,4898,5599,6698,7996,8798,9599,19888,16999,18899, %U A138791 67979,58898,39899,59998,49999,89789,189989,89998,98999,489898,298999 %N A138791 Least number k such that A070635(k) = n. %C A138791 A070635(a(n)) = n and A070635(m) <> n for m < a(n). %C A138791 Least k such that k mod A007953(k) = n. - _Robert Israel_, Dec 29 2015 %H A138791 Robert G. Wilson v and Robert Israel, <a href="/A138791/b138791.txt">Table of n, a(n) for n = 0..514</a>(n = 0..79 from Robert G. Wilson v) %e A138791 a(2) = 16: 1+6 = 7 and 16 mod 7 = 2. - _Robert Israel_, Dec 30 2015 %p A138791 extend:= proc(d, x, sx) %p A138791 global A, nmin; %p A138791 local y, n, tmax; %p A138791 if d = 0 then %p A138791 n:= x mod sx; %p A138791 if not assigned(A[n]) then %p A138791 A[n]:= x; %p A138791 if n = nmin then %p A138791 for nmin from n while assigned(A[nmin]) do od: %p A138791 fi; %p A138791 fi %p A138791 else %p A138791 tmax:= 9*d + sx; %p A138791 if nmin >= tmax then return fi; %p A138791 for y from max(0, nmin + 10 - tmax) to 9 do %p A138791 procname(d-1,10*x+y,sx+y) %p A138791 od: %p A138791 fi %p A138791 end proc: %p A138791 A[0]:= 1: %p A138791 nmin:= 1: %p A138791 for d from 2 while nmin < 101 do %p A138791 extend(d,0,0) %p A138791 od: %p A138791 seq(A[i],i=0..nmin-1); # _Robert Israel_, Dec 29 2015 %t A138791 t = Table[0, {100}]; Do[ a = Mod[n, Plus @@ IntegerDigits@n]; If[a < 100 && t[[a + 1]] == 0, t[[a + 1]] = n; Print[{a, n}]], {n, 2^31}] %t A138791 lnk[n_]:=Module[{k=1},While[Mod[k,Total[IntegerDigits[k]]]!=n,k++];k]; Array[lnk, 50, 0] (* _Harvey P. Dale_, Oct 11 2014 *) %o A138791 (Haskell) %o A138791 a199263 n = (fromJust $ elemIndex n a070635_list) + 1 %o A138791 -- _Reinhard Zumkeller_, Nov 07 2011 %Y A138791 Cf. A007953,A070635, A138792. %Y A138791 Cf. A199262. %K A138791 base,nonn %O A138791 0,2 %A A138791 _Robert G. Wilson v_, Mar 29 2008 %E A138791 Definition corrected by _Robert Israel_, Dec 29 2015