login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A115988
Powers of 3 which are the average of two primes p and nextprime(p).
4
9, 81, 387420489, 3486784401, 7509466514979724803946715958257547, 147808829414345923316083210206383297601
OFFSET
1,1
LINKS
EXAMPLE
Nextprime(387420479) = 387420499 and (387420479 + 387420499)/2 = 387420489 = 3^18, so 387420489 belongs to the sequence.
MATHEMATICA
Select[3^Range[100], #==Mean[{NextPrime[#], NextPrime[#, -1]}]&] (* Harvey P. Dale, Feb 11 2024 *)
PROG
(PARI) lista(nn) = for(k=1, nn, if(precprime(3^k-1)+nextprime(3^k+1)==2*3^k, print1(3^k, ", "))); \\ Jinyuan Wang, Feb 26 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Giovanni Resta, Feb 10 2006
STATUS
approved