|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
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
|
|
|
KEYWORD
|
base,fini,full,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|