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!)
A226115 Least positive integer not of the form p_m - p_{m-1} + ... +(-1)^(m-k)*p_k with 0 < k < m <= n, where p_j denotes the j-th prime. 2

%I #13 May 27 2013 21:02:42

%S 1,2,3,6,7,10,11,14,18,18,20,20,24,24,28,28,34,34,40,40,42,42,46,46,

%T 46,54,56,56,58,58,60,64,78,78,80,80,94,94,98,98,104,104,106,106,106,

%U 106,118,118,118,118,122,122,140,140,146,146,152,152,158,158

%N Least positive integer not of the form p_m - p_{m-1} + ... +(-1)^(m-k)*p_k with 0 < k < m <= n, where p_j denotes the j-th prime.

%C Conjecture: sqrt(2*a(n)) > sqrt(p_n)-0.7 for all n > 0, and a(n) is even for any n > 7.

%C Note that f(n) = sqrt(2*a(n))-sqrt(p_n)+0.7 is approximately equal to 0.000864 at n = 651. It seems that f(n) > 0.1 for any other value of n.

%H Zhi-Wei Sun, <a href="/A226115/b226115.txt">Table of n, a(n) for n = 1..10000</a>

%H Zhi-Wei Sun, <a href="http://dx.doi.org/10.1016/j.jnt.2013.02.003">On functions taking only prime values</a>, J. Number Theory 133(2013), 2794-2812.

%e a(4) = 6, since 2,3,5,7 are the initial four primes, and 1=3-2, 2=5-3, 3=7-5+3-2, 4=5-3+2, 5=7-5+3.

%t s[0_]:=0

%t s[n_]:=s[n]=Prime[n]-s[n-1]

%t R[j_]:=R[j]=Union[Table[s[j]-(-1)^(j-i)*s[i],{i,0,j-2}]]

%t t=1

%t Do[Do[Do[If[MemberQ[R[j],m]==True,Goto[aa]],{j,PrimePi[m]+1,n}];Print[n," ",m];t=m;Goto[bb];

%t Label[aa];Continue,{m,t,Prime[n]-1}];Print[n," ",counterexample];Label[bb],{n,1,100}]

%Y Cf. A000040, A225889, A222579, A222580.

%K nonn

%O 1,2

%A _Zhi-Wei Sun_, May 27 2013

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 April 25 06:14 EDT 2024. Contains 371964 sequences. (Running on oeis4.)