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!)
A085042 Smallest multiple of the n-th prime such that every partial sum is a prime, or 0 if no such number exists. 2

%I #18 Dec 25 2016 21:15:15

%S 2,3,0,14,22,26,34,38,138,232,62,148,164,516,94,318,1298,610,134,568,

%T 146,2212,1494,356,1552,1212,618,642,2616,1808,762,3144,1096,1668,

%U 1490,604,942,326,1002,2076,2506,1448,2292,1158,7092,4776,2532,892,908,2290

%N Smallest multiple of the n-th prime such that every partial sum is a prime, or 0 if no such number exists.

%C a(3) = 0, as 2+3 = 5 and 5 + k*5 cannot be a prime unless k = 0. Every term after the third is obviously even.

%C From _Robert Israel_, Dec 25 2016: (Start)

%C a(n) = 0 if and only if Sum_{j<n} a(j) is divisible by prime(n). The "only if" is by Dirichlet's theorem on primes in arithmetic progressions. There are no values of 0 for 3 < n < 5*10^5, but it is conceivable that such values exist. Indeed, heuristically Sum_{j<n} a(j) has probability 1/prime(n) of being divisible by prime(n), and Sum_n 1/prime(n) diverges, so we should expect infinitely many such values (although they will be very rare). (End)

%H Robert Israel, <a href="/A085042/b085042.txt">Table of n, a(n) for n = 1..10000</a>

%p A:= 2,3:

%p s:= 5:

%p for n from 3 to 100 do

%p p:= 2*ithprime(n);

%p if igcd(p,s) > 1 then

%p A:= A,0;

%p else

%p for j from 1 do if isprime(s+j*p) then

%p A:= A, j*p;

%p s:= s+j*p;

%p break

%p fi od;

%p fi

%p od:

%p A; # _Robert Israel_, Dec 25 2016

%t f[s_List] := Block[{k = 2, p = Prime[1 + Length@ s], t = Plus @@ s}, While[ !PrimeQ[k*p + t], k += 2]; Append[s, p*k]]; Nest[f, {2, 3, 0}, 50] (* _Robert G. Wilson v_, Dec 25 2016 *)

%Y Cf. A085043.

%K nonn

%O 1,1

%A _Amarnath Murthy_ and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 19 2003

%E More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Jun 25 2003

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 23 03:30 EDT 2024. Contains 371906 sequences. (Running on oeis4.)