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-2 of 2 results.

A219671 Number of n-step paths on cubic lattice from (0,0,0) to (1,0,0) with moves in any direction but no zero moves allowed.

Original entry on oeis.org

0, 1, 16, 243, 4704, 90930, 1883760, 39868955, 867923840, 19226700486, 432776971200, 9863289713046, 227212909995456, 5281459355486028, 123725917334379360, 2918138849807324715, 69236356202861088384, 1651381196044566423294, 39572852284708565895072
Offset: 0

Views

Author

Jon Perry, Nov 24 2012

Keywords

Crossrefs

Cf. A219670.

Programs

  • Maple
    b:= proc(n,p) option remember; `if`(p[3]>n, 0, `if`(n=0, 1,
          add(add(add(`if`(i=0 and j=0 and k=0, 0, b(n-1, sort(map(abs,
          p+[i, j, k])))), i=-1..1), j=-1..1), k=-1..1)))
        end:
    a:= n-> b(n, [0$2, 1]):
    seq (a(n), n=0..25);  # Alois P. Heinz, Nov 28 2012
  • Mathematica
    b[n_, p_] := b[n, p] = If[p[[3]]>n, 0, If[n==0, 1, Sum[Sum[Sum[If[i==0 && j==0 && k==0, 0, b[n-1, Sort[Map[Abs, p + {i, j, k}]]]], {i, -1, 1}], {j, -1, 1}], {k, -1, 1}]]];
    a[n_] := b[n, {0, 0, 1}];
    a /@ Range[0, 25] (* Jean-François Alcover, Dec 20 2020, after Alois P. Heinz *)

Formula

a(n) ~ c * 26^n / n^(3/2), where c = 0.1102253437... . - Vaclav Kotesovec, Sep 07 2014

Extensions

More terms from Alois P. Heinz, Nov 28 2012

A219986 Number of n-step paths on a quartic lattice that move from (0,0,0,0) to (1,0,0,1) allowing all moves in {-1,0,1}^4 inclusive the zero move.

Original entry on oeis.org

0, 1, 36, 1764, 92416, 5267025, 315630756, 19684370601, 1264977082944, 83266957255329, 5588691282002500, 381203015928291216, 26357375491548319296, 1843677173726039815969, 130261796682232750056900, 9284172482167489217304900, 666818520819487582805692416
Offset: 0

Views

Author

Jon Perry, Dec 02 2012

Keywords

Crossrefs

Programs

  • JavaScript
    b=new Array();
    for (i1=-1;i1<2;i1++)
    for (i2=-1;i2<2;i2++)
    for (i3=-1;i3<2;i3++)
    for (i4=-1;i4<2;i4++) {
    n=(i1+1)+(i2+1)*3+(i3+1)*9+(i4+1)*27;
    b[n]=[i1,i2,i3,i4];
    }
    function inc(arr,m) {
    al=arr.length-1;
    full=true;
    for (ac=0;ac<=al;ac++) if (arr[ac]!=m) {full=false;break;}
    if (full==true) return false;
    while (arr[al]==m && al>0) {arr[al]=0;al--;}
    arr[al]++;
    return true;
    }
    for (k=0;k<5;k++) {
    c=0;
    a=new Array();
    for (i=0;i
    				
  • Maple
    b:= proc(n, p) option remember; `if`(p[4]>n, 0, `if`(n=0, 1,
          add(add(add(add(b(n-1, sort(map(abs, p+[i, j, k, m])))
          , i=-1..1), j=-1..1), k=-1..1), m=-1..1)))
        end:
    a:= n-> b(n, [0$2, 1$2]):
    seq(a(n), n=0..20);  # Alois P. Heinz, Dec 02 2012
  • Mathematica
    b[n_, p_] := b[n, p] = If[p[[4]] > n, 0, If[n == 0, 1,
         Sum[Sum[Sum[Sum[b[n-1, Sort[Abs[ p + {i, j, k, m}]]],
         {i, -1, 1}], {j, -1, 1}], {k, -1, 1}], {m, -1, 1}]]];
    a[n_] := b[n, {0, 0, 1, 1}];
    Table [a[n], {n, 0, 20}] (* Jean-François Alcover, Apr 28 2022, after Alois P. Heinz *)

Extensions

More terms from Alois P. Heinz, Dec 02 2012
Showing 1-2 of 2 results.