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.

A102856 Sum of 1 or 2 distinct tetrahedral numbers.

Original entry on oeis.org

0, 1, 4, 5, 10, 11, 14, 20, 21, 24, 30, 35, 36, 39, 45, 55, 56, 57, 60, 66, 76, 84, 85, 88, 91, 94, 104, 119, 120, 121, 124, 130, 140, 155, 165, 166, 169, 175, 176, 185, 200, 204, 220, 221, 224, 230, 240, 249, 255, 276, 285, 286, 287, 290, 296, 304, 306
Offset: 1

Views

Author

Jud McCranie, Mar 01 2005

Keywords

Crossrefs

Cf. A102801 (sums if 2 distinct positive)

Programs

  • Maple
    N:= 1000: # for terms <= N
    R:= 0:
    for i from 1 do
      ti:= i*(i+1)*(i+2)/6;
      if ti > N then break fi;
      for j from 0 to i-1 do
         v:= ti + j*(j+1)*(j+2)/6;
         if v > N then break fi;
         R:= R, v;
      od;
    od:
    sort(convert({R},list)); # Robert Israel, Jan 16 2024
  • Mathematica
    Module[{nn=12, tetra}, tetra=Table[(n(n+1)(n+2))/6, {n, nn}]; Union[ Total/@ Subsets[tetra, 2]]] (* James C. McMahon, Jan 12 2024 *)

Extensions

a(1) = 0 prepended by James C. McMahon, Jan 15 2024