A275971 Numbers n such that the decimal digits of n^2 are all prime.
5, 15, 85, 165, 235, 485, 1665, 1885, 4835, 5765, 7585, 15085, 15885, 16665, 18365, 18915, 22885, 27115, 27885, 50235, 57665, 58115, 72335, 85635, 87885, 150915, 166665, 182415, 194235, 194365, 229635, 240365, 268835, 503515, 507665, 524915, 568835, 570415, 577515, 581165
Offset: 1
Examples
72335^2 = 5232352225 = A191486(23).
Links
- Michel Marcus, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
w = Boole@! PrimeQ@ # & /@ RotateLeft@ Range[0, 9]; Sqrt@ Select[Range[10^6]^2, Total@ Pick[DigitCount@ #, w, 1] == 0 &] (* Michael De Vlieger, Aug 15 2016 *)
-
PARI
is(n)=#setintersect(Set(digits(n^2)), [0, 1, 4, 6, 8, 9])==0 \\ Charles R Greathouse IV, Sep 16 2016
-
Python
def aupto(limit): alst = [] for k in range(1, limit+1): if set(str(k*k)) <= set("2357"): alst.append(k) return alst print(aupto(10**6)) # Michael S. Branicky, May 15 2021
Formula
a(n) = sqrt(A191486(n)).
Extensions
More terms from Michel Marcus, Aug 17 2016
Comments