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!)
A082094 A 2nd-order recursion: a(1)=a(2)=1; a(n) = prime(a(n-1)) + primepi(a(n-2)) = A000040(a(n-1)) + A000720(a(n-2)). 3

%I #20 Sep 08 2022 08:45:09

%S 1,1,2,3,6,15,50,235,1498,12592,135431,1806803,29135476,555971158,

%T 12336554787,313733168860,9034347750986,291579097035392,

%U 10455240487002922,413371595329570610

%N A 2nd-order recursion: a(1)=a(2)=1; a(n) = prime(a(n-1)) + primepi(a(n-2)) = A000040(a(n-1)) + A000720(a(n-2)).

%t a[n_]:= a[n]= If[n<4, Fibonacci[n], Prime[a[n-1]] + PrimePi[a[n-2]]]; Table[a[n], {n,1,17}] (* modified by _G. C. Greubel_, Aug 31 2019 *)

%o (Magma) a:= func< n | n lt 4 select Fibonacci(n) else NthPrime(Self(n-1)) + #PrimesUpTo(Self(n-2)) >;

%o [a(n): n in [1..14]]; // _G. C. Greubel_, Aug 31 2019

%Y Cf. A069103, A082095.

%K nonn,more

%O 1,3

%A _Labos Elemer_, Apr 11 2003

%E a(17) from _G. C. Greubel_, Aug 31 2019

%E a(18)-a(20) from _Chai Wah Wu_, Sep 18 2019

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