|
|
|
|
-1, 0, 0, 0, 0, 4, 6, 12, 24, 42, 68, 122, 208, 336, 552, 904, 1464, 2378, 3848, 6232, 10090, 16338, 26446, 42802, 69252, 112072, 181332, 293412, 474762, 768190, 1242960, 2011162, 3254150, 5265324, 8519478, 13784866, 22304378, 36089262, 58393658, 94482964, 152876664
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,6
|
|
COMMENTS
|
After the initial zeros, {a(n)} seems approximately linear on a log scale (not a surprise with the prime number theorem in mind?), a(n-1)/a(n) seems to converge to the golden ratio (A001622), and 1/a(5) + 1/a(6) + ... + 1/a(n) seems to converge to 0.60086367622...
|
|
LINKS
|
|
|
MAPLE
|
b:= proc(n, t) option remember; `if`(n<3, n+1, (h-> `if`(t=1,
prevprime(h), nextprime(h)))(t+b(n-1, t)+b(n-2, t)))
end:
a:= n-> b(n, -1)-b(n, 1):
|
|
MATHEMATICA
|
b[n_, t_] := b[n, t] = If[n < 3, n+1, Function[h, If[t == 1, NextPrime[h, -1], NextPrime[h]]][t + b[n-1, t] + b[n-2, t]]];
a[n_] := If[n == 0, -1, b[n-1, -1] - b[n-1, 1]];
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|