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!)
A102602 a(n) = least k such that ((m+1)^k)*(m^k-1) - 1 is prime, with m = 2n+1, or 0 if no such k exists. 0

%I #13 Jul 30 2015 21:50:21

%S 1,1,1,1,4,1,1,50,1,1,2,4,1,1,3,1,1,1,2,9,1,4,1,1,9,36,1,158,45,1,1,

%T 10,4,1,1,3,1,1,3,5,2,6,2,1,3,1,2,2,4,2,1,15,1,4,8,2,2,1,1,1,14,5,1

%N a(n) = least k such that ((m+1)^k)*(m^k-1) - 1 is prime, with m = 2n+1, or 0 if no such k exists.

%C For n=64 (m=129), k > 2000 if k exists.

%C When k=1, the prime is of the form 4*n^2 + 4*n - 1 (or m^2 - 2).

%t f[n_] := Block[{k = 1}, While[ !PrimeQ[((n + 1)^k)*(n^k - 1) - 1], k++ ]; k]; Table[ f[n], {n, 3, 128, 2}] (* _Robert G. Wilson v_, Aug 06 2005 *)

%o (PARI) a(n) = {my(k = 1); my(m = 2*n+1); while(! isprime((m+1)^k*(m^k-1) - 1), k++;); k;} \\ _Michel Marcus_, Feb 06 2014

%K more,nonn

%O 1,5

%A _Pierre CAMI_, Jan 29 2005

%E Definition and comment edited by _Michel Marcus_, Feb 06 2014

%E a(27)=1 inserted by _Michel Marcus_, Feb 06 2014

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 August 14 04:31 EDT 2024. Contains 375146 sequences. (Running on oeis4.)