OFFSET
1,1
COMMENTS
All terms are composite.
All terms are divisible by 3. - Michael S. Branicky, Jun 09 2021
LINKS
Felix Fröhlich, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = 3 * A032810(n).
MATHEMATICA
Table[FromDigits /@ Tuples[{6, 9}, n], {n, 5}] // Flatten (* or *)
Select[Range@ 70000, Total@ Pick[DigitCount@ #, {0, 0, 0, 0, 0, 1, 0, 0, 1, 0}, 0] == 0 &] (* Michael De Vlieger, Apr 02 2017 *)
PROG
(Magma) [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {6, 9}]
(PARI)
a(n) = {
my(z, e = logint(n+1, 2, &z),
t1 = 9 * subst(Pol(binary(n+1-z), 'x), 'x, 10),
t2 = 6 * subst(Pol(binary(2*z-2-n), 'x), 'x, 10));
t1+t2;
};
vector(44, n, a(n)) \\ Gheorghe Coserea, Apr 04 2017
(Python)
def a(n): return int(bin(n+1)[3:].replace('0', '6').replace('1', '9'))
print([a(n) for n in range(1, 45)]) # Michael S. Branicky, Jun 09 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Jaroslav Krizek, Apr 02 2017
STATUS
approved