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.

A024316 a(n) = s(1)*s(n) + s(2)*s(n-1) + ... + s(k)*s(n+1-k), where k = floor((n+1)/2), s = A023531.

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 2, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 2, 1, 0, 0, 1, 0, 1, 1, 0, 2, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 2, 1, 0, 0, 2, 0, 0, 0, 0, 3, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a024316 n = sum $ take (div (n + 1) 2) $ zipWith (*) zs $ reverse zs
                where zs = take n $ tail a023531_list
    -- Reinhard Zumkeller, Feb 14 2015
    
  • Magma
    A023531:= func< n | IsIntegral( (Sqrt(8*n+9) - 3)/2 ) select 1 else 0 >;
    [ (&+[A023531(j)*A023531(n-j+1): j in [1..Floor((n+1)/2)]]) : n in [1..110]]; // G. C. Greubel, Jan 17 2022
    
  • Mathematica
    A023531[n_]:= SquaresR[1, 8n+9]/2;
    a[n_]:= a[n]= Sum[A023531[j]*A023531[n-j+1], {j, Floor[(n+1)/2]}];
    Table[a[n], {n, 110}] (* G. C. Greubel, Jan 17 2022 *)
  • Sage
    def A023531(n):
        if ((sqrt(8*n+9) -3)/2).is_integer(): return 1
        else: return 0
    [sum( A023531(j)*A023531(n-j+1) for j in (1..floor((n+1)/2)) ) for n in (1..110)] # G. C. Greubel, Jan 17 2022

Formula

a(n) = Sum_{j=1..floor((n+1)/2)} A023531(j)*A023531(n-j+1). - G. C. Greubel, Jan 17 2022