A228774
Numbers n such that the digits of n, once written in base 16, are only the hexadecimal digits A to F.
Original entry on oeis.org
10, 11, 12, 13, 14, 15, 170, 171, 172, 173, 174, 175, 186, 187, 188, 189, 190, 191, 202, 203, 204, 205, 206, 207, 218, 219, 220, 221, 222, 223, 234, 235, 236, 237, 238, 239, 250, 251, 252, 253, 254, 255, 2730, 2731, 2732, 2733, 2734, 2735, 2746, 2747, 2748
Offset: 0
-
FromDigits[#, 16]& /@ Flatten[Table[Tuples[Range[10, 15], k], {k, 1, 3}], 1]
Select[Range[3000], Min[IntegerDigits[#, 16]] > 9 &] (* T. D. Noe, Sep 04 2013 *)
-
a(n)=my(d);while(n>=6^(d+1),n-=6^d++);sum(i=0,d,((n\6^i)%6+10)<<(4*i)) \\ Charles R Greathouse IV, Sep 04 2013
A238090
Primes whose hexadecimal representation contains only consonants.
Original entry on oeis.org
11, 13, 191, 223, 251, 3019, 3023, 3037, 3067, 3259, 3323, 3517, 3533, 3547, 3581, 3583, 4027, 4091, 4093, 48079, 48091, 48383, 48571, 48589, 49103, 49117, 52189, 52223, 52667, 52733, 53197, 56267, 56269, 56509, 56527, 56543, 56767, 56779, 56783, 56827, 64717, 64763, 769019, 769231, 769243, 769247, 769469, 769487
Offset: 1
The first few terms and their hexadecimal representations (written with least significant "digit" on the left) are:
11, [B]
13, [D]
191, [F, B]
223, [F, D]
251, [B, F]
3019, [B, C, B]
3023, [F, C, B]
3037, [D, D, B]
3067, [B, F, B]
3259, [B, B, C]
3323, [B, F, C]
...
-
from sympy import isprime, primerange
def ok(p): return set(hex(p)[2:]) <= set("bcdf")
def aupton(limit): return [p for p in primerange(1, limit+1) if ok(p)]
print(aupton(769487)) # Michael S. Branicky, Nov 13 2021
-
# faster version for going to large numbers
from sympy import isprime
from itertools import product
def auptohd(m): # terms up to m hex digits
return [t for t in (int("".join(p), 16) for d in range(1, m+1) for p in product("bcdf", repeat=d)) if isprime(t)]
print(auptohd(7)) # Michael S. Branicky, Nov 13 2021
Showing 1-2 of 2 results.
Comments