OFFSET
0,1
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
MAPLE
a:= proc(n) option remember; local b, p;
b:= add(a(n-i)*binomial(n, i)*(-1)^i, i=1..n);
p:= nextprime(abs(b));
do if isprime(p+b) then break fi ;
p:= nextprime(p)
od; p
end: a(0):=2:
seq(a(n), n=0..32); # Alois P. Heinz, Jun 06 2025
MATHEMATICA
a[n_] := a[n] = Module[{b, p}, b = Sum[a[n-i]*Binomial[n, i]*(-1)^i, {i, 1, n}]; p = NextPrime[Abs[b]]; While[True, If[PrimeQ[p+b], Break[]]; p = NextPrime[p]]; p];
a[0] = 2;
Table[a[n], {n, 0, 32}] (* Jean-François Alcover, Aug 28 2025, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alexander R. Povolotsky, Jun 06 2025
EXTENSIONS
More terms from Alois P. Heinz, Jun 06 2025
STATUS
approved
