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.

A192264 a(1)=1, a(2)=2; a(n) = abs((n-1)*a(n-1) - n*a(n-2)), n > 2.

Original entry on oeis.org

1, 2, 1, 5, 15, 45, 165, 795, 4875, 35925, 305625, 2930775, 31196175, 364519425, 4635329325, 63697629075, 940361466675, 14839587610125, 249245709115425, 4438876720990575, 83543374528387575, 1656755577234346425, 34527125085002707125
Offset: 1

Views

Author

Pasi Airikka, Jun 27 2011

Keywords

Examples

			a(3) = abs(a(2)*(3-1) - a(1)*3) = abs(2*2 - 1*3) =  1;
a(4) = abs(a(3)*(4-1) - a(2)*4) = abs(1*3 - 2*4) =  5;
a(5) = abs(a(4)*(5-1) - a(3)*5) = abs(5*4 - 1*5) = 15.
		

Programs

  • MATLAB
    % n = number of computed terms of sequence
    a(1)=1; a(2)=2;
    for i=3:n,
        a(i,1) = abs(a(i-1)*(i-1) - a(i-2)*i) ;
    end
  • Maple
    A192264 := proc(n) if n <=2 then n; else abs( (n-1)*procname(n-1)-n*procname(n-2)) ; end if; end proc: # R. J. Mathar, Jun 27 2011
  • Mathematica
    a[1] = 1; a[2] = 2; a[n_] := a[n] = Abs[(n-1)*a[n-1] - n*a[n-2]]; Table[a[n], {n, 30}]

Formula

a(n) = abs((n-1)*a(n-1) - n*a(n-2)), a(1) = 1, a(2) = 2.

Extensions

Corrected and edited by R. J. Mathar, Jun 27 2011