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.

Showing 1-5 of 5 results.

A004678 Primes written in base 4.

Original entry on oeis.org

2, 3, 11, 13, 23, 31, 101, 103, 113, 131, 133, 211, 221, 223, 233, 311, 323, 331, 1003, 1013, 1021, 1033, 1103, 1121, 1201, 1211, 1213, 1223, 1231, 1301, 1333, 2003, 2021, 2023, 2111, 2113, 2131, 2203, 2213, 2231, 2303, 2311, 2333, 3001, 3011, 3013
Offset: 1

Views

Author

Keywords

Crossrefs

Analogs in other bases: A004676 (base 2), A001363 (base 3), A004679 (base 5), A004680 (base 6), A004681 (base 7), A004682 (base 8), A004683 (base 9), A000040 (base 10), A004684 (base 11).
Cf. A072805 (primes of form 4k+3 written in base 3).

Programs

  • Magma
    [Seqint(Intseq(NthPrime(n), 4)): n in [1..60]]; // G. C. Greubel, Oct 12 2018
  • Mathematica
    FromDigits/@IntegerDigits[Prime[Range[50]],4] (* Vincenzo Librandi, Sep 03 2016 *)
  • PARI
    a(n)=subst(Pol(digits(prime(n),4)),'x,10) \\ Charles R Greathouse IV, Nov 06 2013
    

Formula

a(n) = A007090(A000040(n)). - Jonathan Vos Post, Sep 09 2006

Extensions

More terms from Vincenzo Librandi, Sep 03 2016

A001363 Primes in ternary.

Original entry on oeis.org

2, 10, 12, 21, 102, 111, 122, 201, 212, 1002, 1011, 1101, 1112, 1121, 1202, 1222, 2012, 2021, 2111, 2122, 2201, 2221, 10002, 10022, 10121, 10202, 10211, 10222, 11001, 11012, 11201, 11212, 12002, 12011, 12112, 12121, 12211, 20001, 20012, 20102, 20122, 20201
Offset: 1

Views

Author

Keywords

Comments

Primes written in base 3.

References

  • Archimedeans Problems Drive, Eureka, 23 (1960), 23.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Analogs in other bases: A004676 (base 2), A001363 (base 3), A004678 (base 4), A004679 (base 5), A004680 (base 6), A004681 (base 7), A004682 (base 8), A004683 (base 9), A000040 (base 10), A004684 (base 11).
Cf. A007089, A072805 (primes of form 4k+3 written in base 3).

Programs

  • Mathematica
    Table[FromDigits[IntegerDigits[Prime[n], 3]], {n, 50}] (* T. D. Noe, Jun 28 2012 *)
  • PARI
    a(n)=subst(Pol(digits(prime(n),3)),'x,10) \\ Charles R Greathouse IV, Nov 06 2013

Formula

a(n) = A007089(A000040(n)). - Jonathan Vos Post, Sep 09 2006

Extensions

More terms from James Sellers, May 01 2000

A072807 n-th prime prime(n) written in base (prime(n) (mod prime(n-1))).

Original entry on oeis.org

111, 101, 111, 23, 1101, 101, 10011, 113, 45, 11111, 101, 221, 101011, 233, 125, 135, 111101, 151, 1013, 1001001, 211, 1103, 225, 141, 1211, 1100111, 1223, 1101101, 1301, 91, 2003, 345, 10001011, 149, 10010111, 421, 431, 2213, 445, 455, 10110101
Offset: 2

Views

Author

Labos Elemer, Jul 12 2002

Keywords

Examples

			Eventually non-decimal digit symbols appear, as in case of 307=17d, in base 14 = 307 mod 293.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) local b, p, l;
          p:= ithprime(n); b:= irem(p, prevprime(p));
          if b=1 then l:= 1$p
        else l:= ""; while p>0 do l:= irem(p, b, 'p'), l od
          fi; parse(cat(l))
        end:
    seq(a(n), n=2..62);  # Alois P. Heinz, Sep 05 2019
  • Mathematica
    Table[BaseForm[Prime[w], Mod[Prime[w], Prime[w-1]]], {w, 2, 128}]
    Join[{111},FromDigits[IntegerDigits[#[[2]],Mod[#[[2]],#[[1]]]]]&/@ Partition[ Prime[Range[2,50]],2,1]] (* Harvey P. Dale, Jul 03 2021 *)
  • PARI
    a(n) = {my(p=prime(n), q=prime(n-1)); if ((p % q) != 1, d=digits(p, p % q); if (#select(x->(x>9), d), 0, fromdigits(d, 10)), fromdigits(vector(p, k, 1), 10));} \\ Michel Marcus, Sep 05 2019

Extensions

Name corrected by Michel Marcus, Sep 05 2019

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

Original entry on oeis.org

10, 10, 11111, 21, 102, 1111111111111, 11111111111111111, 201, 212, 11111111111111111111111111111, 1011, 1111111111111111111111111111111111111, 11111111111111111111111111111111111111111, 1121, 1202, 11111111111111111111111111111111111111111111111111111, 2012
Offset: 1

Views

Author

Labos Elemer, Jul 12 2002

Keywords

Examples

			4k+1 primes are written in base 1, while 4k+3 primes are in base 3.
		

Crossrefs

Programs

  • Mathematica
    Table[FromDigits@ If[#2 == 1, ConstantArray[1, #1], IntegerDigits[#1, #2]] & @@ {#, Mod[#, 4]} &@ Prime@ w, {w, 17}] (* Michael De Vlieger, Sep 04 2019 *)
  • 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

A072806 Primes of the form 6k+5 written in base 5.

Original entry on oeis.org

10, 21, 32, 43, 104, 131, 142, 203, 214, 241, 313, 324, 401, 412, 423, 1011, 1022, 1044, 1132, 1143, 1204, 1231, 1242, 1402, 1413, 1424, 2001, 2012, 2023, 2034, 2111, 2133, 2221, 2232, 2342, 2403, 2414, 3013, 3024, 3101, 3134, 3211, 3233, 3244, 3321
Offset: 1

Views

Author

Labos Elemer, Jul 12 2002

Keywords

Examples

			41 = 25 + 3*5 + 1 = 131_5.
		

Crossrefs

Programs

  • Mathematica
    Do[s=Prime[n]; If[Mod[s, 6]==5, Print[BaseForm[s, 5]]], {n, 1, 256}]
    FromDigits[IntegerDigits[#, 5]] & /@  Select[Table[6 n + 5, {n, 0, 100}], PrimeQ] (* Harvey P. Dale, Oct 05 2023 *)
  • PARI
    lista(nn) = for (n=0, nn, if (isprime(p=6*n+5), print1(fromdigits(digits(p, 5)), ", "))); \\ Michel Marcus, Jul 09 2018

Formula

a(n) = A007091(A007528(n)). - Michel Marcus, Jul 09 2018
Showing 1-5 of 5 results.