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.

A236537 Primes whose binary and ternary representations are also prime when read in decimal.

Original entry on oeis.org

157, 199, 229, 313, 367, 523, 883, 1483, 2683, 2971, 3109, 3253, 3637, 4093, 4357, 4363, 4729, 4951, 5119, 5827, 6529, 9241, 10909, 11527, 13477, 15271, 15919, 18439, 19273, 19483, 22921, 24019, 29833, 31237, 31573, 32803, 35863, 35899, 36109, 36973, 39799
Offset: 1

Views

Author

K. D. Bajpai, Jan 28 2014

Keywords

Examples

			157 is prime and appears in the sequence. Its representation in binary = 10011101 and in ternary = 12211 are also prime when read in decimal.
313 is prime and appears in the sequence. Its representation in binary = 100111001 and in ternary = 102121 are also prime when read in decimal.
		

Crossrefs

Cf. A000040 (prime numbers), A065720 (primes: binary representation is also prime), A236365 (primes: binary and octal representation is also prime), A236512 (primes: base 2, 3, 4 and 5 representation are also prime).

Programs

  • Mathematica
    t={}; n=1; While[Length[t] < 50, n=NextPrime[n]; If[PrimeQ[FromDigits[IntegerDigits[n,2]]] && PrimeQ[FromDigits[IntegerDigits[n,3]]], AppendTo[t,n]]]; t
  • PARI
    base_b(n, b) = my(s=[], r, x=10); while(n>0, r = n%b; n = n\b; s = concat(r, s)); eval(Pol(s))
    s=[]; forprime(p=2, 40000, if(isprime(base_b(p, 2)) && isprime(base_b(p, 3)), s=concat(s, p))); s \\ Colin Barker, Jan 28 2014

A236512 Primes whose representation in base (2), base (3), base (4) and base (5) are also prime when read in decimal.

Original entry on oeis.org

9241, 85303, 110581, 296011, 331081, 465523, 644353, 659371, 849943, 1108993, 1116163, 1210483, 2149471, 2469241, 2963923, 3409753, 3704203, 4451071, 4774801, 4978003, 5665213, 5674993, 5995021, 6507343, 6817501, 7529941, 7596373, 7693531, 7973653, 8320831, 8344681
Offset: 1

Views

Author

K. D. Bajpai, Jan 27 2014

Keywords

Examples

			9241 is in the sequence because it is prime. Its representation in base (2):{10010000011001}, base (3):{110200021}, base (4):{2100121} and base (5):{243431}, when read in decimal are also prime.
		

Crossrefs

Cf. A000040 (prime numbers), A065720 (primes: binary representation is also prime),
A236365 (primes: binary and octal representation is also prime).

Programs

  • Mathematica
    t={}; n=1; While[Length[t]<31,n=NextPrime[n]; If[PrimeQ[FromDigits[IntegerDigits[n,2]]]&&PrimeQ[FromDigits[IntegerDigits[n,3]]] &&PrimeQ[FromDigits[IntegerDigits[n,4]]]&&PrimeQ[FromDigits[IntegerDigits[n,5]]], AppendTo[t,n]]]; t
  • PARI
    default(primelimit,2^31)
    base_b(n, b) = {
      my(s=[], r, x=10);
      while(n>0,
        r = n%b;
        n = n\b;
        s = concat(r, s)
      );
      eval(Pol(s))
    }
    A236512(maxp) = {
      forprime(p=2, maxp,
        if(isprime(base_b(p, 2)) &&
           isprime(base_b(p, 3)) &&
           isprime(base_b(p, 4)) &&
           isprime(base_b(p, 5)), print1(p, ", ")
        )
      )
    }
    \\ Colin Barker, Jan 29 2014

A242677 Semiprimes whose binary representation, read in decimal, is also semiprime.

Original entry on oeis.org

15, 33, 55, 57, 65, 69, 77, 87, 115, 121, 129, 143, 169, 205, 209, 265, 299, 305, 321, 339, 361, 415, 417, 447, 451, 481, 493, 505, 517, 519, 535, 551, 553, 581, 611, 623, 667, 687, 695, 721, 737, 779, 789, 799, 865, 871, 893, 901, 905, 923, 943, 949, 955, 973
Offset: 1

Views

Author

K. D. Bajpai, May 20 2014

Keywords

Examples

			a(2) = 33 = 3 * 11 is semiprime. Binary representation of 33 = 100001 = 11 * 9091 which is also semiprime.
a(4) = 57 = 3 * 19 is semiprime. Binary representation of 57 = 111001 = 11 * 10091 which is also semiprime.
		

Crossrefs

Programs

  • Maple
    with(numtheory):A242677 := proc() if bigomega(n)=2 and bigomega(convert(n, binary))=2 then RETURN (n) ; fi; end:  seq(A242677(), n=1..2000);
  • Mathematica
    c = 0; Do[If [PrimeOmega[n] == 2 && PrimeOmega[FromDigits[IntegerDigits[n, 2]]] == 2, c ++;  Print[c, "  ", n]], {n, 1, 3*10^5}];

A279052 Semiprimes whose binary and ternary representations are prime when read in decimal.

Original entry on oeis.org

295, 1189, 2515, 4399, 4897, 5137, 7045, 7261, 7999, 8065, 9019, 9637, 10579, 10951, 10963, 11035, 11233, 12679, 13315, 13603, 13849, 16279, 18295, 20065, 20467, 20497, 23089, 23419, 23551, 23983, 26359, 27007, 27301, 27787, 29647, 33127, 33253, 33763, 34189, 34411
Offset: 1

Views

Author

K. D. Bajpai, Dec 05 2016

Keywords

Examples

			295 is in the sequence because 295 = 5*59 (semiprime), 295_10 = 100100111_2 = 101221_3, and both 100100111_10 and 101221_10 are prime.
1189 is in the sequence because 1189 = 29*41 (semiprime), and both its binary representation 10010100101 and its ternary representation 1122001, if read as decimal numbers, are prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[50000], PrimeOmega[#] == 2 && PrimeQ[FromDigits[IntegerDigits[#, 2]]] && PrimeQ[FromDigits[IntegerDigits[#, 3]]] &]
  • PARI
    has(n,b)=isprime(fromdigits(digits(n,b),10))
    list(lim)=my(v=List(),t); forprime(p=2,lim\2, forprime(q=2,min(lim\p,p), if(has(t=p*q,2) && has(t,3), listput(v,t)))); Set(v) \\ Charles R Greathouse IV, Dec 05 2016

A281252 Numbers whose septenary, octal and nonary representations are prime when read in decimal.

Original entry on oeis.org

2, 3, 5, 43, 115, 619, 1249, 1681, 1711, 2563, 2635, 5155, 10321, 10531, 11539, 13219, 14479, 17713, 17755, 18217, 18889, 20203, 20905, 26335, 27163, 29305, 35353, 39859, 40867, 40897, 40993, 44425, 44803, 51145, 52993, 55735, 57751, 58075, 68335, 68839, 69553
Offset: 1

Views

Author

K. D. Bajpai, Jan 22 2017

Keywords

Comments

After a(1) all the terms are odd.
After a(2) all terms are relatively prime to 42. - Charles R Greathouse IV, Jan 22 2017

Examples

			a(6) = 619 is in the sequence because 619_10 = 1543_7 = 1153_8 = 757_9; and 1543, 1153 and 757 are prime when read in decimal.
a(7) = 1249 is in the sequence because 1249_10 = 3433_7 = 2341_8 = 1637_9; and 3433, 2341 and 1637 are prime when read in decimal.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[500000], PrimeQ[FromDigits[IntegerDigits[#, 7]]] && PrimeQ[FromDigits[IntegerDigits[#, 8]]] && PrimeQ[FromDigits[IntegerDigits[#, 9]]] &]
  • PARI
    is(n)=for(b=7,9, if(!isprime(fromdigits(digits(n,b))), return(0))); 1 \\ Charles R Greathouse IV, Jan 22 2017
Showing 1-5 of 5 results.