%I #15 Sep 08 2022 08:46:19
%S 5,7,55,57,75,77,555,557,575,577,755,757,775,777,5555,5557,5575,5577,
%T 5755,5757,5775,5777,7555,7557,7575,7577,7755,7757,7775,7777,55555,
%U 55557,55575,55577,55755,55757,55775,55777,57555,57557,57575,57577,57755,57757
%N Numbers n with digits 5 and 7 only.
%H Michael S. Branicky, <a href="/A284380/b284380.txt">Table of n, a(n) for n = 1..10000</a>
%t Join @@ ((FromDigits /@ Tuples[{5, 7}, #]) & /@ Range@ 5) (* _Giovanni Resta_, Mar 28 2017 *)
%o (Magma) [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {5, 7}]
%o (Python)
%o from sympy.utilities.iterables import multiset_permutations
%o def aupton(terms):
%o n, digits, alst = 0, 1, []
%o while len(alst) < terms:
%o mpstr = "".join(d*digits for d in "57")
%o for mp in multiset_permutations(mpstr, digits):
%o alst.append(int("".join(mp)))
%o if len(alst) == terms: break
%o else: digits += 1
%o return alst
%o print(aupton(44)) # _Michael S. Branicky_, May 07 2021
%Y Prime terms are in A020467.
%Y 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).
%K nonn,base
%O 1,1
%A _Jaroslav Krizek_, Mar 28 2017
|