OFFSET
1,3
FORMULA
a(1) = 1, a(n) = Sum_{j=1..n-1} floor(1/gcd(n, j))*a(j)*a(n-j). - Farideh Firoozbakht, Aug 09 2004
EXAMPLE
Since 1 and 5 are the positive integers < 6 and coprime to 6, a(6) = a(1)*a(5) + a(5)*a(1) = 1*12 + 12*1 = 24.
MATHEMATICA
a[1]=1; a[n_]:=a[n]=Sum[Floor[1/GCD[j, n]]a[j]a[n-j], {j, n-1}]; Table[a[n], {n, 30}] (* Farideh Firoozbakht, Aug 09 2004 *)
a[1] = 1; a[n_] := a[n] = Sum[ If[GCD[j, n] == 1, a[j]a[n - j], 0], {j, n - 1}]; Table[ a[n], {n, 28}] (* Robert G. Wilson v, Aug 11 2004 *)
PROG
(PARI) {m=28; v=vector(m); v[1]=1; for(n=2, m, s=0; for(j=1, n-1, if(gcd(j, n)==1, s=s+v[j]*v[n-j])); v[n]=s); for(i=1, m, print1(v[i], ", "))} \\ Klaus Brockhaus, Aug 09 2004
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Aug 08 2004
EXTENSIONS
STATUS
approved