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.

A357118 Numbers such that the first digit is the number of digits and the second digit is the number of distinct digits.

This page as a plain text file.
%I A357118 #42 Nov 12 2022 01:36:44
%S A357118 322,323,4222,4224,4242,4244,4300,4303,4304,4311,4313,4314,4322,4323,
%T A357118 4324,4330,4331,4332,4335,4336,4337,4338,4339,4340,4341,4342,4345,
%U A357118 4346,4347,4348,4349,4353,4354,4355,4363,4364,4366,4373,4374,4377,4383,4384,4388,4393,4394,4399
%N A357118 Numbers such that the first digit is the number of digits and the second digit is the number of distinct digits.
%C A357118 By definition, each term must be at least a two-digit number.
%C A357118 The sequence is finite. The last term is 989765432.
%C A357118 There are 11041830 terms. - _Michael S. Branicky_, Oct 20 2022
%H A357118 Michael S. Branicky, <a href="/A357118/b357118.txt">Table of n, a(n) for n = 1..10000</a>
%e A357118 322 is a term because the first digit is the number of digits = 3, and the second digit counts the different digits {2,3} = 2.
%o A357118 (Python)
%o A357118 def ok(n):
%o A357118     s = str(n)
%o A357118     if len(s) < 2 or len(s) > 9: return False
%o A357118     return len(s) == int(s[0]) and len(set(s)) == int(s[1])
%o A357118 print([k for k in range(4394) if ok(k)]) # _Michael S. Branicky_, Oct 17 2022
%Y A357118 Cf. A319678.
%K A357118 nonn,base,fini
%O A357118 1,1
%A A357118 _Marc Morgenegg_, Oct 17 2022