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!)
A360494 a(n) is the least number that is prime when interpreted in bases 2 to n, but not n+1. 0
11, 10, 101111, 10010111, 110111111101001, 111110100001, 11000011101101111, 10011110011011110110110011, 110100000010101111110001010011001110001, 1000000010000011110100010001000101001010110111001, 10100001011000101000110101011011011101111110100101011 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
COMMENTS
Since a(n) must be a valid base-2 integer, it can only have digits 0 and 1.
LINKS
EXAMPLE
a(4) = 101111 because 101111 interpreted in base-2 is 47 (prime), base-3 is 283 (prime), base-4 is 1109 (prime), but base-5 is 3281 (not prime).
MAPLE
V:= Vector(9): count:= 0:
f:= proc(n) local L, P, x, b, i;
L:= convert(n, base, 10);
P:= add(L[i]*x^(i-1), i=1..nops(L));
for b from 2 do if not isprime(eval(P, x=b)) then return b-1 fi od
end proc:
for i from 1 while count < 8 do
X:= convert(i, binary);
v:= f(X);
if v >= 1 and v <= 9 and V[v] = 0 then
V[v]:= X;
count:= count+1;
fi
od:
convert(V[2..9], list);
PROG
(Python)
from sympy import isprime
from itertools import count, islice, product
def f(s): return next(b-1 for b in count(2) if not isprime(int(s, b)))
def agen():
n, adict = 2, {2:11, 3:10}
for d in count(3):
for b in product("01", repeat=d-2):
s = "1" + "".join(b) + "1"
v = f(s)
if v not in adict: adict[v] = int(s)
while n in adict: yield adict[n]; n += 1
print(list(islice(agen(), 7))) # Michael S. Branicky, Feb 09 2023
CROSSREFS
Cf. A086884.
Sequence in context: A164125 A212529 A004289 * A287710 A287782 A167262
KEYWORD
nonn,base
AUTHOR
Robert Israel, Feb 09 2023
EXTENSIONS
a(10)-a(12) using A086884 from Michael S. Branicky, Feb 09 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 May 2 07:19 EDT 2024. Contains 372178 sequences. (Running on oeis4.)