OFFSET
1,1
COMMENTS
All terms must be odd. - Michael S. Branicky, Mar 03 2022
No further terms less than 25000. - Michael S. Branicky, Mar 04 2022
EXAMPLE
5 is a term since (3^5 - 5^3)/2 = 59 is prime.
MATHEMATICA
Select[Range[1, 600, 2], PrimeQ[(3^# - #^3)/2] &] (* Amiram Eldar, Mar 03 2022 *)
PROG
(Sage) for n in srange(1, 10000):
if ((3^n-n^3)//2).is_prime():
print(n)
(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
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Brennan G. Benfield, Mar 03 2022
EXTENSIONS
a(7) from Michael S. Branicky, Oct 03 2024
STATUS
approved