OFFSET
1,4
LINKS
Mohammed Bouras, A new sequence of prime numbers, Romanian Math. Mag. (15 August 2022). See Table 1 p. 1.
FORMULA
MATHEMATICA
a[1]=a[2]=-1; a[n_]:=a[n]=(n-1)a[n-1]-n a[n-2]; Array[a, 22] (* Stefano Spezia, Aug 23 2022 *)
PROG
(PARI) a(n) = if(n<=2, -1, 1/2*((n-1)*sum(k=0, n-3, k!) + n*(n-2)*sum(k=0, n-4, k!))) \\ Jianing Song, Oct 15 2022, following the formula above
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Mohammed Bouras, Aug 22 2022
STATUS
approved