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!)
A284636 Numbers with digits 6 and 9 only. 5

%I #21 Sep 08 2022 08:46:19

%S 6,9,66,69,96,99,666,669,696,699,966,969,996,999,6666,6669,6696,6699,

%T 6966,6969,6996,6999,9666,9669,9696,9699,9966,9969,9996,9999,66666,

%U 66669,66696,66699,66966,66969,66996,66999,69666,69669,69696,69699,69966,69969

%N Numbers with digits 6 and 9 only.

%C All terms are composite.

%C All terms are divisible by 3. - _Michael S. Branicky_, Jun 09 2021

%H Felix Fröhlich, <a href="/A284636/b284636.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = 3 * A032810(n).

%t Table[FromDigits /@ Tuples[{6, 9}, n], {n, 5}] // Flatten (* or *)

%t Select[Range@ 70000, Total@ Pick[DigitCount@ #, {0, 0, 0, 0, 0, 1, 0, 0, 1, 0}, 0] == 0 &] (* _Michael De Vlieger_, Apr 02 2017 *)

%o (Magma) [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {6, 9}]

%o (PARI)

%o a(n) = {

%o my(z, e = logint(n+1,2,&z),

%o t1 = 9 * subst(Pol(binary(n+1-z),'x), 'x, 10),

%o t2 = 6 * subst(Pol(binary(2*z-2-n),'x), 'x, 10));

%o t1+t2;

%o };

%o vector(44, n, a(n)) \\ _Gheorghe Coserea_, Apr 04 2017

%o (Python)

%o def a(n): return int(bin(n+1)[3:].replace('0', '6').replace('1', '9'))

%o print([a(n) for n in range(1, 45)]) # _Michael S. Branicky_, Jun 09 2021

%Y Cf. A032810.

%Y Numbers n with digits 6 and k only for k = 0 - 5 and 7 - 9: A204093 (k = 0), A284293 (k = 1), A284632 (k = 2), A284633 (k = 3), A284634 (k = 4), A256291 (k = 5), A256292 (k = 7), A284635 (k = 8), this sequence (k = 9).

%K nonn,base

%O 1,1

%A _Jaroslav Krizek_, Apr 02 2017

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 7 18:28 EDT 2024. Contains 375749 sequences. (Running on oeis4.)