login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A352083
Numbers k such that (3^k - k^3)/2 is prime.
0
5, 13, 205, 409, 413, 545, 88649
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
Sequence in context: A117077 A124924 A209271 * A355763 A124878 A085554
KEYWORD
nonn,more
AUTHOR
Brennan G. Benfield, Mar 03 2022
EXTENSIONS
a(7) from Michael S. Branicky, Oct 03 2024
STATUS
approved