|
|
A051638
|
|
a(n) = sum_{k=0..n} (C(n,k) mod 3).
|
|
8
|
|
|
1, 2, 4, 2, 4, 8, 4, 8, 13, 2, 4, 8, 4, 8, 16, 8, 16, 26, 4, 8, 13, 8, 16, 26, 13, 26, 40, 2, 4, 8, 4, 8, 16, 8, 16, 26, 4, 8, 16, 8, 16, 32, 16, 32, 52, 8, 16, 26, 16, 32, 52, 26, 52, 80, 4, 8, 13, 8, 16, 26, 13, 26, 40, 8, 16, 26, 16, 32, 52, 26, 52, 80, 13
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
Write n in base 3; if the representation contains r 1's and s 2's then a(n) = 2^{r-1} * (3^(s+1) - 1) = 1/2 * (3*A006047(n) - 2^(A062756(n))). - Robin Chapman, Ahmed Fares (ahmedfares(AT)my-deja.com) and others, Jul 16 2001
|
|
MATHEMATICA
|
Table[2^(DigitCount[n, 3, 1]-1) (3^(DigitCount[n, 3, 2]+1)-1), {n, 0, 80}] (* Harvey P. Dale, Jun 20 2019 *)
|
|
PROG
|
(Haskell)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|