|
|
A039145
|
|
Numbers whose base-10 representation has the same number of 4's and 9's.
|
|
1
|
|
|
0, 1, 2, 3, 5, 6, 7, 8, 10, 11, 12, 13, 15, 16, 17, 18, 20, 21, 22, 23, 25, 26, 27, 28, 30, 31, 32, 33, 35, 36, 37, 38, 49, 50, 51, 52, 53, 55, 56, 57, 58, 60, 61, 62, 63, 65, 66, 67, 68, 70, 71, 72, 73, 75, 76, 77, 78, 80, 81, 82, 83, 85, 86, 87, 88, 94, 100, 101, 102
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
MATHEMATICA
|
Select[Range[0, 200], DigitCount[#, 10, 4] == DigitCount[#, 10, 9] &] (* Vincenzo Librandi, Oct 27 2016 *)
|
|
PROG
|
(Magma) [n: n in [0..120] | Multiplicity(S, 4) eq Multiplicity(S, 9) where S is {*d: d in Intseq(n)*}]; // Vincenzo Librandi, Oct 27 2016
(Python)
from itertools import count, islice
def A039145_gen(startvalue=0): # generator of terms >= startvalue
return filter(lambda k:(s:=str(k)).count('4')==s.count('9'), count(max(startvalue, 0)))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|