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.

Showing 1-1 of 1 results.

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

Original entry on oeis.org

1049, 17923, 49261, 81619, 94583, 100469, 100549, 102953, 107251, 110923, 125789, 149827, 184903, 256169, 279863, 285101, 289573, 298327, 370421, 406951, 459521, 471923, 472963, 492671, 493621, 497521, 499423, 502261, 504821, 569423, 582139, 597823, 631927
Offset: 1

Views

Author

Keywords

Crossrefs

Contains A050288.
Cf. A030084.

Programs

  • Maple
    R:= NULL: count:= 0: p:= 2:
    while count < 100 do
     p:= nextprime(p);
     if convert(convert(p^2,base,10),set) subset convert(convert(p,base,10),set) then
        count:= count+1; R:= R,p
     fi
    od:
    R; # Robert Israel, Nov 01 2023
  • Mathematica
    Select[Prime[Range[52000]],SubsetQ[IntegerDigits[#],IntegerDigits[#^2]]&] (* Harvey P. Dale, Aug 12 2025 *)
  • Python
    from sympy import isprime
    def ok(n): return isprime(n) and set(str(n)) >= set(str(n**2))
    print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Nov 01 2023

Extensions

Offset corrected by Robert Israel, Nov 01 2023
Showing 1-1 of 1 results.