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.

A352083 Numbers k such that (3^k - k^3)/2 is prime.

Original entry on oeis.org

5, 13, 205, 409, 413, 545, 88649
Offset: 1

Views

Author

Brennan G. Benfield, Mar 03 2022

Keywords

Comments

All terms must be odd. - Michael S. Branicky, Mar 03 2022
No further terms less than 25000. - Michael S. Branicky, Mar 04 2022

Examples

			5 is a term since (3^5 - 5^3)/2 = 59 is prime.
		

Programs

  • Mathematica
    Select[Range[1, 600, 2], PrimeQ[(3^# - #^3)/2] &] (* Amiram Eldar, Mar 03 2022 *)
  • PARI
    isok(k) = if (denominator(x=(3^k-k^3)/2) == 1, ispseudoprime(x)); \\ Michel Marcus, Mar 03 2022
    
  • Python
    from sympy import isprime
    def afind(limit):
        for k in range(1, limit+1, 2):
            if isprime((3**k - k**3)//2):
                print(k, end=", ")
    afind(1000) # Michael S. Branicky, Mar 03 2022
  • Sage
    for n in srange(1,10000):
                 if ((3^n-n^3)//2).is_prime():
                      print(n)
    

Extensions

a(7) from Michael S. Branicky, Oct 03 2024