login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A284971 Numbers with digits 4 and 7 only. 5
4, 7, 44, 47, 74, 77, 444, 447, 474, 477, 744, 747, 774, 777, 4444, 4447, 4474, 4477, 4744, 4747, 4774, 4777, 7444, 7447, 7474, 7477, 7744, 7747, 7774, 7777, 44444, 44447, 44474, 44477, 44744, 44747, 44774, 44777, 47444, 47447, 47474, 47477, 47744, 47747 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
MATHEMATICA
Flatten@ Table[FromDigits /@ Tuples[{4, 7}, n], {n, 5}] (* Giovanni Resta, Apr 08 2017 *)
PROG
(Magma) [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {4, 7}]
(PARI) is(n) = my(x=Set([4, 7]), y=Set([0, 1, 2, 3, 5, 6, 8, 9])); if(#setintersect(Set(digits(n)), x) > 0 && #setintersect(Set(digits(n)), y)==0, return(1)); 0 \\ Felix Fröhlich, Apr 08 2017
(Python)
def a(n):
b = bin(n+1)[3:]
return int("".join(b.replace("0", "4").replace("1", "7")))
print([a(n) for n in range(1, 45)]) # Michael S. Branicky, Apr 07 2021
CROSSREFS
Prime terms are in A020465.
Numbers with digits 4 and k only for k = 0 - 3 and 5 - 9: A169967 (k = 0), A032822 (k = 1), A284920 (k = 2), A032834 (k = 3), A256290 (k = 5), A284634 (k = 6), this sequence (k = 7), A284972 (k = 8), A284973 (k = 9).
Sequence in context: A059213 A093102 A199404 * A139030 A115439 A348625
KEYWORD
nonn,base
AUTHOR
Jaroslav Krizek, Apr 07 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 9 17:39 EDT 2024. Contains 374188 sequences. (Running on oeis4.)