cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A072804 n-th prime prime(n) written in base (prime(n) (mod 4)).

This page as a plain text file.
%I A072804 #11 Sep 05 2019 02:34:44
%S A072804 10,10,11111,21,102,1111111111111,11111111111111111,201,212,
%T A072804 11111111111111111111111111111,1011,
%U A072804 1111111111111111111111111111111111111,11111111111111111111111111111111111111111,1121,1202,11111111111111111111111111111111111111111111111111111,2012
%N A072804 n-th prime prime(n) written in base (prime(n) (mod 4)).
%H A072804 Michael De Vlieger, <a href="/A072804/b072804.txt">Table of n, a(n) for n = 1..168</a>
%e A072804 4k+1 primes are written in base 1, while 4k+3 primes are in base 3.
%t A072804 Table[FromDigits@ If[#2 == 1, ConstantArray[1, #1], IntegerDigits[#1, #2]] & @@ {#, Mod[#, 4]} &@ Prime@ w, {w, 17}] (* _Michael De Vlieger_, Sep 04 2019 *)
%o A072804 (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
%Y A072804 Cf. A008713, A072803, A072805, A072806, A072807.
%K A072804 base,nonn
%O A072804 1,1
%A A072804 _Labos Elemer_, Jul 12 2002