OFFSET
0,10
LINKS
Indranil Ghosh, Table of n, a(n) for n = 0..1000
FORMULA
MATHEMATICA
n = -1; While[n < 71, n++; s = IntegerDigits[2^n - 1, 3]; k = Count[s, 2]; AppendTo[a, k]]; a (* after Emmanuel Vantieghem (see A260683)*)
Table[DigitCount[2^n-1, 3, 2], {n, 0, 80}] (* Harvey P. Dale, Dec 04 2015 *)
PROG
(PARI) a(n) = {my(d = digits(n, 3)); sum(k=1, #d, d[k]==2); } \\ Michel Marcus, Dec 03 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
L. Edson Jeffery, Dec 02 2015
STATUS
approved