login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A362883 a(n) = A055498(n) - A055500(n). 0
-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):
seq(a(n), n=1..50); # Alois P. Heinz, May 12 2023
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]];
Table[a[n], {n, 0, 50}] (* Jean-François Alcover, May 19 2024, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A308471 A357809 A162688 * A352634 A070232 A037100
KEYWORD
sign
AUTHOR
Philip Baciaz, May 07 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 23 20:55 EDT 2024. Contains 375396 sequences. (Running on oeis4.)