Svoboda | Graniru | BBC Russia | Golosameriki | Facebook
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!)
A256341 Numbers which have only digits 8 and 9 in base 10. 9
8, 9, 88, 89, 98, 99, 888, 889, 898, 899, 988, 989, 998, 999, 8888, 8889, 8898, 8899, 8988, 8989, 8998, 8999, 9888, 9889, 9898, 9899, 9988, 9989, 9998, 9999, 88888, 88889, 88898, 88899, 88988, 88989, 88998, 88999, 89888, 89889 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
a(n) = A007931(n) + A002281(A000523(n+1)) = A256341(n) + A256077(n) etc.
MATHEMATICA
Flatten[Table[FromDigits[#, 10]&/@Tuples[{8, 9}, n], {n, 5}]]
PROG
(Magma) [n: n in [1..35000] | Set(IntegerToSequence(n, 10)) subset {8, 9}];
(PARI) A256341(n)=vector(#n=binary(n+1)[2..-1], i, 10^(#n-i))*n~+10^#n\9*8
(Magma) [n: n in [1..100000] | Set(Intseq(n)) subset {8, 9}]; // Vincenzo Librandi, Aug 19 2016
(Python)
def a(n): return int(bin(n+1)[3:].replace('0', '8').replace('1', '9'))
print([a(n) for n in range(1, 45)]) # Michael S. Branicky, Aug 09 2021
CROSSREFS
Cf. A007088 (digits 0 & 1), A007931 (digits 1 & 2), A032810 (digits 2 & 3), A032834 (digits 3 & 4), A256290 (digits 4 & 5) - A256292 (digits 6 & 7), A256340 (digits 7 & 8).
Sequence in context: A195991 A304410 A248290 * A116249 A256162 A175556
KEYWORD
nonn,base,easy
AUTHOR
M. F. Hasler, Mar 27 2015
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 September 12 05:07 EDT 2024. Contains 375842 sequences. (Running on oeis4.)