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!)
A374178 a(n) is the least prime p such that p and the next prime > p have exactly n common 1's in their binary expansion. 0
2, 5, 19, 29, 181, 359, 379, 983, 3821, 3581, 8179, 16111, 81901, 98297, 131059, 131063, 524269, 917471, 3145679, 4128763, 16744423, 16776187, 58720223, 117440381, 266330047, 468713467, 536870879, 1073741309, 2147483629, 4294967231, 8589410287, 33285865469 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
1
LINKS
EXAMPLE
a(n): 2 5 19 29 181
np 3 7 23 31 191
[1 0] [1 0 1] [1 0 0 1 1] [1 1 1 0 1] [1 0 1 1 0 1 0 1]
[1 1] [1 1 1] [1 0 1 1 1] [1 1 1 1 1] [1 0 1 1 1 1 1 1]
^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
n: 1 2 3 4 5
PROG
(Python)
from sympy import nextprime
def A374178(n):
p = 2
while (q:=nextprime(p)):
if (p&q).bit_count() == n:
return p
p = q # Chai Wah Wu, Jul 08 2024
CROSSREFS
Sequence in context: A184868 A077317 A092946 * A090700 A227632 A105889
KEYWORD
nonn,base,new
AUTHOR
Hugo Pfoertner, Jul 08 2024
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 July 15 11:27 EDT 2024. Contains 374332 sequences. (Running on oeis4.)