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”).

a(n) = maximal m such that Sum_{k=n..m} prime(k) <= prime(n)*prime(m).
2

%I #18 Aug 09 2019 01:57:19

%S 3,6,11,16,25,28,38,43,51,64,70,83,90,95,105,117,131,134,148,158,161,

%T 174,182,196,212,225,228,235,238,248,277,287,302,305,325,332,343,355,

%U 364,380,391,394,414,419,428,433,463,486,495,498,506,519,524,544,556

%N a(n) = maximal m such that Sum_{k=n..m} prime(k) <= prime(n)*prime(m).

%H Robert Israel, <a href="/A075703/b075703.txt">Table of n, a(n) for n = 1..3000</a>

%H Felice Russo, <a href="http://fs.unm.edu/FriendlyPrimePairs.pdf">On a problem concerning the Smarandache friendly prime pairs</a>.

%p Primes:= [seq(ithprime(i),i=1..1000)]:

%p S:= ListTools:-PartialSums(Primes):

%p f:= proc(n) local m, t;

%p for m from n do if S[m] > S[n-1] + Primes[n]*Primes[m] then return m-1 fi od

%p end proc:

%p f(1):= 3:

%p map(f, [$1..100]); # _Robert Israel_, Aug 08 2019

%t f[n_] := Block[{k = n, s = 0, a = Prime[n]}, While[b = Prime[k]; s = s + b; a*b >= s, k++ ]; k--; k]; Table[ f[n], {n, 1, 55}]

%Y Cf. A074968.

%K nonn,easy

%O 1,1

%A _Roger L. Bagula_, Oct 02 2002

%E Edited by _N. J. A. Sloane_ and _Robert G. Wilson v_, Oct 04 2002

%E Corrected by _Robert Israel_, Aug 08 2019