The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A225504 a(n) = prime((a(n-1) + a(n-2)) / 2) for n>1, with a(0) = 3, a(1) = 5. 1

%I #14 Nov 15 2020 01:57:55

%S 3,5,7,13,29,73,233,883,4049,22013,140269,1036183,8771489,84270997,

%T 910550899,10977409981,146618640533,2155882170713,34701120973507,

%U 608312884303213,11560371513545909,237170393590520353,5232858369551752099,123736201926723358439

%N a(n) = prime((a(n-1) + a(n-2)) / 2) for n>1, with a(0) = 3, a(1) = 5.

%t nxt[{a_, b_}] := {b, Prime[(a + b)/2]}; Transpose[NestList[nxt,{3,5},17]][[1]] (* The program generates only the first 18 terms of the sequence; the 19th term is too large for Mathematica to generate it *) (* _Harvey P. Dale_, Apr 24 2016 *)

%o (C)

%o #include <stdio.h>

%o #define TOP (1ULL<<32)

%o typedef unsigned long long U64;

%o int main() {

%o U64 i, j, p = 2, prpr = 3, prev = 5;

%o unsigned int *primes = (unsigned int*)malloc(TOP/4);

%o char *c = (char*)malloc(TOP/2);

%o memset(c, 0, TOP/2);

%o for (primes[1] = 2, i = 3; i < TOP; i+=2)

%o if (c[i>>1]==0)

%o for (primes[p++]=i, j=i*i>>1; j<TOP/2; j+=i) c[j]=1;

%o for (printf("3, 5, "); (prev+prpr)/2<p; prpr=prev, prev=i)

%o i = primes[(prev+prpr)/2], printf("%llu, ", i);

%o }

%Y Cf. A000040, A107327.

%K nonn,hard,more

%O 0,1

%A _Alex Ratushnyak_, May 09 2013

%E a(15)-a(18) from _Max Alekseyev_, Jan 30 2014

%E a(19)-a(23) from _Jinyuan Wang_, Nov 14 2020

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 May 16 12:10 EDT 2024. Contains 372552 sequences. (Running on oeis4.)