OFFSET
0,1
LINKS
Harry J. Smith, Table of n, a(n) for n = 0..2000
FORMULA
If n < 10, then a(n) = 10 - [n=1], if n >= 10 consists of a digit k (not equal to 8) followed by 9's, then a(n) = k+1, otherwise a(n) = 1. - Charlie Neder, May 23 2019
MATHEMATICA
nmax = 100; XhasD[x_, d_] := MemberQ[IntegerDigits[x], d]; Reap[For[n = 0, n <= nmax, n++, For[m = n+1, m <= 10*n+10, m++, a = m; b = False; For[d = 0, d <= 9, d++, If[XhasD[n, d] && XhasD[m, d], b = True; Break[]]]; If[b, Break[]]]; Sow[a-n]]][[2, 1]] (* Jean-François Alcover, Nov 23 2015, after Harry J. Smith *)
PROG
(PARI) XhasD(x, d)= { local(f); while (x>9, f=x-10*(x\10); if (f==d, return(1)); x\=10); return(x==d) } { for (n=0, 2000, for (m=n + 1, 10*n + 10, a=m; b=0; for (d=0, 9, if (XhasD(n, d) && XhasD(m, d), b=true; break)); if (b, break) ); write("b063661.txt", n, " ", a - n) ) } \\ Harry J. Smith, Aug 27 2009
CROSSREFS
KEYWORD
AUTHOR
Reinhard Zumkeller, Jul 25 2001
STATUS
approved