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.

A285115 Row sums of A285118: a(n) = Sum_{k=1..(n-1)} (C(n-1,k-1) bitwise-and C(n-1,k)), a(0) = a(1) = 0.

Original entry on oeis.org

0, 0, 1, 0, 5, 8, 12, 20, 49, 64, 304, 672, 1204, 2648, 3852, 9320, 18297, 32960, 75472, 146392, 304920, 577336, 1211144, 2034072, 4801892, 7637392, 18795944, 33811680, 71566612, 139144320, 285508328, 569229920, 1069209737, 2314296064, 4167725024, 8567738280, 16894013736, 33135107200, 68279466472, 121133055024
Offset: 0

Views

Author

Antti Karttunen, Apr 16 2017

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_]:=If[n<2, 0, Sum[BitAnd[Binomial[n - 1,k - 1], Binomial[n - 1, k]], {k, n - 1}]]; Table[a[n], {n, 0, 100}] (* Indranil Ghosh, Apr 16 2017 *)
  • PARI
    A285115(n) = if(n<2,0,sum(k=1,(n-1),bitand(binomial(n-1,k-1),binomial(n-1,k))));
    
  • Scheme
    (define (A285115 n) (add A285118 (A000217 n) (+ -1 (A000217 (+ 1 n)))))
    (define (add intfun lowlim uplim) (let sumloop ((i lowlim) (res 0)) (cond ((> i uplim) res) (else (sumloop (+ 1 i) (+ res (intfun i)))))))

Formula

a(0) = a(1) = 0, and for n > 1, a(n) = Sum_{k=1..(n-1)} C(n-1,k-1) AND C(n-1,k), where C(n,k) is a binomial coefficient & AND is bitwise-AND (A004198).
a(n) = A285113(n) - A285114(n).
a(n) = A000079(n) - A285113(n) = (A000079(n) - A285114(n))/2.