OFFSET
0,4
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
EXAMPLE
a(3)+a(4)+a(5)+a(6) = 5+2+4+2 = prime(6) = 13.
MAPLE
A083241 := proc(n)
option remember;
if n <= 2 then
0;
else
ithprime(n) - add(procname(n-i), i=1..3) ;
end if;
end proc: # R. J. Mathar, Jul 08 2012
MATHEMATICA
Do[s=Prime[n]-n; If[Equal[Length[FactorInteger[s]], 1]&&!PrimeQ[s], Print[Prime[n]]], {n, 1, 100000}]
RecurrenceTable[{a[n] + a[n - 1] + a[n - 2] + a[n - 3] == Prime[n], a[0] == 0, a[1] == 0, a[2] == 0}, a, {n, 0, 50}] (* G. C. Greubel, May 14 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Apr 24 2003
STATUS
approved