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!)
A284972 Numbers with digits 4 and 8 only. 2
4, 8, 44, 48, 84, 88, 444, 448, 484, 488, 844, 848, 884, 888, 4444, 4448, 4484, 4488, 4844, 4848, 4884, 4888, 8444, 8448, 8484, 8488, 8844, 8848, 8884, 8888, 44444, 44448, 44484, 44488, 44844, 44848, 44884, 44888, 48444, 48448, 48484, 48488, 48844, 48848 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
All terms are even.
LINKS
FORMULA
a(n) = 2 * A284920(n) = 4 * A032822(n).
MATHEMATICA
Flatten@ Table[FromDigits /@ Tuples[{4, 8}, n], {n, 5}] (* Giovanni Resta, Apr 07 2017 *)
PROG
(Magma) [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {4, 8}]
(PARI) a(n) = my (b = binary(1+n)); b[1] = 0; return (4*(10^(#b-1)-1)/(10-1) + (8-4)*fromdigits(b)) \\ Rémy Sigrist, Apr 08 2017
(PARI) a(n)={my(v=binary(n+1)); v[1]=0; v+=vector(#v, i, i>1); 4*fromdigits(v)} \\ R. J. Cano, Apr 08 2017
(PARI) a(n, {p=[4, 8]})={my(v=binary(n+1)); fromdigits(vector(#v-1, i, p[2]*v[i+1]+p[1]*!v[i+1]))} \\ R. J. Cano, Apr 09 2017
CROSSREFS
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), A284971 (k = 7), this sequence (k = 8), A284973 (k = 9).
Sequence in context: A137054 A338423 A163343 * A045639 A337782 A285751
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 May 7 21:53 EDT 2024. Contains 372317 sequences. (Running on oeis4.)