OFFSET
1,1
COMMENTS
Each k-digit term has k-1 appearances of a digit, d1, and 1 appearance of a different digit, d2, and k-1 >= 2 so that d1 is repeated. Specifically, the 2-digit terms of A010784 are not terms here. - Michael S. Branicky, May 22 2022
a(n) = A031955(n+81) for n <= 244.
For n <= 243, i.e., the 3-digit terms, a(n) = A218556(n+10). - M. F. Hasler, Nov 02 2012
LINKS
Arkadiusz Wesolowski, Table of n, a(n) for n = 1..10000
MATHEMATICA
lst = {}; Do[If[SortBy[Tally[IntegerDigits[n]], Last][[-1, -1]] == IntegerLength[n] - 1, AppendTo[lst, n]], {n, 100, 288}]; lst
lst = {}; Do[r = Table[a, {n}]; Do[c = FromDigits@Permutations[Join[{d}, r]]; If[d == 0, c = Rest[c]]; AppendTo[lst, c], {d, 0, 9}], {a, 0, 9}, {n, 2, 2}]; Drop[Union@Flatten[lst], 19]
nrepQ[n_] := Module[{dg = Select[DigitCount[n], # > 0 &]}, Length[dg] == 2 && Min[dg] == 1 && Max[dg] > 1]; Select[Range[300], nrepQ] (* Harvey P. Dale, Nov 20 2012 *)
PROG
(Python)
from itertools import count, islice
def agen(): # generator of terms
for d in count(3):
dterms = set()
for most in "123456789":
dterms.add(int(most + "0"*(d-1)))
for diff in "0123456789":
if most == diff: continue
cands = (most*i + diff + most*(d-1-i) for i in range(d))
dterms.update(int(t) for t in cands if t[0] != "0")
yield from sorted(dterms)
print(list(islice(agen(), 52))) # Michael S. Branicky, May 17 2022
CROSSREFS
KEYWORD
base,easy,nonn,less
AUTHOR
Arkadiusz Wesolowski, May 08 2012
STATUS
approved