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.

A025115 a(n) = s(1)*t(n) + s(2)*t(n-1) + ... + s(k)*t(n-k+1), where k = floor(n/2), s = A005408 (odd natural numbers), t = A023533.

Original entry on oeis.org

0, 0, 1, 3, 5, 0, 0, 0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 32, 36, 40, 44, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    A023533:= func< n | Binomial(Floor((6*n-1)^(1/3)) +2, 3) ne n select 0 else 1 >;
    A025115:= func< n | (&+[(2*k-1)*A023533(n+2-k): k in [1..Floor((n+1)/2)]]) >;
    [A025115(n): n in [1..100]]; // G. C. Greubel, Sep 13 2022
    
  • Mathematica
    b[j_]:= b[j]= Sum[KroneckerDelta[j, Binomial[m+2,3]], {m,0,15}];
    A025115[n_]:= A025115[n]= Sum[(2*(n-j+2)-1)*b[j], {j, Floor[(n+4)/2], n+1}];
    Table[A025115[n], {n,100}] (* G. C. Greubel, Sep 13 2022 *)
  • SageMath
    @CachedFunction
    def b(j): return sum(bool(j==binomial(m+2,3)) for m in (0..10))
    @CachedFunction
    def A025115(n): return sum((2*(n-j+2)-1)*b(j) for j in (((n+4)//2)..n+1))
    [A025115(n) for n in (1..100)] # G. C. Greubel, Sep 13 2022