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.

A210666 Numbers with at least three digits in which all digits but one are the same.

This page as a plain text file.
%I A210666 #50 May 22 2022 14:12:20
%S A210666 100,101,110,112,113,114,115,116,117,118,119,121,122,131,133,141,144,
%T A210666 151,155,161,166,171,177,181,188,191,199,200,202,211,212,220,221,223,
%U A210666 224,225,226,227,228,229,232,233,242,244,252,255,262,266,272,277,282,288
%N A210666 Numbers with at least three digits in which all digits but one are the same.
%C A210666 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
%C A210666 a(n) = A031955(n+81) for n <= 244.
%C A210666 For n <= 243, i.e., the 3-digit terms, a(n) = A218556(n+10). - _M. F. Hasler_, Nov 02 2012
%H A210666 Arkadiusz Wesolowski, <a href="/A210666/b210666.txt">Table of n, a(n) for n = 1..10000</a>
%t A210666 lst = {}; Do[If[SortBy[Tally[IntegerDigits[n]], Last][[-1, -1]] == IntegerLength[n] - 1, AppendTo[lst, n]], {n, 100, 288}]; lst
%t A210666 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]
%t A210666 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 *)
%o A210666 (Python)
%o A210666 from itertools import count, islice
%o A210666 def agen(): # generator of terms
%o A210666     for d in count(3):
%o A210666         dterms = set()
%o A210666         for most in "123456789":
%o A210666             dterms.add(int(most + "0"*(d-1)))
%o A210666             for diff in "0123456789":
%o A210666                 if most == diff: continue
%o A210666                 cands = (most*i + diff + most*(d-1-i) for i in range(d))
%o A210666                 dterms.update(int(t) for t in cands if t[0] != "0")
%o A210666         yield from sorted(dterms)
%o A210666 print(list(islice(agen(), 52))) # _Michael S. Branicky_, May 17 2022
%Y A210666 Subsequence of A031955. Supersequence of A164937.
%Y A210666 Cf. A010784, A031955, A218556.
%K A210666 base,easy,nonn,less
%O A210666 1,1
%A A210666 _Arkadiusz Wesolowski_, May 08 2012