cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A240235 Least number k such that k*n^k - 1 is prime. a(n) = 0 if no such number exists.

Original entry on oeis.org

3, 2, 1, 1, 8, 1, 2, 1, 10, 2, 2, 1, 2, 1, 2, 167, 2, 1, 12, 1, 2, 2, 29028, 1, 2, 3, 10, 2, 26850, 1, 8, 1, 42, 2, 6, 2, 24, 1, 2, 3, 2, 1, 2, 1, 2, 2, 140, 1, 2, 2, 22, 2, 8, 1, 2064, 2, 468, 6, 2, 1, 362, 1, 2, 2, 6, 3, 26, 1, 2, 3, 20, 1, 2, 1, 28, 2, 38, 5, 3024, 1, 2, 81, 858, 1
Offset: 1

Views

Author

Derek Orr, Apr 02 2014

Keywords

Comments

a(n) = 1 iff n-1 is prime.
a(145) is either 0 or > 275000. - Robert G. Wilson v, Jan 23 2017

Examples

			1*1^1 - 1 = 0 is not prime. 2*1^2 - 1 = 1 is not prime. 3*1^3 - 1 = 2 is prime. Thus, a(1) = 3.
		

Crossrefs

Programs

  • PARI
    a(n)=k=1;while(!ispseudoprime(k*n^k-1),k++);return(k); n=1;while(n<100,print(a(n));n+=1)

Extensions

a(23) and a(29) given using link. - Derek Orr, Aug 16 2014