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-2 of 2 results.

A138465 Non-optimus primes.

Original entry on oeis.org

3, 23, 31, 137, 191, 239, 277, 359, 431, 439, 683, 719, 743, 911, 997, 1031, 1061, 1103, 1109, 1223, 1279, 1423, 1439, 1481, 1511, 1559, 1583, 1597, 1733, 1873, 2017, 2039, 2063, 2351, 2399, 2411, 2543, 2683, 2897, 2903, 3023, 3347, 3359, 3457, 3517, 3607, 3623, 3793, 3797
Offset: 1

Views

Author

N. J. A. Sloane, Feb 07 2009

Keywords

Comments

A prime p is an optimus prime if (1 + sqrt( legendre(-1,p)*p ))^p - 1 = r + s*sqrt( legendre(-1,p)*p ) where gcd(r,s) = p.

Examples

			For p = 13, (1 + sqrt( legendre(-1,p)*p ))^p - 1 = 209588223+58200064*13^(1/2), and gcd(209588223,58200064) = 13, so 13 is an optimus prime.
For p = 23, (1 + sqrt( legendre(-1,p)*p ))^p - 1 = 7453766387236863-24397683359744*(-23)^(1/2), but gcd(7453766387236863,24397683359744) = 1081 != 23, so 23 is a non-optimus prime.
		

References

  • A. Slinko, Additive representability of finite measurement structures, in "The Mathematics of Preference, Choice and Order: Essays in Honor of Peter Fishburn", edited by Steven Brams, William V. Gehrlein and Fred S. Roberts, Springer, 2009, pp. 113-133.

Crossrefs

Cf. A217090 (optimus primes).

Programs

  • PARI
    is(p)=if(p<3 || !isprime(p),return(0)); my(t=(2*quadgen(kronecker(-1,p)*p))^p);gcd(imag(t),real(t)-1)!=p \\ Charles R Greathouse IV, Sep 26 2012

Extensions

More terms from Charles R Greathouse IV, Sep 26 2012

A348699 Primes with a prime number of prime digits.

Original entry on oeis.org

23, 37, 53, 73, 127, 137, 157, 173, 223, 227, 229, 233, 239, 251, 257, 263, 271, 277, 283, 293, 307, 313, 317, 331, 337, 347, 353, 359, 367, 373, 379, 383, 397, 433, 457, 503, 521, 523, 547, 557, 563, 571, 577, 587, 593, 653, 673, 677, 727, 733, 739, 743, 751, 757, 773, 787, 797
Offset: 1

Views

Author

Jens Ahlström, Oct 30 2021

Keywords

Crossrefs

Intersection of A000040 and A092619.
Cf. A217090.

Programs

  • Mathematica
    Select[Range[800], And @@ PrimeQ[{#, Count[IntegerDigits[#], ?PrimeQ]}] &] (* _Amiram Eldar, Nov 04 2021 *)
  • Python
    from sympy import isprime as i
    from sympy import primerange as p
    print([x for x in p(1, 800) if i(len([d for d in str(x) if i(int(d))]))])
    
  • Python
    from sympy import isprime
    def ok(n): return isprime(n) and isprime(sum(1 for d in str(n) if d in "2357"))
    print([k for k in range(800) if ok(k)]) # Michael S. Branicky, Jun 26 2025
Showing 1-2 of 2 results.