login
A083241
a(n) + a(n-1) + a(n-2) + a(n-3) = prime(n), n>2, a(0)=a(1)=a(2)=0;.
1
0, 0, 0, 5, 2, 4, 2, 9, 4, 8, 8, 11, 10, 12, 10, 15, 16, 18, 12, 21, 20, 20, 18, 25, 26, 28, 22, 27, 30, 30, 26, 41, 34, 36, 28, 51, 36, 42, 34, 55, 42, 48, 36, 65, 44, 52, 38, 77, 56, 56, 40, 81, 62, 58, 50, 87, 68, 64, 52, 93, 72, 66
OFFSET
0,4
LINKS
FORMULA
A001221(a(n) - A000720(a(n))) = 1.
a(n) - A000720(a(n)) is in A025475.
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
Sequence in context: A157121 A372286 A368690 * A111145 A249920 A021660
KEYWORD
nonn
AUTHOR
Labos Elemer, Apr 24 2003
STATUS
approved