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!)
A088149 Smallest prime which when rotated through all its binary places produces n primes, not counting any repeats. 2
2, 5, 11, 43, 167, 2143, 2423, 2687, 41903, 548543, 711679, 786431, 9010423, 10452461, 10065788911, 34762189783, 37974998491, 39115947389 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
It is probably not the case that this always produces the same bit cycle as A088148. - Franklin T. Adams-Watters, Mar 29 2014
LINKS
EXAMPLE
a(5) = 167 because 167 in base two is 10100111. This will produce eight possible new numbers; 01001111 = 79, 10011110 = 158, 00111101 = 61, 01111010 = 122, 11110100 = 244, 11101001 = 233, 11010011 = 211 and back to the beginning 10100111 = 167. Of those eight numbers (79, 158, 61, 122, 244, 233, 211 & 167) only five of them are primes. Notice that this is the same bit cycle as in A088148 but rotated differently.
MATHEMATICA
f[n_] := Count[ PrimeQ[ Union[ Table[ FromDigits[ RotateLeft[ IntegerDigits[n, 2], i], 2], {i, 1, Floor[ Log[2, n] + 1]}]]], True]; NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; a = Table[0, {100}]; k = 2; Do[c = f[k]; If[c < 101 && a[[c]] == 0, a[[c]] = k]; k = NextPrim[k], {n, 1, 2750000}]; a
PROG
(Python 3.10+)
from itertools import count
from sympy import isprime
def A088149(n):
if n == 1: return 2
for p in count((1<<n)-1, 2):
if p.bit_count() >= n and isprime(p):
m = p.bit_length()
l = 1<<m-1
k, cset, q = l-1, {p}, p
for _ in range(m-1):
p = bool(p&l)+((p&k)<<1)
if p not in cset and isprime(p):
cset.add(p)
if len(cset) == n:
return q # Chai Wah Wu, Jan 23 2023
CROSSREFS
Cf. A088148.
Sequence in context: A172297 A128231 A088148 * A153989 A160859 A106887
KEYWORD
nonn,base,more
AUTHOR
Robert G. Wilson v, Sep 19 2003
EXTENSIONS
Edited by Franklin T. Adams-Watters, Mar 29 2014
a(15) from Chai Wah Wu, Jan 23 2023
a(16) from Chai Wah Wu, Jan 24 2023
a(17)-a(18) from Chai Wah Wu, Jan 25 2023
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 April 25 12:15 EDT 2024. Contains 371969 sequences. (Running on oeis4.)