login
A284380
Numbers n with digits 5 and 7 only.
6
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,1
LINKS
MATHEMATICA
Join @@ ((FromDigits /@ Tuples[{5, 7}, #]) & /@ Range@ 5) (* Giovanni Resta, Mar 28 2017 *)
PROG
(Magma) [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {5, 7}]
(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
CROSSREFS
Prime terms are in A020467.
Numbers n with digits 5 and k only for k = 0 - 4 and 6 - 9: A169964 (k = 0), A276037 (k = 1), A072961 (k = 2), A284379 (k = 3), A256290 (k = 4), A256291 (k = 6), this sequence (k = 7), A284381 (k = 8), A284382 (k = 9).
Sequence in context: A320116 A320108 A320112 * A082714 A300090 A324984
KEYWORD
nonn,base
AUTHOR
Jaroslav Krizek, Mar 28 2017
STATUS
approved