A109904 a(1) = 5. a(n+1) is the greatest prime of the form k*(a(n)-k) + 1. The least prime occurs for k = 1 and a(n+1) = a(n) in that case if no other value of k gives a prime then the sequence terminates.
5, 7, 13, 43, 463, 53593, 718052371, 128899801874680399, 4153789730832965126116749598699801, 4313492281993349218329412357362100514520987205269104143837429352069
Offset: 1
Keywords
Examples
a(2) = 2*3 + 1 = 7, a(3) = 3*4 + 1 = 13.
Links
- Jinyuan Wang, Table of n, a(n) for n = 1..13
Programs
-
PARI
{ b(n)=forstep(k=n\2,1,-1,if(isprime(k*(n-k)+1),return(k*(n-k)+1)));return(0) } s=5;while(1,print1(s, ", ");s=b(s)) \\ Max Alekseyev, Oct 04 2005
Extensions
More terms from Max Alekseyev, Oct 04 2005
Comments