login
a(n) is the first triangular number whose decimal representation uses n distinct digits.
2

%I #40 Aug 04 2015 01:13:09

%S 0,10,105,1035,10296,102378,1024596,10348975,102738945,1062489753

%N a(n) is the first triangular number whose decimal representation uses n distinct digits.

%H Anders Hellström, <a href="/A260214/b260214.txt">Table of n, a(n) for n = 1..10</a>

%F a(n) = A255678(n)*(A255678(n)+1)/2.

%t # (# + 1)/2 & /@ {0, 4, 14, 45, 143, 452, 1431, 4549, 14334, 46097} (* terms in A255678 *) (* _Robert G. Wilson v_, Jul 21 2015 *)

%o (PARI) number_of_distinct_digits(m) = if(m==0,1,#vecsort(digits(m), , 8))

%o a(n)=my(m=0); while(!(number_of_distinct_digits(m*(m+1)/2)==n), m++); m*(m+1)/2;

%o first(m)=vector(m, n, a(n)) \\m<=10 /* _Anders Hellström_, Aug 03 2015 */

%Y Cf. A000217, A043537, A118668, A255678.

%K nonn,base,fini,full

%O 1,2

%A _Anders Hellström_, Jul 19 2015