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!)
A253549 Maximal prime written in decimal among the base-k representations of the n-th prime, read in base 16, for k=2,3,...,16. 1
2, 17, 257, 19, 19, 19, 65537, 37, 65809, 53, 307, 257, 53, 547, 563, 293, 101, 277, 4099, 577, 4129, 8737, 787, 137, 577, 257, 593, 4643, 4657, 773, 577, 821, 311, 313, 268501249, 74017, 74257, 8707, 359, 8753, 8963, 613, 9011, 12289, 285212929, 577, 135697 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
A base 16 variant of A236174.
LINKS
EXAMPLE
For n = 19, 67 is the 19th prime, and written in base 2, ..., is '1000011', '2111', '1003', '232', '151', '124', '103', '74', '67', '61', '57', '52', '4b', '47', '43'. Out of these, when read in as hexadecimal numbers, the first prime is 1003_16 which is 4099_10.
PROG
(Python)
from sympy import prime, isprime
def A253549(n):
....p = prime(n)
....for b in range(2, 17):
........x, y, z = p, 0, 1
........while x >= b:
............x, r = divmod(x, b)
............y += r*z
............z *= 16
........y += x*z
........if isprime(y):
............return y
CROSSREFS
Cf. A236174.
Sequence in context: A098622 A020561 A099702 * A002590 A029735 A291206
KEYWORD
nonn,base
AUTHOR
Chai Wah Wu, Jan 03 2015
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 March 18 22:56 EDT 2024. Contains 370952 sequences. (Running on oeis4.)