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-6 of 6 results.

A235474 Primes whose base-4 representation is also the base-5 representation of a prime.

Original entry on oeis.org

2, 3, 11, 29, 31, 41, 101, 109, 139, 149, 151, 181, 199, 229, 239, 251, 269, 271, 281, 389, 409, 491, 509, 541, 547, 661, 751, 887, 911, 947, 991, 1021, 1051, 1061, 1069, 1091, 1151, 1279, 1289, 1381, 1409, 1471, 1549, 1709, 1759, 1801, 1999
Offset: 1

Views

Author

M. F. Hasler, Jan 12 2014

Keywords

Comments

This sequence is part of a two-dimensional array of sequences, given in the LINK, based on this same idea for any two different bases b, c > 1. Sequence A235265 and A235266 are the most elementary ones in this list. Sequences A089971, A089981 and A090707 through A090721, and sequences A065720 - A065727, follow the same idea with one base equal to 10.
For further motivation and cross-references, see sequence A235265 which is the main entry for this whole family of sequences.

Examples

			11 = 23_4 and 23_5 = 13 are both prime, so 11 is a term.
		

Crossrefs

Cf. A235266, A235473, A152079, A235475 - A235479, A065720A036952, A065721 - A065727, A235394, A235395, A089971A020449, A089981, A090707 - A091924, A235461 - A235482. See the LINK for further cross-references.

Programs

  • Mathematica
    Select[Prime[Range[400]],PrimeQ[FromDigits[IntegerDigits[#,4],5]]&] (* Harvey P. Dale, Dec 31 2017 *)
  • PARI
    is(p,b=5,c=4)=isprime(vector(#d=digits(p,c),i,b^(#d-i))*d~)&&isprime(p) \\ Note: This code is only valid for b > c.

A231474 Primes whose base-3 representation is also the base-5 representation of a prime.

Original entry on oeis.org

2, 3, 5, 7, 13, 17, 29, 31, 37, 41, 59, 67, 79, 97, 101, 109, 113, 137, 139, 149, 151, 173, 181, 193, 223, 229, 251, 269, 271, 293, 311, 331, 353, 367, 373, 379, 383, 389, 397, 401, 457, 467, 491, 503, 617, 631, 641, 647, 653, 673, 701, 773, 787, 797, 809, 829, 853, 857, 911, 929, 953, 977
Offset: 1

Views

Author

M. F. Hasler, Jan 12 2014

Keywords

Comments

This sequence is part of a two-dimensional array of sequences, given in the LINK, based on this same idea for any two different bases b, c > 1. Sequence A235265 and A235266 are the most elementary ones in this list. Sequences A089971, A089981 and A090707 through A090721, and sequences A065720 - A065727, follow the same idea with one base equal to 10.

Examples

			7 = 21_3 and 21_5 = 11 are both prime, so 7 is a term.
		

Crossrefs

Cf. A235265, A235266, A235473, A152079, A235461 - A235482, A065720A036952, A065721 - A065727, A235394, A235395, A089971A020449, A089981, A090707 - A091924. See the LINK for further cross-references.

Programs

  • Mathematica
    Select[Prime@ Range@ 500, PrimeQ@ FromDigits[ IntegerDigits[#, 3], 5] &] (* Giovanni Resta, Sep 12 2019 *)
  • PARI
    is(p,b=5,c=3)=isprime(vector(#d=digits(p,c),i,b^(#d-i))*d~)&&isprime(p) \\ Note: This code is only valid for b > c.

A235481 Primes whose base-4 representation is also the base-9 representation of a prime.

Original entry on oeis.org

2, 3, 29, 41, 61, 89, 109, 149, 157, 281, 293, 313, 401, 421, 433, 593, 701, 709, 1013, 1049, 1061, 1069, 1097, 1117, 1277, 1289, 1301, 1553, 1601, 1709, 2069, 2137, 2237, 2309, 2377, 2437, 2477, 2689, 2729, 2749, 2797, 2957, 2969, 3001, 3061, 3109, 3169, 3329, 3361, 3389, 3457, 3533, 3701
Offset: 1

Views

Author

M. F. Hasler, Jan 12 2014

Keywords

Comments

This sequence is part of a two-dimensional array of sequences, given in the LINK, based on this same idea for any two different bases b, c > 1. Sequence A235265 and A235266 are the most elementary ones in this list. Sequences A089971, A089981 and A090707 through A090721, and sequences A065720 - A065727, follow the same idea with one base equal to 10.
Appears to be a subsequence of A197636.

Examples

			29 = 131_4 and 131_9 = 109 are both prime, so 29 is a term.
		

Crossrefs

Cf. A235473 - A235480, A065720A036952, A065721 - A065727, A089971A020449, A089981, A090707 - A091924, A235394, A235395, A235461 - A235482. See the LINK for further cross-references.

Programs

  • Mathematica
    Select[Prime@Range@600, PrimeQ[FromDigits[IntegerDigits[#, 4], 9]] &] (* Giovanni Resta, Sep 12 2019 *)
  • PARI
    is(p,b=9,c=4)=isprime(vector(#d=digits(p,c),i,b^(#d-i))*d~)&&isprime(p) \\ Note: Code only valid for b > c.

A235480 Primes whose base-3 representation is also the base-9 representation of a prime.

Original entry on oeis.org

2, 5, 7, 11, 17, 19, 23, 31, 37, 41, 43, 53, 67, 71, 73, 83, 89, 97, 103, 149, 157, 199, 239, 251, 257, 271, 277, 293, 307, 313, 331, 337, 359, 383, 397, 421, 431, 433, 499, 541, 557, 571, 587, 599, 601, 613, 631, 653, 659, 661, 683, 691, 709, 727, 751, 769, 823, 887, 911, 983, 1009, 1021, 1031, 1049, 1051, 1063, 1129, 1163, 1217
Offset: 1

Views

Author

M. F. Hasler, Jan 12 2014

Keywords

Comments

This sequence is part of a two-dimensional array of sequences, given in the LINK, based on this same idea for any two different bases b, c > 1. Sequence A235265 and A235266 are the most elementary ones in this list. Sequences A089971, A089981 and A090707 through A090721, and sequences A065720 - A065727, follow the same idea with one base equal to 10.
Appears to be a subsequence of A015919, A045344, A052085, A064555 and A143578.

Examples

			5 = 12_3 and 12_9 = 11 are both prime, so 5 is a term.
		

Crossrefs

Cf. A235265, A235473 - A235479, A065720A036952, A065721 - A065727, A089971A020449, A089981, A090707 - A091924, A235394, A235395, A235461 - A235482. See the LINK for further cross-references.

Programs

  • Mathematica
    Select[Prime@ Range@ 500, PrimeQ@ FromDigits[ IntegerDigits[#, 3], 9] &] (* Giovanni Resta, Sep 12 2019 *)
  • PARI
    is(p,b=9,c=3)=isprime(vector(#d=digits(p,c),i,b^(#d-i))*d~)&&isprime(p) \\ Note: Code only valid for b > c.

A340290 Numbers k that are the representation of primes in base 3 and in base 4.

Original entry on oeis.org

2, 1121, 2021, 2111, 10121, 10211, 11201, 12011, 12121, 12211, 21101, 21211, 22111, 101021, 101111, 110021, 110111, 110221, 111211, 112001, 121001, 121021, 122011, 200111, 201101, 210011, 211021, 211111, 222221, 1000211, 1002011, 1010111, 1011121, 1012201, 1021001
Offset: 1

Views

Author

Bernard Schott, Jan 03 2021

Keywords

Comments

Except for a(1) = 2, which is the only even prime, all terms end with 1.
The corresponding sequences of primes are A235473 (for base 3) and A235467 (for base 4) (see examples).
As 1381 = 1220011_3 = 111211_4, prime 1381 occurs twice and is the next such prime after 2 (see example), which has a representation in base 3 and a representation in base 4 that are both terms of this sequence.

Examples

			a(1) = 2 and 2_3 = 2_4 = 2_10.
a(2) = 1121 because 1121_3 = 43_10 and 1121_4 = 89_10 are primes.
a(3) = 2021 because 2021_3 = 61_10 and 2021_4 = 137_10 are primes.
		

Crossrefs

Intersection of A001363 and A004678.
Cf. A089981 (bases 3 and 10).

Programs

  • Mathematica
    f[n_] := Module[{d = IntegerDigits[n, 3]}, If[PrimeQ[FromDigits[d, 4]], FromDigits[d, 10], 0]]; seq = {}; Do[If[PrimeQ[n], m = f[n]; If[m > 0, AppendTo[seq, m]]], {n, 2, 1000}]; seq (* Amiram Eldar, Jan 03 2021 *)
    FromDigits[#]&/@Select[Tuples[{0,1,2},7],PrimeQ[FromDigits[#,4]] && PrimeQ[ FromDigits[ #,3]]&] (* Harvey P. Dale, Dec 15 2021 *)
  • PARI
    f(n, b) = fromdigits(digits(n, b));
    my(vp=primes(700)); setintersect(apply(x->f(x,3), vp), apply(x->f(x,4), vp)) \\ Michel Marcus, Jan 04 2021
    
  • PARI
    forprime(p=2, 10^3, my(t=digits(p,3)); if( isprime( fromdigits(t,4)), print1(fromdigits(t,10),", "))) \\ Joerg Arndt, Jan 04 2021
    
  • Python
    from sympy import prime, isprime
    from sympy.ntheory.factor_ import digits
    A340290_list = [int(s) for s in (''.join(str(d) for d in digits(prime(i),3)[1:]) for i in range(1,1000)) if isprime(int(s,4))] # Chai Wah Wu, Jan 09 2021

Extensions

More terms from Amiram Eldar, Jan 03 2021

A231476 Primes whose base-3 representation is also the base-6 representation of a prime.

Original entry on oeis.org

2, 7, 13, 19, 31, 151, 163, 211, 223, 229, 241, 271, 349, 367, 439, 601, 607, 613, 631, 643, 673, 727, 733, 859, 907, 937, 997, 1021, 1033, 1039, 1051, 1093, 1117, 1123, 1129, 1153, 1321, 1327, 1399, 1423, 1429, 1609, 1627, 1657, 1669, 1741, 1747, 1759, 1777, 1789, 1831, 1867, 1933, 1951, 1993, 1999
Offset: 1

Views

Author

M. F. Hasler, Jan 12 2014

Keywords

Comments

This sequence is part of a two-dimensional array of sequences, given in the LINK, based on this same idea for any two different bases b, c > 1. Sequence A235265 and A235266 are the most elementary ones in this list. Sequences A089971, A089981 and A090707 through A090721, and sequences A065720 - A065727, follow the same idea with one base equal to 10.
Subsequence of A045375A045331.

Examples

			7 = 21_3 and 21_6 = 13 are both prime.
		

Crossrefs

Cf. A235469, A235265, A235266, A235473, A152079, A235461 - A235482, A065720A036952, A065721 - A065727, A235394, A235395, A089971A020449, A089981, A090707 - A091924. See the LINK for further cross-references.

Programs

  • Mathematica
    Select[Prime[Range[400]],PrimeQ[FromDigits[ IntegerDigits[#, 3], 6]] &] (* Harvey P. Dale, Sep 29 2016 *)
  • PARI
    is(p,b=6,c=3)=isprime(vector(#d=digits(p,c),i,b^(#d-i))*d~)&&isprime(p) \\ Note: This code is only valid for b>c.
Showing 1-6 of 6 results.