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.

A071689 Number of ways to write n as n = x*y*z*t+x+y+z+t 0<=x<=y<=z<=t<=n.

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 7, 9, 10, 13, 15, 17, 19, 23, 24, 29, 31, 35, 37, 42, 45, 50, 53, 57, 62, 69, 71, 77, 81, 87, 92, 99, 102, 111, 116, 122, 128, 138, 140, 148, 156, 165, 170, 180, 184, 195, 203, 210, 218, 229, 236, 246, 254, 263, 271, 285, 291, 304, 311, 322
Offset: 0

Views

Author

Benoit Cloitre, Jun 23 2002

Keywords

Crossrefs

Programs

  • Mathematica
    xmax = 3; ymax = 66; zmax = 99;(* When extending data, terms where maxima for x, y or z are reached have to be checked one by one. *)
    r[n_] := r[n] = Module[{r1, r2, r3, rn}, r1 = Reap[Do[rn = Reduce[n == x y z t + x + y + z + t && 0 <= x <= y <= z <= t <= n, t, Integers]; If[rn =!= False, Sow[{x, y, z, t} /. {ToRules[rn]}]], {x, 0, xmax}, {y, 0, ymax}, {z, 0, zmax}]]; If[r1 == {Null, {}} , {}, r2 = r1[[2, 1]]; r3 = Flatten[r2, 1]; If[Max[r3[[All, 1]]] == xmax, Print["xmax reached at n = ", n]]; If[Max[r3[[All, 2]]] == ymax, Print["ymax reached at n = ", n]]; If[Max[r3[[All, 3]]] == zmax, Print["zmax reached at n = ", n]]; r3]];
    a[n_] := Length[r[n]];
    Table[Print[n, " ", a[n]]; a[n], {n, 0, m = 199}] (* Jean-François Alcover, Nov 20 2018 *)
  • PARI
    for(n=0,50,print1(sum(a=0,n,sum(b=0,a,sum(c=0,b,sum(d=0,c,if(a*b*c*d+a+b+c+d-n,0,1))))),","))