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!)
A180130 Smallest k such that k*2^n is a sum of two successive primes. 9
5, 4, 2, 1, 7, 4, 2, 1, 9, 15, 8, 4, 2, 1, 25, 19, 11, 12, 6, 3, 10, 5, 35, 33, 52, 26, 13, 28, 14, 7, 15, 38, 19, 45, 47, 26, 13, 43, 84, 42, 21, 39, 35, 18, 9, 46, 23, 43, 49, 104, 52, 26, 13, 48, 24, 12, 6, 3, 21, 36, 18, 9, 15, 15, 9, 42, 21, 23, 67, 62, 31, 64, 32, 16, 8, 4, 2, 1, 45 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
If a(n) == 0 (mod 2), then a(n+1) = a(n)/2.
Records: 5, 7, 9, 15, 25, 35, 52, 84, 104, 146, 284, 330, 645, 660, 1020, 1677, 1701, 1747, 2247, 2991, ..., .
Corresponding primes are twin primes for n = 0, 1, 2, 3, 8, 17, 18, 19, 23, 43, 44, 64, 156, 189, 190, 210, 211, 212, 264, 265, 281, 282, 283, 388, 547, 725, 726, 727, ..., .
LINKS
MATHEMATICA
f[n_] := Block[{k = 1, j = 2^n/2}, While[ h = k*j; PrimeQ@h || NextPrime[h, -1] + NextPrime@h != 2 h, k++ ]; k]; Array[f, 79, 0]
PROG
(Python)
from sympy import isprime, nextprime, prevprime
def ok(n):
if n <= 5: return n == 5
return not isprime(n//2) and n == prevprime(n//2) + nextprime(n//2)
def a(n):
k, pow2 = 1, 2**n
while not ok(k*pow2): k += 1
return k
print([a(n) for n in range(79)]) # Michael S. Branicky, May 04 2021
CROSSREFS
Sequence in context: A349409 A109430 A085917 * A242600 A102593 A090462
KEYWORD
nonn
AUTHOR
STATUS
approved

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 March 29 07:27 EDT 2024. Contains 371265 sequences. (Running on oeis4.)