The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A113878 a(1)=0; a(n+1) is the least number > a(n) such that Sum_{k=1..n+1} 2^a(k) is not composite. 3

%I #17 Jul 12 2021 02:04:18

%S 0,1,2,4,7,16,53,66,207,1752,5041,6310

%N a(1)=0; a(n+1) is the least number > a(n) such that Sum_{k=1..n+1} 2^a(k) is not composite.

%C Base-2 logarithms of A073924.

%C a(13) > 50000. - _Don Reble_

%t a[1] = 0; a[n_] := a[n] = Block[{k = a[n - 1] + 1, s = Plus @@ (2^Array[a, n - 1])}, While[ !PrimeQ[s + 2^k], k++ ]; k]; Array[a, 12] (* _Robert G. Wilson v_ *)

%o (Python)

%o from sympy import isprime

%o def afind(limit):

%o print("0, 1", end=", ")

%o s, pow2 = 2**0 + 2**1, 2**2

%o for m in range(2, limit+1):

%o if isprime(s+pow2): print(m, end=", "); s += pow2

%o pow2 *= 2

%o afind(2000) # _Michael S. Branicky_, Jul 11 2021

%Y Cf. A073924, A080355, A080567, A113824.

%K nonn,more

%O 1,3

%A _Artur Jasinski_, Jan 27 2006

%E Edited by _Don Reble_, Feb 17 2006

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 May 12 23:40 EDT 2024. Contains 372497 sequences. (Running on oeis4.)