OFFSET
1,1
MATHEMATICA
a[1] = 3; a[n_] := a[n] = FactorInteger[ Product[a[k], {k, n - 1}] + If[OddQ@ n, 1, -1]][[1, 1]]; Array[a, {16}] (* Michael De Vlieger, Nov 30 2015 *)
PROG
(PARI) spf(n)=my(f=factor(n)[1, 1]); f
first(m)=my(v=vector(m)); v[1]=3; for(i=2, m,; v[i]=spf((-1)^(i+1)+prod(j=1, i-1, v[j]))); v
CROSSREFS
KEYWORD
nonn
AUTHOR
Anders Hellström, Nov 30 2015
EXTENSIONS
a(20)-a(42) from Hans Havermann, Dec 06 2015
STATUS
approved