OFFSET
1,2
COMMENTS
Is there any r and s such that a(r) = a(s)? Probably not.
EXAMPLE
a(4) = 1789 (=01789) formed by using digits of 7,8,9 and 10.
MATHEMATICA
sncbf[n_]:=Sort[Flatten[IntegerDigits/@Range[(n(n-1))/2+1, (n(n+1))/2]]/.(0->Nothing)]//FromDigits; Array[sncbf, 15] (* Harvey P. Dale, Nov 26 2019 *)
PROG
(Python)
def a(n):
s = "".join(sorted("".join(map(str, range((n-1)*n//2+1, n*(n+1)//2+1)))))
if '0' not in s: return int(s)
return int(s[s.rfind('0')+1:])
print([a(n) for n in range(1, 16)]) # Michael S. Branicky, Jan 23 2021
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Amarnath Murthy, Oct 05 2002
EXTENSIONS
More terms from David Wasserman, Mar 19 2005
STATUS
approved