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!)
A072804 n-th prime prime(n) written in base (prime(n) (mod 4)). 4
10, 10, 11111, 21, 102, 1111111111111, 11111111111111111, 201, 212, 11111111111111111111111111111, 1011, 1111111111111111111111111111111111111, 11111111111111111111111111111111111111111, 1121, 1202, 11111111111111111111111111111111111111111111111111111, 2012 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
4k+1 primes are written in base 1, while 4k+3 primes are in base 3.
MATHEMATICA
Table[FromDigits@ If[#2 == 1, ConstantArray[1, #1], IntegerDigits[#1, #2]] & @@ {#, Mod[#, 4]} &@ Prime@ w, {w, 17}] (* Michael De Vlieger, Sep 04 2019 *)
PROG
(PARI) a(n) = {my(p=prime(n)); if ((p % 4) != 1, fromdigits(digits(p, p % 4), 10), fromdigits(vector(p, k, 1), 10)); } \\ Michel Marcus, Sep 04 2019
CROSSREFS
Sequence in context: A287627 A364773 A052983 * A079793 A086884 A284201
KEYWORD
base,nonn
AUTHOR
Labos Elemer, Jul 12 2002
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 24 00:30 EDT 2024. Contains 371917 sequences. (Running on oeis4.)