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.

Previous Showing 11-20 of 74 results. Next

A267769 Numbers whose base-9 representation is a square when read in base 10.

Original entry on oeis.org

0, 1, 4, 15, 23, 33, 58, 73, 81, 100, 121, 185, 213, 265, 298, 324, 361, 400, 474, 509, 555, 643, 685, 751, 861, 914, 1093, 1153, 1215, 1288, 1354, 1481, 1554, 1705, 1783, 1863, 1945, 2029, 2210, 2301, 2488, 2584, 2673, 2773, 2875, 3101, 3210, 3424, 3538, 3682, 3802, 4038, 4154, 4281, 4450
Offset: 1

Views

Author

M. F. Hasler, Jan 20 2016

Keywords

Comments

Trivially includes powers of 81, since 81^k = 100..00_9 = 10^(2k) when read in base 10. Moreover, for any a(n) in the sequence, 81*a(n) is also in the sequence. One could call "primitive" the terms not of this form. These primitive terms include the subsequence 81^k + 2*9^k + 1 = (9^k+1)^2, k > 0, which yields A033934 when written in base 9.

Crossrefs

Cf. A267763 - A267768 for bases 3 through 8. The base-2 analog is A000302 = powers of 4.

Programs

  • Mathematica
    Select[Range[0, 5000], IntegerQ@ Sqrt@ FromDigits@ IntegerDigits[#, 9] &] (* Michael De Vlieger, Jan 24 2016 *)
  • PARI
    is(n,b=9,c=10)=issquare(subst(Pol(digits(n,b)),x,c))
    
  • Python
    A267769_list = [int(s, 9) for s in (str(i**2) for i in range(10**6)) if max(s) < '9'] # Chai Wah Wu, Jan 20 2016

A235473 Primes whose base-3 representation is also the base-4 representation of a prime.

Original entry on oeis.org

2, 43, 61, 67, 97, 103, 127, 139, 151, 157, 199, 211, 229, 277, 283, 331, 337, 349, 373, 379, 433, 439, 463, 499, 523, 571, 601, 607, 727, 751, 787, 823, 853, 883, 919, 991, 1063, 1087, 1117, 1213, 1249, 1327, 1381, 1429, 1483, 1531, 1567, 1597, 1627, 1759, 1783, 1867, 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.
This is a subsequence of A045331 and A045375.

Examples

			43 = 1121_3 and 1121_4 = 89 are both prime, so 43 is a term.
		

Crossrefs

Cf. A235266, A235474, 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[#,3],4]]&] (* Harvey P. Dale, Oct 16 2015 *)
  • PARI
    is(p,b=4,c=3)=isprime(vector(#d=digits(p,c),i,b^(#d-i))*d~)&&isprime(p) \\ Note: This code is only valid for b > c.

A267763 Numbers whose base-3 representation is a square when read in base 10.

Original entry on oeis.org

0, 1, 9, 16, 81, 100, 144, 235, 729, 784, 900, 961, 1296, 1369, 2115, 6561, 6724, 7056, 7225, 8100, 8649, 11664, 11881, 12321, 15985, 19035, 59049, 59536, 60516, 61009, 63504, 64009, 65025, 72900, 73441, 77841, 104976, 105625, 106929, 110889, 143865, 171315, 182428, 531441, 532900, 535824, 537289, 544644, 546121
Offset: 1

Views

Author

M. F. Hasler, Jan 20 2016

Keywords

Comments

Trivially includes powers of 9, since 9^k = 100..00_3 = 10^(2k) when read as a base-10 number. Moreover, for any a(n) in the sequence, 9*a(n) is also in the sequence. One could call "primitive" the terms not of this form; these would be 1, 16 = 121_3, 100 = 10201_3, 235 = 22201_3, 784 = 1002001_3, 961 = 1022121_3, ... These primitive terms include the subsequence 9^k + 2*3^k + 1, k > 0, which yields A033934 when written in base 3.

Crossrefs

Cf. A267764 - A267769 for bases 4 through 9. The base-2 analog is A000302 = powers of 4.

Programs

  • Magma
    [n: n in [0..10^6] | IsSquare(Seqint(Intseq(n, 3)))]; // Vincenzo Librandi, Dec 28 2016
  • Mathematica
    Select[Range[0, 600000], IntegerQ@Sqrt@FromDigits@IntegerDigits[#, 3] &] (* Vincenzo Librandi Dec 28 2016 *)
  • PARI
    is(n,b=3,c=10)=issquare(subst(Pol(digits(n,b)),x,c))
    
  • Python
    A267763_list = [int(d,3) for d in (str(i**2) for i in range(10**6)) if max(d) < '3'] # Chai Wah Wu, Mar 12 2016
    

A065722 Primes that when written in base 4, then reinterpreted in base 10, again give primes.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 37, 43, 47, 53, 61, 71, 73, 79, 83, 97, 103, 107, 109, 113, 131, 149, 151, 157, 163, 167, 181, 191, 193, 197, 227, 233, 241, 251, 277, 293, 307, 311, 313, 317, 349, 359, 373, 389, 401, 419, 421, 433, 443, 449, 463, 467, 503
Offset: 1

Views

Author

Patrick De Geest, Nov 15 2001

Keywords

Comments

In general rebase notation (Marc LeBrun): p4 = (4) [p] (10).

Examples

			The decimal prime 29 in base 4 is 131 which is again a prime in base 10.
E.g., 509_10 = 13331_4 is prime but also 13331_10.
		

Crossrefs

Programs

  • Maple
    A007090 := proc(n) local b4digs ; b4digs := convert(n,base,4) ; add( op(i,b4digs)*10^(i-1),i=1..nops(b4digs)) ; end: isA065722 := proc(n) local rebase ; if isprime(n) then rebase := A007090(n) ; RETURN(isprime(rebase)) ; else RETURN(false) ; fi ; end: for n from 1 to 1000 do p := ithprime(n) : if isA065722(p) then printf("%d, ",p) ; fi : od : # R. J. Mathar, Jun 15 2007
  • Mathematica
    Select[ Range[505], PrimeQ[ # ] && PrimeQ[ FromDigits[ IntegerDigits[ #, 4]]] & ]
  • PARI
    isok(p)={ isprime(p) && isprime(fromdigits(digits(p,4))) } \\ Harry J. Smith, Oct 27 2009

Formula

Numbers n such that A049084(n)>0 and A049084(A007090(n))>0. - R. J. Mathar, Jun 15 2007

Extensions

Edited by N. J. A. Sloane, Jul 02 2008 at the suggestion of R. J. Mathar

A235479 Primes whose base-2 representation also is the base-9 representation of a prime.

Original entry on oeis.org

11, 13, 19, 41, 79, 109, 137, 151, 167, 191, 193, 199, 227, 239, 271, 307, 313, 421, 431, 433, 457, 487, 491, 521, 563, 613, 617, 659, 677, 709, 727, 757, 929, 947, 1009, 1033, 1051, 1249, 1483, 1693, 1697, 1709, 1721, 1831, 1951, 1979, 1987, 1993
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.
A subsequence of A027697, A050150, A062090 and A176620.

Examples

			11 = 1011_2 and 1011_9 = 6571 are both prime, so 11 is a term.
		

Crossrefs

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

Programs

  • PARI
    is(p,b=9)=isprime(vector(#d=binary(p),i,b^(#d-i))*d~)&&isprime(p)

A267490 Primes whose base-8 representation is a perfect square in base 10.

Original entry on oeis.org

149, 241, 661, 1409, 2593, 3733, 6257, 7793, 15313, 23189, 25601, 26113, 30497, 34337, 44053, 49057, 78577, 92821, 95009, 108529, 115861, 132757, 162257, 178417, 183377, 223381, 235541, 242197, 266261, 327317, 345749, 426389, 525461, 693397, 719893, 729713, 805397, 814081, 903841
Offset: 1

Views

Author

Christopher Cormier, Jan 16 2016

Keywords

Comments

Subsequence of primes in A267768. - M. F. Hasler, Jan 20 2016

Examples

			a(1) = 149 because 149 is 225 in base 8, and 225 is 15^2 in base 10.
		

Crossrefs

For primes which are primes in other bases, see A235265, A235266, A152079, A235461 - A235482, A065720A036952, A065721 - A065727, A235394, A235395, A089971A020449, A089981, A090707 - A091924.

Programs

  • Magma
    [n:n in PrimesUpTo(1000000)| IsSquare(Seqint(Intseq(n,8)))]; // Marius A. Burtea, Jun 30 2019
  • Mathematica
    Select[Prime@ Range[10^5], IntegerQ@ Sqrt@ FromDigits@ IntegerDigits[#, 8] &] (* Michael De Vlieger, Jan 16 2016 *)
  • PARI
    listp(nn) = {forprime(p=1, nn, d = digits(p, 8); pd = Pol(d); if (issquare(subst(pd, x, 10)), print1(p, ", ")););} \\ Michel Marcus, Jan 16 2016
    
  • PARI
    is(n,b=8,c=10)={issquare(subst(Pol(digits(n,b)),x,c))&&isprime(n)} \\ M. F. Hasler, Jan 20 2016
    
  • Python
    from sympy import isprime
    A267490_list = [int(s,8) for s in (str(i**2) for i in range(10**6)) if max(s) < '8' and isprime(int(s,8))] # Chai Wah Wu, Jan 20 2016
    

A065723 Primes that when written in base 5, then reinterpreted in base 10, again give primes.

Original entry on oeis.org

2, 3, 13, 23, 41, 71, 83, 101, 163, 191, 211, 281, 283, 311, 331, 463, 503, 571, 613, 653, 701, 743, 823, 863, 881, 983, 1091, 1213, 1231, 1283, 1301, 1373, 1381, 1423, 1471, 1493, 1531, 1543, 1621, 1741, 1783, 1861, 1873, 1931, 2063, 2203, 2213, 2221
Offset: 1

Views

Author

Patrick De Geest, Nov 15 2001

Keywords

Comments

In general rebase notation (Marc LeBrun): p5 = (5) [p] (10).

Examples

			E.g., 2213_10 = 32323_5 is prime, and so is 32323_10.
		

Crossrefs

Cf. A065720 up to A065727, A065361.

Programs

  • Mathematica
    Select[ Range[2250], PrimeQ[ # ] && PrimeQ[ FromDigits[ IntegerDigits[ #, 5]]] & ]
    Select[Prime[Range[400]],PrimeQ[FromDigits[IntegerDigits[#,5]]]&] (* Harvey P. Dale, Mar 28 2015 *)
  • PARI
    isok(p)={ isprime(p) && isprime(fromdigits(digits(p,5))) } \\ Harry J. Smith, Oct 27 2009

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

Original entry on oeis.org

2, 3, 5, 7, 19, 37, 67, 79, 97, 103, 127, 157, 163, 193, 229, 283, 307, 337, 439, 487, 547, 571, 601, 631, 643, 673, 733, 751, 757, 853, 877, 907, 937, 1021, 1033, 1039, 1087, 1093, 1117, 1171, 1249, 1279, 1423, 1567, 1627, 1663, 1723, 1753, 1831, 1873
Offset: 1

Views

Author

Patrick De Geest, Nov 15 2001

Keywords

Comments

In general rebase notation (Marc LeBrun): p6 = (6) [p] (10).

Examples

			E.g., 1627_10 = 11311_6 is prime, and so is 11311_10.
		

Crossrefs

Primes in A036959.
Cf. A065720 up to A065727, A065361.

Programs

  • Mathematica
    Select[ Range[1900], PrimeQ[ # ] && PrimeQ[ FromDigits[ IntegerDigits[ #, 6]]] & ]
    Select[Prime[Range[300]],PrimeQ[FromDigits[IntegerDigits[#,6]]]&] (* Harvey P. Dale, Jul 17 2025 *)
  • PARI
    isok(p) = isprime(p) && isprime(fromdigits(digits(p, 6), 10)); \\ Michel Marcus, Mar 05 2022

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

Original entry on oeis.org

2, 3, 5, 17, 29, 31, 43, 59, 71, 127, 157, 197, 211, 227, 239, 241, 337, 353, 367, 379, 409, 463, 491, 563, 577, 619, 647, 743, 757, 773, 787, 857, 911, 953, 967, 1093, 1123, 1163, 1193, 1249, 1303, 1373, 1429, 1459, 1471, 1499, 1583, 1597, 1613, 1627, 1669
Offset: 1

Views

Author

Patrick De Geest, Nov 15 2001

Keywords

Comments

In general rebase notation (Marc LeBrun): p7 = (7) [p] (10).

Examples

			E.g., 787_10 = 2203_7 is prime, and so is 2203_10.
		

Crossrefs

Primes in A036961.
Cf. A065720 up to A065727, A065361.

Programs

  • Mathematica
    Select[ Range[2500], PrimeQ[ # ] && PrimeQ[ FromDigits[ IntegerDigits[ #, 7]]] & ]
    Select[Prime[Range[300]],PrimeQ[FromDigits[IntegerDigits[#,7]]]&] (* Harvey P. Dale, Nov 10 2022 *)
  • PARI
    isok(p) = isprime(p) && isprime(fromdigits(digits(p, 7), 10)); \\ Michel Marcus, Mar 05 2022

A065726 Primes p whose base-8 expansion is also the decimal expansion of a prime.

Original entry on oeis.org

2, 3, 5, 7, 11, 19, 31, 43, 59, 67, 71, 89, 137, 151, 179, 191, 199, 223, 251, 257, 281, 283, 307, 311, 337, 353, 359, 367, 383, 409, 419, 433, 443, 449, 523, 563, 617, 619, 641, 659, 727, 787, 809, 811, 857, 887, 907, 919, 947, 977, 1033, 1039, 1097, 1123
Offset: 1

Views

Author

Patrick De Geest, Nov 15 2001

Keywords

Comments

In general rebase notation (Marc LeBrun): p8 = (8) [p] (10).

Examples

			E.g., 787_10 = 1423_8 is prime, and so is 1423_10.
		

Crossrefs

Primes in A036963.
Cf. A065720 up to A065727, A065361.
Cf. A090707 - A091924, A235461 - A235482. See the LINK for further cross-references.

Programs

  • Mathematica
    Select[ Range[2500], PrimeQ[ # ] && PrimeQ[ FromDigits[ IntegerDigits[ #, 8]]] & ]
  • PARI
    is(p, b=10, c=8)=isprime(vector(#d=digits(p, c), i, b^(#d-i))*d~)&&isprime(p) \\ This code can be used for other bases b, c when b>c. See A235265 for code also valid for bM. F. Hasler, Jan 12 2014

Extensions

Definition clarified by M. F. Hasler, Jan 12 2014
Previous Showing 11-20 of 74 results. Next