A284380 Numbers k with digits 5 and 7 only.
5, 7, 55, 57, 75, 77, 555, 557, 575, 577, 755, 757, 775, 777, 5555, 5557, 5575, 5577, 5755, 5757, 5775, 5777, 7555, 7557, 7575, 7577, 7755, 7757, 7775, 7777, 55555, 55557, 55575, 55577, 55755, 55757, 55775, 55777, 57555, 57557, 57575, 57577, 57755, 57757
Offset: 1
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Magma
[n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {5, 7}];
-
Mathematica
Join @@ ((FromDigits /@ Tuples[{5, 7}, #]) & /@ Range@ 5) (* Giovanni Resta, Mar 28 2017 *)
-
Python
from sympy.utilities.iterables import multiset_permutations def aupton(terms): n, digits, alst = 0, 1, [] while len(alst) < terms: mpstr = "".join(d*digits for d in "57") for mp in multiset_permutations(mpstr, digits): alst.append(int("".join(mp))) if len(alst) == terms: break else: digits += 1 return alst print(aupton(44)) # Michael S. Branicky, May 07 2021
Comments