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-10 of 13 results. Next

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

A036952 Numbers whose binary expansion is a decimal prime.

Original entry on oeis.org

3, 5, 23, 47, 89, 101, 149, 157, 163, 173, 179, 185, 199, 229, 247, 253, 295, 313, 329, 331, 355, 367, 379, 383, 405, 425, 443, 453, 457, 471, 523, 533, 539, 565, 583, 587, 595, 631, 643, 647, 653, 659, 671, 675, 689, 703, 709, 755, 781, 785, 815, 841, 855
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Comments

A100051(f(a(n))) = 1 with f(x) = if x<2 then x else 10*f(floor(x/2)) + x mod 2. - Reinhard Zumkeller, Mar 31 2010
Primes in A007088. - N. J. A. Sloane, Feb 17 2023

Examples

			1 = 1_2 is not a prime.
2 = 10_2 is not OK because 10 = 2*5 is not a prime.
3 = 11_2 is OK because 11 is a prime.
4 = 100_2 is not OK because 100 = 4*25 is not a prime.
5 = 101_2 is OK because 101 is a prime.
7 = 111_2 is not OK because 111 = 3*37.
11 = 1011_2 is not OK because 1011 = 3*337.
313 = 100111001_2 is OK because 100111001 is prime.
		

Crossrefs

Programs

  • Maple
    A007088 := proc(n)
    dgs := convert(n,base,2) ;
    add(op(i,dgs)*10^(i-1),i=1..nops(dgs)) ;
    end proc:
    isA036952 := proc(n)
    isprime( A007088(n)) :
    end proc:
    A036952 := proc(n)
    if n =1 then
    3;
    else
    for a from procname(n-1)+1 do
    if isA036952(a) then
    return a ;
    end if;
    end do:
    end if;
    end proc:
    seq(A036952(n),n=1..80) ;
    # R. J. Mathar, Mar 12 2010
    A036952 := proc() if isprime(convert(n,binary)) then RETURN (n); fi; end: seq(A036952(), n=1..1000);  # K. D. Bajpai, Jul 04 2014
  • Mathematica
    f[n_,k_]:=FromDigits[IntegerDigits[n,k]];lst={};Do[If[PrimeQ[f[n,2]],AppendTo[lst,n]],{n,7!}];lst (* Vladimir Joseph Stephan Orlovsky, Mar 12 2010 *)
    NestList[NestWhile[# + 2 &, #, ! PrimeQ[FromDigits[IntegerDigits[#2, 2]]] &, 2] &, 3, 52] (* Jan Mangaldan, Jul 02 2020 *)
  • PARI
    is(n)=my(v=binary(n));isprime(sum(i=1,#v,v[i]*10^(#v-i))) \\ Charles R Greathouse IV, Jun 28 2013

Extensions

Entry revised by R. J. Mathar and N. J. A. Sloane, Mar 12 2010

A036953 Primes having only {0, 1, 2} as digits.

Original entry on oeis.org

2, 11, 101, 211, 1021, 1201, 2011, 2111, 2221, 10111, 10211, 12011, 12101, 12211, 20011, 20021, 20101, 20201, 21001, 21011, 21101, 21121, 21211, 21221, 22111, 101021, 101111, 101221, 102001, 102101, 102121, 110221, 111121, 111211, 112111
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Comments

Number of n-digit terms d(n) = (1, 1, 2, 5, 16, 34, 76, 194, 543, 1469, 4094, 11017, ...); e.g., there are five 4-digit terms: 1021, 1201, 2011, 2111, 2221, hence d(4) = 5. - Zak Seidov, Jun 30 2013
Also, primes in A007089. - M. F. Hasler, Jul 25 2015

Crossrefs

Programs

  • Mathematica
    Select[FromDigits/@Tuples[{0,1,2},6],PrimeQ] (* Harvey P. Dale, Jul 11 2017 *)
  • PARI
    lista(n) = {forprime(p=2, n, if (vecmax(digits(p)) <= 2, print1(p, ", ")))} \\ Michel Marcus, Aug 02 2014
    
  • PARI
    A036953={(n,show=0)->for(d=1,1e9,my(u=vector(d,i,10^(d-i))~);forvec(v=vector(d,i,if(i>1,if(iM. F. Hasler, Jul 25 2015
  • Python
    from gmpy2 import digits
    from sympy import isprime
    [int(digits(n,3)) for n in range(1000) if isprime(int(digits(n,3)))] # Chai Wah Wu, Jul 31 2014
    

Extensions

Edited by M. F. Hasler, Jul 25 2015

A036956 Primes containing only digits from the set (0,1,2,3,4).

Original entry on oeis.org

2, 3, 11, 13, 23, 31, 41, 43, 101, 103, 113, 131, 211, 223, 233, 241, 311, 313, 331, 401, 421, 431, 433, 443, 1013, 1021, 1031, 1033, 1103, 1123, 1201, 1213, 1223, 1231, 1301, 1303, 1321, 1423, 1433, 2003, 2011, 2111, 2113, 2131, 2141, 2143, 2203, 2213
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Subsequence of A036958.

Extensions

Offet 1 from Michel Marcus, Oct 10 2019

A036954 Primes with digits in {0,1,2} taken as base 3 and converted to base 10.

Original entry on oeis.org

2, 4, 10, 22, 34, 46, 58, 67, 79, 94, 103, 139, 145, 157, 166, 169, 172, 181, 190, 193, 199, 205, 211, 214, 229, 277, 283, 295, 298, 307, 313, 349, 367, 373, 391, 394, 409, 421, 433, 439, 463, 466, 478, 505, 517, 523, 529, 535, 541, 547, 556, 559, 571, 577
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Comments

Equivalently: terms of A036953 read in base 3 (and written in base 10). - M. F. Hasler, Jul 25 2015
Equivalently, k such that A007089(k), read literally as a decimal number, is a prime. - N. J. A. Sloane, Feb 17 2023

Examples

			a(n) = 313 is 102121{3}, and 102121{10} is prime.
		

Crossrefs

Indices of primes in A007089.

Programs

  • Mathematica
    FromDigits[#,3]&/@Select[Tuples[{0,1,2},6],PrimeQ[FromDigits[#]]&] (* Harvey P. Dale, Mar 27 2021 *)
  • PARI
    is(n)=(n%3==1||n==2)&&isprime((n=digits(n,3))*vectorv(#n,i,10^(#n-i))) \\ M. F. Hasler, Jul 25 2015

Formula

a(n) == 1 (mod 3) for all n > 1. - M. F. Hasler, Jul 25 2015

Extensions

Offset corrected to 1 and minor edits by M. F. Hasler, Jul 25 2015

A036958 Primes containing only digits from the set (0,1,2,3,4,5).

Original entry on oeis.org

2, 3, 5, 11, 13, 23, 31, 41, 43, 53, 101, 103, 113, 131, 151, 211, 223, 233, 241, 251, 311, 313, 331, 353, 401, 421, 431, 433, 443, 503, 521, 523, 541, 1013, 1021, 1031, 1033, 1051, 1103, 1123, 1151, 1153, 1201, 1213, 1223, 1231, 1301, 1303, 1321
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Subsequence of A036960.

Programs

  • Mathematica
    Select[Prime[Range[220]],Max[IntegerDigits[#]]<6&] (* Harvey P. Dale, Sep 23 2011 *)

Extensions

Offset 1 from Michel Marcus, Oct 10 2019

A036960 Primes containing only digits from the set (0,1,2,3,4,5,6).

Original entry on oeis.org

2, 3, 5, 11, 13, 23, 31, 41, 43, 53, 61, 101, 103, 113, 131, 151, 163, 211, 223, 233, 241, 251, 263, 311, 313, 331, 353, 401, 421, 431, 433, 443, 461, 463, 503, 521, 523, 541, 563, 601, 613, 631, 641, 643, 653, 661, 1013, 1021, 1031, 1033, 1051, 1061, 1063
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Subsequence of A036962.

Programs

  • Mathematica
    Select[Prime[Range[200]],Max[IntegerDigits[#]]<7&] (* Harvey P. Dale, Feb 08 2019 *)

Extensions

Offset 1 from Michel Marcus, Oct 10 2019

A036961 Primes with digits (0,...,6) taken as base 7 and converted to base 10.

Original entry on oeis.org

2, 3, 5, 8, 10, 17, 22, 29, 31, 38, 43, 50, 52, 59, 71, 85, 94, 106, 115, 122, 127, 134, 143, 155, 157, 169, 185, 197, 211, 218, 220, 227, 239, 241, 248, 260, 262, 274, 290, 295, 304, 316, 323, 325, 332, 337, 353, 358, 365, 367, 379, 386, 388, 395, 409, 428
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Examples

			a(n)=323 -> is 641{7} -> 641{10} is prime.
		

Crossrefs

Programs

  • Mathematica
    pd7[n_]:=With[{c=IntegerDigits[n]},If[Max[c]<7,FromDigits[c,7],Nothing]]; pd7/@Prime[Range[300]] (* Harvey P. Dale, Mar 14 2025 *)

A036962 Primes without {8, 9} as digits.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 23, 31, 37, 41, 43, 47, 53, 61, 67, 71, 73, 101, 103, 107, 113, 127, 131, 137, 151, 157, 163, 167, 173, 211, 223, 227, 233, 241, 251, 257, 263, 271, 277, 307, 311, 313, 317, 331, 337, 347, 353, 367, 373, 401, 421, 431, 433, 443, 457, 461
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Subsequence of A038617.

Programs

  • Mathematica
    Select[FromDigits/@Tuples[Range[0,7],3],PrimeQ] (* Harvey P. Dale, Apr 13 2017 *)

A036963 Primes with digits (0,...,7) taken as base 8 and converted to base 10.

Original entry on oeis.org

2, 3, 5, 7, 9, 11, 15, 19, 25, 31, 33, 35, 39, 43, 49, 55, 57, 59, 65, 67, 71, 75, 87, 89, 95, 105, 111, 115, 119, 123, 137, 147, 151, 155, 161, 169, 175, 179, 185, 191, 199, 201, 203, 207, 217, 223, 231, 235, 247, 251, 257, 273, 281, 283, 291, 303, 305, 307, 311
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Examples

			a(n)=191 -> is 277{8} -> 277{10} is prime.
		

Crossrefs

Extensions

Offset 1 from Michel Marcus, Oct 10 2019
Showing 1-10 of 13 results. Next