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

%I #46 May 19 2024 02:33:22

%S -1,0,0,0,0,4,6,12,24,42,68,122,208,336,552,904,1464,2378,3848,6232,

%T 10090,16338,26446,42802,69252,112072,181332,293412,474762,768190,

%U 1242960,2011162,3254150,5265324,8519478,13784866,22304378,36089262,58393658,94482964,152876664

%N a(n) = A055498(n) - A055500(n).

%C 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...

%p b:= proc(n, t) option remember; `if`(n<3, n+1, (h-> `if`(t=1,

%p prevprime(h), nextprime(h)))(t+b(n-1, t)+b(n-2, t)))

%p end:

%p a:= n-> b(n,-1)-b(n,1):

%p seq(a(n), n=1..50); # _Alois P. Heinz_, May 12 2023

%t 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]]];

%t a[n_] := If[n == 0, -1, b[n-1, -1] - b[n-1, 1]];

%t Table[a[n], {n, 0, 50}] (* _Jean-François Alcover_, May 19 2024, after _Alois P. Heinz_ *)

%Y Cf. A055500, A055498, A001622.

%K sign

%O 0,6

%A _Philip Baciaz_, May 07 2023

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 23:24 EDT 2024. Contains 375396 sequences. (Running on oeis4.)