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!)
A243404 Least number k such that n^k - n^(k-1) - ... - n^2 - n - 1 is prime. 0
1, 1, 2, 1, 2, 1, 2, 2, 2, 1, 564, 1, 10, 2, 2, 1, 14, 1, 2, 2, 8, 1, 2, 5, 2, 3, 2, 1, 2, 1, 252, 3, 20, 2, 6, 1, 2, 2, 4, 1, 24, 1, 2, 2, 2, 1, 2, 3, 2, 17, 24, 1, 2, 2, 2, 3, 4, 1, 2, 1, 4, 11, 2, 2, 2, 1, 2, 555, 2, 1, 8, 1, 12, 3, 2, 3, 6, 1, 4, 6, 680, 1, 6, 2, 2, 3, 132 (list; graph; refs; listen; history; text; internal format)
OFFSET
3,3
COMMENTS
a(n) = 1 iff n-1 is prime.
LINKS
EXAMPLE
5^1 - 5^0 = 4 is not prime. 5^2 - 5^1 - 5^0 = 19 is prime. Thus a(5) = 2.
PROG
(PARI) a(n)=for(k=1, 10^3, if(ispseudoprime(n^k-sum(i=0, k-1, n^i)), return(k)))
n=1; while(n<100, print1(a(n), ", "); n++)
CROSSREFS
Sequence in context: A048684 A191613 A298642 * A219181 A347833 A260341
KEYWORD
nonn
AUTHOR
Derek Orr, Jun 04 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 05:02 EDT 2024. Contains 371235 sequences. (Running on oeis4.)