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.

A171378 a(n) = (n+1)^2 - A006046(n+1).

Original entry on oeis.org

0, 1, 4, 7, 14, 21, 30, 37, 52, 67, 84, 99, 120, 139, 160, 175, 206, 237, 270, 301, 338, 373, 410, 441, 486, 529, 574, 613, 662, 705, 750, 781, 844, 907, 972, 1035, 1104, 1171, 1240, 1303, 1380, 1455, 1532, 1603, 1684, 1759, 1836, 1899, 1992, 2083, 2176, 2263
Offset: 0

Views

Author

Roger L. Bagula, Dec 07 2009

Keywords

Crossrefs

Programs

  • Magma
    [(n+1)^2 - (&+[ (&+[ Binomial(m,k) mod 2: k in [0..m]]): m in [0..n]]): n in [0..60]]; // G. C. Greubel, Apr 11 2019
    
  • Mathematica
    Table[(n+1)^2 -Sum[Sum[Mod[Binomial[m,k],2], {k,0,m}], {m,0,n}], {n,0, 60}]
    a[0] = 0; a[1] = 1; a[n_] := a[n] = 2 a[Floor[#]] + a[Ceiling[#]] &[n/2]; Array[(# + 1)^2 - a[# + 1] &, 52, 0] (* Michael De Vlieger, Nov 01 2022 *)
  • PARI
    {a(n) = (n+1)^2 - sum(m=0,n, sum(k=0,m, binomial(m,k)%2))};
    for(n=0,60, print1(a(n), ", ")) \\ G. C. Greubel, Apr 11 2019
    
  • Sage
    [(n+1)^2 - sum(sum(binomial(m,k)%2 for k in (0..m)) for m in (0..n)) for n in (0..60)] # G. C. Greubel, Apr 11 2019

Extensions

Edited by G. C. Greubel, Apr 11 2019
Definition corrected by Georg Fischer, Jun 21 2020