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.

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