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

%I #10 Nov 29 2020 01:02:32

%S 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,

%T 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,

%U 3,0,3,2,0,2,317,0,3,103,0,2,7,0,3,2,0,2,43

%N Least number k>0 such that abs((3^k - (3-n)^k)/n) is prime, or 0 if no such prime exists.

%C a(-n) = A128033(n).

%C a(3*n) = 0 except a(3) = a(9) = 2.

%C All positive terms are primes.

%H Jinyuan Wang, <a href="/A128049/b128049.txt">Table of n, a(n) for n = 0..222</a>

%o (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

%Y 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).

%Y Cf. A111010, A128024, A128025, A128026, A128027, A128028, A128029, A128030, A128031, A128032.

%K nonn

%O 0,2

%A _Alexander Adamchuk_, Feb 12 2007

%E Name changed by _Jinyuan Wang_, Nov 28 2020

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 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)