|
|
A100307
|
|
Modulo 2 binomial transform of 3^n.
|
|
7
|
|
|
1, 4, 10, 40, 82, 328, 820, 3280, 6562, 26248, 65620, 262480, 538084, 2152336, 5380840, 21523360, 43046722, 172186888, 430467220, 1721868880, 3529831204, 14119324816, 35298312040, 141193248160, 282472589764, 1129890359056
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
3^n may be retrieved through 3^n = Sum_{k=0..n} (-1)^A010060(n-k)*(binomial(n,k) mod 2)*a(k).
|
|
LINKS
|
|
|
FORMULA
|
a(n) = Sum_{k=0..n} (binomial(n, k) mod 2)*3^k.
Sum_{n>=0} 1/a(n)^r = Product_{k>=0} (1 + 1/(3^(2^k)+1)^r),
Sum_{n>=0} (-1)^A000120(n)/a(n)^r = Product_{k>=0} (1 - 1/(3^(2^k)+1)^r), where r > 0 is a real number.
In particular,
Sum_{n>=0} 1/a(n) = Product_{k>=0} (1 + 1/(3^(2^k)+1)) = 1.391980...;
Sum_{n>=0} (-1)^A000120(n)/a(n) = 2/3.
a(2^n) = 3^(2^n)+1, n >= 0.
Note that analogs of Stephan's limit formulas (see Shevelev link) reduce to the relations:
a(2^t*n+2^(t-1)) = 8*(3^(2^(t-1)+1))/(3^(2^(t-1))-1) * a(2^t*n+2^(t-1)-2), t >= 2.
In particular, for t=2,3,4, we have the following formulas:
a(4*n+2) = 10 * a(4*n),
a(8*n+4) = (41/5) * a(8*n+2),
a(16*n+8) = (3281/410) * a(16*n+6), etc. (End)
a(n) = Product_{b_j != 0} a(2^j) where n = Sum_{j>=0} b_j*2^j is the binary representation of n.
a(2*k+1) = 4*a(2*k). (End)
|
|
MATHEMATICA
|
Table[Sum[Mod[Binomial[n, k], 2]3^k, {k, 0, n}], {n, 0, 40}] (* Harvey P. Dale, Aug 28 2013 *)
|
|
PROG
|
(Sage) [sum((binomial(n, k)%2)*3^k for k in [0..n]) for n in [0..50]] # Tom Edgar, Oct 11 2015
(PARI) a(n) = subst(lift((Mod(1, 2)+'x)^n), 'x, 3); \\ Gheorghe Coserea, Jun 11 2016
(Magma) [(&+[3^k*(Binomial(n, k) mod 2): k in [0..n]]): n in [0..40]]; // G. C. Greubel, Feb 03 2023
(Python)
def A100307(n): return sum((bool(~n&n-k)^1)*3**k for k in range(n+1)) # Chai Wah Wu, May 02 2023
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|