login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A128049 Least number k>0 such that abs((3^k - (3-n)^k)/n) is prime, or 0 if no such prime exists. 2
0, 2, 3, 2, 2, 3, 0, 3, 2, 2, 3, 2, 0, 2, 3, 0, 3, 2, 0, 2, 37, 0, 3, 2, 0, 2, 1153, 0, 83, 2, 0, 3, 11, 0, 3, 2, 0, 2, 3, 0, 557, 19, 0, 2, 3, 0, 7, 2, 0, 2, 631, 0, 5, 2, 0, 3, 3, 0, 239, 2, 0, 5, 3, 0, 3, 2, 0, 2, 317, 0, 3, 103, 0, 2, 7, 0, 3, 2, 0, 2, 43 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
a(-n) = A128033(n).
a(3*n) = 0 except a(3) = a(9) = 2.
All positive terms are primes.
LINKS
PROG
(PARI) a(n) = my(p=3); if(isprime(abs(n-6)), 2, if(n%3, while(!ispseudoprime((3^p-(3-n)^p)/n), p=nextprime(p+1)); p, 0)); \\ Jinyuan Wang, Nov 28 2020
CROSSREFS
Cf. A128033 (least number k>0 such that ((n+3)^k - 3^k)/n is prime), A028491 (numbers n such that (3^n - 1)/2 is prime).
Sequence in context: A145390 A270026 A340703 * A104543 A054988 A143393
KEYWORD
nonn
AUTHOR
Alexander Adamchuk, Feb 12 2007
EXTENSIONS
Name changed by Jinyuan Wang, Nov 28 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 00:30 EDT 2024. Contains 371917 sequences. (Running on oeis4.)