editing
approved
editing
approved
DeleteDuplicates[DeleteCases[Flatten[FactorInteger[#][[;; , 1]]&/@RecurrenceTable[{a[0]==a[1]== a[2]==a[3]==1, a[n]==(a[n-1]a[n-3]+a[n-2]^2)/a[n-4]}, a, {n, 30}]], 1]] (* Harvey P. Dale, May 25 2024 *)
approved
editing
proposed
approved
editing
proposed
G. Everest et al., Primes generated by recurrence sequences, Amer. Math. Monthly, 114 (No. 5, 2007), 417-431.
G. Everest et al., <a href="http://www.jstor.org/stable/27642221">Primes generated by recurrence sequences</a>, Amer. Math. Monthly, 114 (No. 5, 2007), 417-431.
Corrected the order Order of some of the terms - _corrected by _T. D. Noe_, Nov 19 2013
approved
editing
editing
approved
Cf. A227199 (primes in this sequence).
approved
editing
editing
approved
a[0] = a[1] = a[2] = a[3] = 1; a[n_] := a[n] = (a[n - 1] a[n - 3] + a[n - 2]^2)/a[n - 4]; t = Array[a, 30]; t2 = {}; ps = {}; Do[f = Transpose[FactorInteger[t[[n]]]][[1]]; c = Complement[f, ps]; t2 = Join[t2, c]; ps = Union[ps, c], {n, 4, 30}]; t2 (* T. D. Noe, Nov 19 2013 *)
a[0] = a[1] = a[2] = a[3] = 1; a[n_] := a[n] = (a[n - 1] a[n - 3] + a[n - 2]^2)/a[n - 4]; t = Array[a, 30]; t2 = {}; ps = {}; Do[f =Transpose[FactorInteger[t[[n]]]][[1]]; c = Complement[f, ps]; t2 = Join[t2, c]; ps = Union[ps, c], {n, 4, 30}]; t2 (* T. D. Noe, Nov 19 2013 *)
Corrected the order of some of the terms - T. D. Noe, Nov 19 2013