OFFSET
1,1
COMMENTS
Subsequence of primes in A267768. - M. F. Hasler, Jan 20 2016
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
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
KEYWORD
nonn,base
AUTHOR
Christopher Cormier, Jan 16 2016
STATUS
approved