cp's OEIS Frontend

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.

Showing 1-2 of 2 results.

A118668 Number of distinct digits needed to write the n-th triangular number in decimal representation.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 1, 3, 3, 3, 3, 3, 3, 3, 2, 4, 3, 3, 3, 3, 4, 4, 4, 3, 4, 4, 4, 4, 2, 3, 4, 3, 4, 4, 3, 4, 2, 3, 4, 4, 4, 3, 3, 4, 3, 4, 3, 2, 4, 4, 4, 3, 3, 4, 4, 3, 4, 3, 4, 3, 4, 4, 4, 4, 3, 4, 3, 4, 4, 4, 2, 2, 3, 3, 4
Offset: 0

Views

Author

Reinhard Zumkeller, May 19 2006

Keywords

Comments

0 < a(n) <= 10;
a(n) = A043537(A000217(n)).

Examples

			n=99: 99*(99+1)/2 = 4950 -> a(99) = #{0,4,5,9} = 4;
see A119033 for an overview of sequences with terms composed of not more than 3 distinct digits.
n=100: 100*(100+1)/2 = 5050 -> a(100) = #{0,5} = 2;
		

Crossrefs

Programs

  • Haskell
    a118668 = a043537 . a000217
    a118668_list = map a043537 a000217_list
    -- Reinhard Zumkeller, Jul 11 2015
  • Mathematica
    Length[Union[IntegerDigits[#]]]&/@Accumulate[Range[0,110]] (* Harvey P. Dale, Jul 23 2012 *)

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

Original entry on oeis.org

0, 10, 105, 1035, 10296, 102378, 1024596, 10348975, 102738945, 1062489753
Offset: 1

Views

Author

Anders Hellström, Jul 19 2015

Keywords

Crossrefs

Programs

  • Mathematica
    # (# + 1)/2 & /@ {0, 4, 14, 45, 143, 452, 1431, 4549, 14334, 46097} (* terms in A255678 *) (* Robert G. Wilson v, Jul 21 2015 *)
  • PARI
    number_of_distinct_digits(m) = if(m==0,1,#vecsort(digits(m), , 8))
    a(n)=my(m=0); while(!(number_of_distinct_digits(m*(m+1)/2)==n), m++); m*(m+1)/2;
    first(m)=vector(m, n, a(n)) \\m<=10 /* Anders Hellström, Aug 03 2015 */

Formula

a(n) = A255678(n)*(A255678(n)+1)/2.
Showing 1-2 of 2 results.