login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A171725
6-digit numbers k such that: (a) the digits of k are from the set {1, 2, 3, 4, 5}, and (b) any digit that appears in k appears at least twice.
2
111111, 111122, 111133, 111144, 111155, 111212, 111221, 111222, 111313, 111331, 111333, 111414, 111441, 111444, 111515, 111551, 111555, 112112, 112121, 112122, 112211, 112212, 112221, 112222, 112233, 112244, 112255, 112323, 112332, 112424, 112442, 112525, 112552
OFFSET
1,1
COMMENTS
See Problem 4 of RMO 2007 (Regional Mathematical Olympiad-India).
There are exactly 1405 such numbers from 111111, 111122,... to ..., 555544, 555555.
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 1..1405 (full sequence)
MAPLE
A171725:={}: for n from 9331 to 46655 do d:=convert(n, base, 6): for k from 0 to 5 do cordig:=true: if((k=0 and numboccur(k, d)>0) or (k>0 and numboccur(k, d)=1))then cordig:=false:break: fi: od: if(cordig)then A171725 := A171725 union {op(convert(d, base, 10, 10^nops(d)))}: fi: od: op(sort(convert(A171725, list))); # Nathaniel Johnston, Jun 24 2011
MATHEMATICA
cc=0; re=Reap[Do[dc=DigitCount[n]; If[Take[dc, {6, 10}]=={0, 0, 0, 0, 0}&&FreeQ[Take[dc, 5], 1], cc++; Sow[n]], {n, 111111, 555555}]][[2, 1]]; cc
CROSSREFS
Sequence in context: A205243 A223110 A094325 * A135403 A154549 A038448
KEYWORD
base,fini,full,nonn
AUTHOR
Zak Seidov, Dec 16 2009
STATUS
approved