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.

A047844 Patrick De Geest's "Generations" array read by antidiagonals: a(n,1) = n-th prime, a(1,k+1) = a(2,k), a(n,k+1) = a(n-1,k) + a(n+1,k).

Original entry on oeis.org

2, 3, 3, 5, 7, 7, 7, 10, 13, 13, 11, 16, 23, 30, 30, 13, 20, 30, 43, 56, 56, 17, 28, 44, 67, 97, 127, 127, 19, 32, 52, 82, 125, 181, 237, 237, 23, 40, 68, 112, 179, 276, 403, 530, 530, 29, 48, 80, 132, 214, 339, 520, 757, 994, 994, 31, 54, 94, 162, 274
Offset: 1

Views

Author

Keywords

Examples

			Array begins:
  2,    3,    7,   13,   30,   56,  127,  237,  530, ...
  3,    7,   13,   30,   56,  127,  237,  530,  994, ...
  5,   10,   23,   43,   97,  181,  403,  757, 1662, ...
  7,   16,   30,   67,  125,  276,  520, 1132, 2156, ...
		

Crossrefs

Columns give A000040, A048448-A048455. See also A048456-A048466.

Programs

  • Maple
    A047844:=proc(n,k)global a:if(type(a[n,k],integer))then return a[n,k]:elif(k=1)then a[n,k]:=ithprime(n):elif(n=1)then a[n,k]:=A047844(2,k-1):else a[n,k]:=A047844(n-1,k-1)+A047844(n+1,k-1):fi:return a[n,k]:end:
    for d from 1 to 8 do for m from 1 to d do print(A047844(d-m+1,m)):od:od: # Nathaniel Johnston, Apr 11 2011
  • Mathematica
    a[n_, 1] := a[n, 1] = Prime[n]; a[1, k_] := a[1, k] = a[2, k-1]; a[n_, k_] := a[n, k] = a[n-1, k-1] + a[n+1, k-1]; Table[a[n-k+1, k], {n, 1, 11}, {k, 1, n}] // Flatten (* Jean-François Alcover, Nov 26 2013 *)
  • PARI
    a(n,k)=if(k==1,prime(n),n==1,a(2,k-1),a(n-1,k-1)+a(n+1,k-1))
    for(s=2,9,for(k=1,s-1,print1(a(s-k,k)", "))) \\ Charles R Greathouse IV, Nov 26 2013

Extensions

a(46)-a(60) from Nathaniel Johnston, Apr 11 2011