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-4 of 4 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

A004680 Primes written in base 6.

Original entry on oeis.org

2, 3, 5, 11, 15, 21, 25, 31, 35, 45, 51, 101, 105, 111, 115, 125, 135, 141, 151, 155, 201, 211, 215, 225, 241, 245, 251, 255, 301, 305, 331, 335, 345, 351, 405, 411, 421, 431, 435, 445, 455, 501, 515, 521, 525, 531, 551, 1011, 1015, 1021, 1025, 1035
Offset: 1

Views

Author

Keywords

Crossrefs

Analogs in other bases: A004676 (base 2), A001363 (base 3), A004678 (base 4), A004679 (base 5), A004681 (base 7), A004682 (base 8), A004683 (base 9), A000040 (base 10), A004684 (base 11).
Cf. A007092.

Programs

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

Formula

a(n) = A007092(prime(n)). - Michel Marcus, Sep 03 2016

A359840 Numbers k that are the representation of primes in base 4 and in base 5.

Original entry on oeis.org

2, 3, 23, 131, 133, 221, 1211, 1231, 2023, 2111, 2113, 2311, 3013, 3211, 3233, 3323, 10031, 10033, 10121, 12011, 12121, 13223, 13331, 20131, 20203, 22111, 23233, 31313, 32033, 32303, 33133, 33331, 100123, 100211, 100231, 101003, 101333, 103333, 110021, 111211
Offset: 1

Views

Author

Bernard Schott, Jan 15 2023

Keywords

Comments

For a(1) = 2, 2_4 = 2_5 = 2_10 and for a(2) = 3, 3_4 = 3_5 = 3_10; otherwise, these two primes are distinct for n >= 3 (example).
The corresponding sequences of primes are A235474 (for base 4) and A235615 (for base 5).

Examples

			a(3) = 23 because 23_4 = 11_10 = A235474(3) and 23_5 = 13_10 = A235615(3) are primes.
a(9) = 2023 because 2023_4 = 139_10 = A235474(9) and 2023_5 = 263_10 = A235615(9) are primes.
		

Crossrefs

Intersection of A004678 and A004679.

Programs

  • Mathematica
    q[n_, b_] := Max[d = IntegerDigits[n]] < b && PrimeQ[FromDigits[d, b]]; Select[Range[200000], q[#, 4] && q[#, 5] &] (* Amiram Eldar, Jan 15 2023 *)
  • Python
    from sympy import isprime
    def ok(n): return max(s:=str(n)) < '4' and isprime(int(s, 4)) and isprime(int(s, 5))
    print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Jan 15 2023
    
  • Python
    from sympy import isprime
    from itertools import count, islice, product
    def agen(): yield from (int(s) for d in count(1) for f in "123" for r in product("0123", repeat=d-1) if isprime(int(s:=f+"".join(r), 4)) and isprime(int(s, 5)))
    print(list(islice(agen(), 40))) # Michael S. Branicky, Jan 15 2023

Formula

a(n) = A007090(A235474(n)); a(n) = A007091(A235615(n)).

Extensions

More terms from Amiram Eldar, Jan 15 2023
Showing 1-4 of 4 results.