The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A243160 Least number k such that k^n - k^(n-1) + k^(n-2) - ... + (-1)^n is prime or 0 if no such k exists. 0
 3, 2, 2, 2, 0, 2, 0, 0, 0, 2, 0, 2, 0, 0, 0, 2, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 7, 0, 2, 0, 0, 0, 0, 0, 16, 0, 0, 0, 61, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 6, 0, 2, 0, 0, 0, 0, 0, 5, 0, 0, 0, 46, 0, 18, 0, 0, 0, 0, 0, 2, 0, 0, 0, 49, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 70 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS If n is in A006093, then a(n) is not 0. The only term where the converse is false is a(3) = 2. Also, 2 is the only such number that makes k^3 - k^2 + k - 1 prime. Otherwise, a(n) is not 0 iff n is in A006093. LINKS EXAMPLE 1^4 - 1^3 + 1^2 - 1^1 + 1 = 1 is not prime. 2^4 - 2^3 + 2^2 - 2^1 + 1 = 11 is prime. Thus a(4) = 2. PROG (PARI) a(n)=for(k=1, 1000, s=k^n; if(ispseudoprime(s+sum(i=1, n, (-1)^i*k^(n-i))), return(k))) n=1; while(n<100, print1(a(n), ", "); n+=1) CROSSREFS Cf. A006093. Sequence in context: A071048 A098054 A075801 * A272694 A292370 A116943 Adjacent sequences:  A243157 A243158 A243159 * A243161 A243162 A243163 KEYWORD nonn AUTHOR Derek Orr, May 31 2014 STATUS approved

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

Last modified January 23 07:07 EST 2020. Contains 331168 sequences. (Running on oeis4.)