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
3, 5, 7, 13, 29, 73, 233, 883, 4049, 22013, 140269, 1036183, 8771489, 84270997, 910550899, 10977409981, 146618640533, 2155882170713, 34701120973507, 608312884303213, 11560371513545909, 237170393590520353, 5232858369551752099, 123736201926723358439 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
MATHEMATICA
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 *)
PROG
(C)
#include <stdio.h>
#define TOP (1ULL<<32)
typedef unsigned long long U64;
int main() {
U64 i, j, p = 2, prpr = 3, prev = 5;
unsigned int *primes = (unsigned int*)malloc(TOP/4);
char *c = (char*)malloc(TOP/2);
memset(c, 0, TOP/2);
for (primes[1] = 2, i = 3; i < TOP; i+=2)
if (c[i>>1]==0)
for (primes[p++]=i, j=i*i>>1; j<TOP/2; j+=i) c[j]=1;
for (printf("3, 5, "); (prev+prpr)/2<p; prpr=prev, prev=i)
i = primes[(prev+prpr)/2], printf("%llu, ", i);
}
CROSSREFS
Sequence in context: A087383 A038928 A359436 * A089740 A191473 A290482
KEYWORD
nonn,hard,more
AUTHOR
Alex Ratushnyak, May 09 2013
EXTENSIONS
a(15)-a(18) from Max Alekseyev, Jan 30 2014
a(19)-a(23) from Jinyuan Wang, Nov 14 2020
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 March 28 16:28 EDT 2024. Contains 371254 sequences. (Running on oeis4.)