[go: up one dir, main page]

login
Search: a284379 -id:a284379
     Sort: relevance | references | number | modified | created      Format: long | short | data
Numbers n with digits 5 and 7 only.
+10
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).
KEYWORD
nonn,base
AUTHOR
Jaroslav Krizek, Mar 28 2017
STATUS
approved
Numbers n with digits 5 and 8 only.
+10
4
5, 8, 55, 58, 85, 88, 555, 558, 585, 588, 855, 858, 885, 888, 5555, 5558, 5585, 5588, 5855, 5858, 5885, 5888, 8555, 8558, 8585, 8588, 8855, 8858, 8885, 8888, 55555, 55558, 55585, 55588, 55855, 55858, 55885, 55888, 58555, 58558, 58585, 58588, 58855, 58858
OFFSET
1,1
COMMENTS
All terms except the first are composite.
LINKS
FORMULA
a(n) = (A284380(n)+A284382(n))/2. - Robert Israel, Mar 28 2017
MATHEMATICA
Join @@ ((FromDigits /@ Tuples[{5, 8}, #]) & /@ Range@ 5) (* Giovanni Resta, Mar 28 2017 *)
PROG
(Magma) [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {5, 8}]
(Python)
def a(n): return int(bin(n+1)[3:].replace('0', '5').replace('1', '8'))
print([a(n) for n in range(1, 45)]) # Michael S. Branicky, May 08 2021
CROSSREFS
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), A284380 (k = 7), this sequence (k = 8), A284382 (k = 9).
KEYWORD
nonn,base
AUTHOR
Jaroslav Krizek, Mar 28 2017
STATUS
approved
Numbers n with digits 5 and 9 only.
+10
4
5, 9, 55, 59, 95, 99, 555, 559, 595, 599, 955, 959, 995, 999, 5555, 5559, 5595, 5599, 5955, 5959, 5995, 5999, 9555, 9559, 9595, 9599, 9955, 9959, 9995, 9999, 55555, 55559, 55595, 55599, 55955, 55959, 55995, 55999, 59555, 59559, 59595, 59599, 59955, 59959
OFFSET
1,1
COMMENTS
Prime terms are in A020468.
LINKS
MATHEMATICA
Join @@ ((FromDigits /@ Tuples[{5, 9}, #]) & /@ Range@ 5) (* Giovanni Resta, Mar 28 2017 *)
PROG
(Magma) [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {5, 9}]
(Python)
def a(n): return int(bin(n+1)[3:].replace('0', '5').replace('1', '9'))
print([a(n) for n in range(1, 45)]) # Michael S. Branicky, May 09 2021
CROSSREFS
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), A284380 (k = 7), A284381 (k = 8), this sequence (k = 9).
KEYWORD
nonn,base
AUTHOR
Jaroslav Krizek, Mar 28 2017
STATUS
approved
Numbers with digits 3 and 8 only.
+10
1
3, 8, 33, 38, 83, 88, 333, 338, 383, 388, 833, 838, 883, 888, 3333, 3338, 3383, 3388, 3833, 3838, 3883, 3888, 8333, 8338, 8383, 8388, 8833, 8838, 8883, 8888, 33333, 33338, 33383, 33388, 33833, 33838, 33883, 33888, 38333, 38338, 38383, 38388, 38833, 38838
OFFSET
1,1
MATHEMATICA
Table[FromDigits/@Tuples[{3, 8}, n], {n, 5}]//Flatten (* Harvey P. Dale, Mar 23 2021 *)
PROG
(Magma) [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {3, 8}]
CROSSREFS
Prime terms are in A020464.
Numbers with digits 3 and k only for k = 0 - 2 and 4 - 9: A169966 (k = 0), A032917 (k = 1), A032810 (k = 2), A032834 (k = 4), A284379 (k = 5), A284633 (k = 6), A143967 (k = 7), this sequence (k = 8), A284964 (k = 9).
KEYWORD
nonn,base
AUTHOR
Jaroslav Krizek, Apr 06 2017
STATUS
approved
Numbers with digits 3 and 9 only.
+10
1
3, 9, 33, 39, 93, 99, 333, 339, 393, 399, 933, 939, 993, 999, 3333, 3339, 3393, 3399, 3933, 3939, 3993, 3999, 9333, 9339, 9393, 9399, 9933, 9939, 9993, 9999, 33333, 33339, 33393, 33399, 33933, 33939, 33993, 33999, 39333, 39339, 39393, 39399, 39933, 39939
OFFSET
1,1
COMMENTS
All terms > 3 are composite.
FORMULA
a(n) = 3 * A032917(n).
MATHEMATICA
Table[FromDigits/@Tuples[{3, 9}, n], {n, 5}]//Flatten (* Harvey P. Dale, Sep 20 2022 *)
PROG
(Magma) [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {3, 9}]
CROSSREFS
Cf. Numbers with digits 3 and k only for k = 0 - 2 and 4 - 9: A169966 (k = 0), A032917 (k = 1), A032810 (k = 2), A032834 (k = 4), A284379 (k = 5), A284633 (k = 6), A143967 (k = 7), A284963 (k = 8), this sequence (k = 9).
KEYWORD
nonn,base
AUTHOR
Jaroslav Krizek, Apr 06 2017
STATUS
approved

Search completed in 0.007 seconds