login
A267490
Primes whose base-8 representation is a perfect square in base 10.
6
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,1
COMMENTS
Subsequence of primes in A267768. - M. F. Hasler, Jan 20 2016
EXAMPLE
a(1) = 149 because 149 is 225 in base 8, and 225 is 15^2 in base 10.
MATHEMATICA
Select[Prime@ Range[10^5], IntegerQ@ Sqrt@ FromDigits@ IntegerDigits[#, 8] &] (* Michael De Vlieger, Jan 16 2016 *)
PROG
(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
(Magma) [n:n in PrimesUpTo(1000000)| IsSquare(Seqint(Intseq(n, 8)))]; // Marius A. Burtea, Jun 30 2019
CROSSREFS
For primes which are primes in other bases, see A235265, A235266, A152079, A235461 - A235482, A065720A036952, A065721 - A065727, A235394, A235395, A089971A020449, A089981, A090707 - A091924.
Sequence in context: A059223 A096694 A144315 * A365405 A198245 A142687
KEYWORD
nonn,base
AUTHOR
Christopher Cormier, Jan 16 2016
STATUS
approved