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.

Showing 1-1 of 1 results.

A168148 Row sums of triangle in A168030.

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 4, 3, 6, 6, 6, 4, 6, 7, 10, 6, 11, 12, 10, 6, 8, 8, 12, 8, 12, 11, 18, 12, 13, 16, 20, 11, 22, 22, 18, 12, 14, 14, 16, 10, 14, 12, 24, 16, 16, 18, 22, 12, 22, 23, 34, 20, 25, 28, 26, 17, 30, 26, 38, 24, 26, 31, 42, 22, 43, 44, 34, 22, 28, 26, 30, 20, 26
Offset: 0

Views

Author

Philippe Deléham, Nov 19 2009

Keywords

Crossrefs

Programs

  • Mathematica
    t[n_, k_]:= t[n, k]= If[k<0 || k>n, 0, If[k==0, 1, If[n<=2*k, t[n, n-k -1] + t[n-1,k], t[n,n-k] + t[n-1,k]]]]; (* A118340 *)
    Table[Sum[Mod[t[n, k], 2], {k,0,n}], {n,0,80}] (* G. C. Greubel, Jan 12 2023 *)
  • SageMath
    @CachedFunction
    def t(n, k): # t = A118340
        if (k<0 or k>n): return 0
        elif (k==0): return 1
        elif (n>2*k): return t(n, n-k) + t(n-1, k)
        else: return t(n, n-k-1) + t(n-1, k)
    def A168148(n): return sum( t(n,k)%2 for k in range(n+1))
    [A168148(n) for n in range(81)] # G. C. Greubel, Jan 12 2023

Formula

From G. C. Greubel, Jan 12 2023: (Start)
a(n) = Sum_{k=0..n} A168030(n, k).
a(n) = Sum_{k=0..n} (A118340(n, k) mod 2). (End)

Extensions

Terms a(16) onward added by G. C. Greubel, Jan 12 2023
Showing 1-1 of 1 results.