|
|
A083237
|
|
First order recursion: a(0)=5; a(n)=prime(n)-a(n-1).
|
|
3
|
|
|
5, -3, 6, -1, 8, 3, 10, 7, 12, 11, 18, 13, 24, 17, 26, 21, 32, 27, 34, 33, 38, 35, 44, 39, 50, 47, 54, 49, 58, 51, 62, 65, 66, 71, 68, 81, 70, 87, 76, 91, 82, 97, 84, 107, 86, 111, 88, 123, 100, 127, 102, 131, 108, 133, 118, 139, 124, 145, 126, 151, 130, 153, 140, 167, 144, 169, 148, 183, 154, 193, 156, 197, 162, 205, 168, 211, 172
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
Same function as in A083236 but initial value = 5.
|
|
LINKS
|
|
|
FORMULA
|
Same implicit relationship: a(n-1)+a(n)=prime(n), the n-th prime;
It follows also that A001223(n)=a(n+1)-a(n-1).
|
|
MAPLE
|
option remember ;
if n = 0 then
5 ;
else
ithprime(n)-procname(n-1) ;
end if;
end proc:
|
|
MATHEMATICA
|
RecursionLimit$=10000; f[x_] := Prime[x]-f[x-1]; f[0]=5; Table[f[w], {w, 1, 100}]
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|