OFFSET
1,2
FORMULA
a(n) = abs((n-1)*a(n-1) - n*a(n-2)), a(1) = 1, a(2) = 2.
EXAMPLE
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.
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}]
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Pasi Airikka, Jun 27 2011
EXTENSIONS
Corrected and edited by R. J. Mathar, Jun 27 2011
STATUS
approved