login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A083242
For n >= 3, a(n-3) + a(n-2) + a(n-1) + a(n) = prime(n); a(0) = 0, a(1) = 1, a(2) = 1.
2
0, 1, 1, 3, 2, 5, 3, 7, 4, 9, 9, 9, 10, 13, 11, 13, 16, 19, 13, 19, 20, 21, 19, 23, 26, 29, 23, 25, 30, 31, 27, 39, 34, 37, 29, 49, 36, 43, 35, 53, 42, 49, 37, 63, 44, 53, 39, 75, 56, 57, 41, 79, 62, 59, 51, 85, 68, 65, 53, 91, 72, 67, 63, 105, 76, 69, 67, 119
OFFSET
0,4
LINKS
Robert Israel, Plot of a(n) - prime(n)/4 for n = 1 .. 200000. n == 0, 1, 2, 3 (mod 4) in red, orange, green, blue respectively.
FORMULA
From Robert Israel, Aug 20 2024: (Start)
a(4*k) = Sum_{j=1..k} A001223(4*j-1).
a(4*k + 1) = 1 + Sum_{j=1..k} A001223(4*j).
a(4*k + 2) = Sum_{j=0..k} A001223(4*j+1).
a(4*k + 3) = 1 + Sum_{j=0..k} A001223(4*j+2). (End)
EXAMPLE
a(43) + a(44) + a(45) + a(46) = 63 + 44 + 53 + 39 = 199 = p[46]
MAPLE
f:= proc(n) option remember; ithprime(n) - procname(n-1) - procname(n-2)-procname(n-3) end proc:
f(0):= 0: f(1):= 1: f(2):= 1:
map(f, [$0..100]); # Robert Israel, Aug 20 2024
MATHEMATICA
f[x_] := Prime[x]-f[x-1]-f[x-2]-f[x-3] {f[0]=0, f[1]=1, f[2]=1}; Table[f[w], {w, 0, 20}]
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Labos Elemer, Apr 24 2003
STATUS
approved