cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A356421 Positive integers k such that k + p is a power of 2, where p is the least prime greater than k.

Original entry on oeis.org

3, 15, 61, 255, 2043, 4093, 32765, 65535, 262141, 8388599, 33554397, 134217699, 268435453, 1073741821, 17179869159, 137438953463, 274877906937, 1099511627761, 8796093022179, 17592186044409, 70368744177649, 140737488355323, 281474976710635, 562949953421243
Offset: 1

Views

Author

Ali Sada, Aug 06 2022

Keywords

Comments

The corresponding sequence of primes is the intersection of A014210 and A356434 without the initial 2.

Examples

			3 + 5 = 8;
15 + 17 = 32;
61 + 67 = 128.
		

Crossrefs

Programs

  • Python
    from itertools import islice
    from sympy import nextprime
    def A356421_gen():
        m = 1
        while True:
            n = m+1<<1
            k = m
            p = nextprime(k)
            while k+p>n:
                k -=1
                p = nextprime(k)
            if k+p==n:
                yield k
            m = n-1
    A356421_list = list(islice(A356421_gen(),30)) # Chai Wah Wu, Sep 11 2022

Extensions

Terms from Tom Duff via Seqfan.
Showing 1-1 of 1 results.