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.

A065720 Primes whose binary representation is also the decimal representation of a prime.

Original entry on oeis.org

3, 5, 23, 47, 89, 101, 149, 157, 163, 173, 179, 199, 229, 313, 331, 367, 379, 383, 443, 457, 523, 587, 631, 643, 647, 653, 659, 709, 883, 947, 997, 1009, 1091, 1097, 1163, 1259, 1277, 1283, 1289, 1321, 1483, 1601, 1669, 1693, 1709, 1753, 1877, 2063, 2069, 2099
Offset: 1

Views

Author

Patrick De Geest, Nov 15 2001

Keywords

Comments

In general rebase notation (Marc LeBrun): p2 = (2) [p] (10).
Also: Primes in A036952. - M. F. Hasler, Dec 11 2012
See A089971 for the binary representation of these terms. - M. F. Hasler, Jan 05 2014

Examples

			1009{10} = 1111110001{2} is prime, and 1111110001{10} is also prime.
89 is in the sequence because it is a prime. Binary representation of 89 = 1011001, which is also a prime.
		

Crossrefs

Programs

  • Maple
    select(t -> isprime(t) and isprime(convert(t,binary)),[seq(2*i+1,i=1..1000)]); # Robert Israel, Jul 08 2014
  • Mathematica
    Select[ Range[1900], PrimeQ[ # ] && PrimeQ[ FromDigits[ IntegerDigits[ #, 2]]] & ]
    Select[ Prime@ Range@ 330, PrimeQ[ FromDigits[ IntegerDigits[#, 2]]] &] (* Robert G. Wilson v, Oct 09 2014 *)
  • PARI
    isok(p) = isprime(p) && isprime(fromdigits(binary(p), 10)); \\ Michel Marcus, Mar 04 2022
    
  • Python
    from sympy import isprime
    def ok(n): return isprime(n) and isprime(int(bin(n)[2:]))
    print([k for k in range(2100) if ok(k)]) # Michael S. Branicky, Mar 04 2022

Formula

Equals A036952 intersect A000040. - M. F. Hasler, Dec 11 2012

Extensions

a(48)-a(50) from K. D. Bajpai, Jul 04 2014

A065727 Primes p such that the decimal expansion of its base-9 conversion is also prime.

Original entry on oeis.org

2, 3, 5, 7, 37, 43, 61, 109, 127, 199, 271, 277, 379, 457, 487, 523, 541, 613, 619, 673, 727, 757, 883, 907, 919, 991, 997, 1033, 1117, 1249, 1447, 1483, 1531, 1549, 1567, 1627, 1693, 1699, 1747, 1753, 1987, 2053, 2161, 2221, 2287, 2341, 2347, 2437, 2473
Offset: 1

Views

Author

Patrick De Geest, Nov 15 2001

Keywords

Comments

In general rebase notation (Marc LeBrun): p9 = (9) [p] (10).

Examples

			E.g., 997_10 = 1327_9 is prime, and so is 1327_10.
		

Crossrefs

Programs

  • Mathematica
    Select[ Range[2500], PrimeQ[ # ] && PrimeQ[ FromDigits[ IntegerDigits[ #, 9]]] & ]
    NestList[NestWhile[NextPrime, #, ! PrimeQ[FromDigits[IntegerDigits[#2, 9]]] &, 2] &, 2, 48] (* Jan Mangaldan, Jul 01 2020 *)
    Select[Prime[Range[400]],PrimeQ[FromDigits[IntegerDigits[#,9],10]]&] (* Harvey P. Dale, Sep 19 2021 *)
  • PARI
    isok(p) = isprime(p) && isprime(fromdigits(digits(p, 9))); \\ Michel Marcus, Jul 02 2020

A281227 Primes whose binary reflected Gray code representation is also the decimal representation of a prime.

Original entry on oeis.org

2, 53, 233, 281, 397, 521, 613, 673, 733, 773, 797, 829, 1049, 1129, 1433, 1553, 1697, 1933, 2129, 2237, 2273, 2281, 2437, 2521, 2557, 2617, 2729, 2969, 3121, 3181, 3413, 3457, 3517, 3637, 3709, 3761, 3881, 4337, 4357, 4729, 4733, 4877, 4889, 5101, 5657, 5813, 5857, 6113, 6133
Offset: 1

Views

Author

Indranil Ghosh, Jan 18 2017

Keywords

Examples

			521 is in the sequence because 521_10 = 1100001101_2 and both 521 and 1100001101 are prime numbers in base 10.
		

Crossrefs

Programs

  • Python
    from sympy import isprime
    def gray(n):
        return bin(n^(n//2))[2:]
    i=1
    j=1
    while j<=481:
        if isprime(i)==True and isprime(int(gray(i)))==True:
            print(str(j)+" "+str(i))
            j+=1
        i+=1

A373033 a(0) = 5. For n >= 1, a(n) = a(n-1) converted to base 4 and interpreted in base 10.

Original entry on oeis.org

5, 11, 23, 113, 1301, 110111, 122320133, 13102213110011, 2332222120300201203323, 133212320111123130111021311111121323, 12122133133313032110200332320320202022333020121323230212223, 1323212003321221211122101013133003222123113122111221033300222032132012202011331212030120003001333
Offset: 0

Views

Author

Paolo Xausa, May 20 2024

Keywords

Comments

a(n) is prime for n = 0, 1, 2, 3, 4. What is the next n for which a(n) is prime?

Examples

			5        -->        11        -->        23 ...
  base 10 to base 4    base 10 to base 4
		

Crossrefs

Programs

  • Mathematica
    NestList[FromDigits[IntegerDigits[#, 4]] &, 5, 11]

Formula

From Jianing Song, May 22 2024: (Start)
a(n+1) = A007090(a(n)).
As A007090(n+1) = A007090(n) + 1 if n is not congruent to 3 modulo 4, and all terms of A023378 are even, we have a(n) = A023378(n) + 1 by induction. (End)

A316479 a(n) is the smallest prime whose base-b expansion, read as a base-10 number, is a prime for every b in 2, 3, ..., n. (For n > 10, each base-b expansion for 10 < b <= n must contain no digit larger than 9.)

Original entry on oeis.org

3, 157, 157, 9241, 9241, 48404791, 18172964503, 50006393431, 50006393431, 181395559296673
Offset: 2

Views

Author

Jon E. Schoenfield, Jul 16 2018

Keywords

Comments

a(2)=3, the smallest term in A065720, primes whose binary representation is also the decimal representation of a prime;
a(3)=157, the smallest integer in both A065720 and A065721, primes p whose base-3 expansion is also the decimal expansion of a prime;
similarly, a(4)=157 is the smallest integer in A065720, A065721, and A065722.
Is this sequence infinite?
a(12) > 10^16. - Giovanni Resta, Aug 01 2018

Examples

			a(2)=3 because 3 is prime, 3_10 = 11_2, and 11 is prime, and 3 is the smallest such number.
a(3)=157 because 157 is prime, 157_10 = 10011101_2, 157_10 = 12211_3, and 10011101 and 12211 are prime, and 157 is the smallest such number. a(4)=157 as well, since 157_10 = 2131_4 and 2131 is also prime.
		

Crossrefs

Extensions

a(8)-a(10) from Giovanni Resta, Jul 17 2018
a(11) from Giovanni Resta, Jul 24 2018
Showing 1-5 of 5 results.