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.

A285113 Row sums of A285116: a(n) = 2 + Sum_{k=1..(n-1)} (C(n-1,k-1) bitwise-or C(n-1,k)), a(0) = 1, a(1) = 2.

Original entry on oeis.org

1, 2, 3, 8, 11, 24, 52, 108, 207, 448, 720, 1376, 2892, 5544, 12532, 23448, 47239, 98112, 186672, 377896, 743656, 1519816, 2983160, 6354536, 11975324, 25917040, 48312920, 100406048, 196868844, 397726592, 788233496, 1578253728, 3225757559, 6275638528, 13012144160, 25792000088, 51825463000, 104303846272, 206598440472
Offset: 0

Views

Author

Antti Karttunen, Apr 16 2017

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_]:=If[n<2, n + 1, 2 + Sum[BitOr[Binomial[n - 1,k - 1], Binomial[n - 1, k]], {k, n - 1}]]; Table[a[n], {n, 0, 100}] (* Indranil Ghosh, Apr 16 2017 *)
  • PARI
    A285113(n) = if(n<2,n+1,2+sum(k=1,(n-1),bitor(binomial(n-1,k-1),binomial(n-1,k))));
    
  • Scheme
    (define (A285113 n) (add A285116 (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) = 1, a(1) = 2, for n > 1, a(n) = 2 + Sum_{k=1..(n-1)} C(n-1,k-1) OR C(n-1,k), where C(n,k) is binomial coefficient and OR is bitwise-OR (A003986).
a(n) = A285114(n) + A285115(n).
a(n) = A000079(n) - A285115(n).