|
MATHEMATICA
|
a={0, 0, 0, 0, 0, 0, 0, 0, 0, 1}; step=10; lst={}; For[n=step, n<=1000, n++, sum=Plus@@a; If[PrimeQ[sum], AppendTo[lst, n]]; a=RotateLeft[a]; a[[step]]=sum]; lst
Flatten[Position[LinearRecurrence[{1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, 69000], _?PrimeQ]]-1 (* Harvey P. Dale, Dec 08 2017 *)
|