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.

A030083 Primes p such that all digits of p^2 appear in p.

This page as a plain text file.
%I A030083 #14 Aug 12 2025 16:45:01
%S A030083 1049,17923,49261,81619,94583,100469,100549,102953,107251,110923,
%T A030083 125789,149827,184903,256169,279863,285101,289573,298327,370421,
%U A030083 406951,459521,471923,472963,492671,493621,497521,499423,502261,504821,569423,582139,597823,631927
%N A030083 Primes p such that all digits of p^2 appear in p.
%H A030083 Robert Israel, <a href="/A030083/b030083.txt">Table of n, a(n) for n = 1..10000</a>
%p A030083 R:= NULL: count:= 0: p:= 2:
%p A030083 while count < 100 do
%p A030083  p:= nextprime(p);
%p A030083  if convert(convert(p^2,base,10),set) subset convert(convert(p,base,10),set) then
%p A030083     count:= count+1; R:= R,p
%p A030083  fi
%p A030083 od:
%p A030083 R; # _Robert Israel_, Nov 01 2023
%t A030083 Select[Prime[Range[52000]],SubsetQ[IntegerDigits[#],IntegerDigits[#^2]]&] (* _Harvey P. Dale_, Aug 12 2025 *)
%o A030083 (Python)
%o A030083 from sympy import isprime
%o A030083 def ok(n): return isprime(n) and set(str(n)) >= set(str(n**2))
%o A030083 print([k for k in range(10**6) if ok(k)]) # _Michael S. Branicky_, Nov 01 2023
%Y A030083 Contains A050288.
%Y A030083 Cf. A030084.
%K A030083 nonn,base
%O A030083 1,1
%A A030083 _Patrick De Geest_
%E A030083 Offset corrected by _Robert Israel_, Nov 01 2023