cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A100307 Modulo 2 binomial transform of 3^n.

Original entry on oeis.org

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
Offset: 0

Views

Author

Paul Barry, Dec 06 2004

Keywords

Comments

3^n may be retrieved through 3^n = Sum_{k=0..n} (-1)^A010060(n-k)*(binomial(n,k) mod 2)*a(k).

Crossrefs

Programs

  • Magma
    [(&+[3^k*(Binomial(n, k) mod 2): k in [0..n]]): n in [0..40]]; // G. C. Greubel, Feb 03 2023
    
  • Mathematica
    Table[Sum[Mod[Binomial[n,k],2]3^k,{k,0,n}],{n,0,40}] (* Harvey P. Dale, Aug 28 2013 *)
  • PARI
    a(n) = subst(lift((Mod(1,2)+'x)^n), 'x, 3); \\ Gheorghe Coserea, Jun 11 2016
    
  • 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
  • Sage
    [sum((binomial(n,k)%2)*3^k for k in [0..n]) for n in [0..50]] # Tom Edgar, Oct 11 2015
    

Formula

a(n) = Sum_{k=0..n} (binomial(n, k) mod 2)*3^k.
From Vladimir Shevelev, Dec 26-27 2013: (Start)
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)
From Tom Edgar, Oct 11 2015: (Start)
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)