A257568 The least prime p such that the highest power of 3 that divides p^2 + 2 is n.
3, 2, 13, 5, 59, 751, 1237, 6053, 10427, 36671, 1532579, 351599, 356989, 12048691, 105931211, 96365273, 190612867, 18425983, 1014695321, 8763105101, 20385719771, 7508555437, 97094976593, 1911292838383, 22999364895631, 46158586887073, 6373306898393
Offset: 0
Keywords
Examples
a(0) = 3 because 3^2+2=11 not divisible by 3, a(18) = 1014695321 because 1014695321^2+2 = 3^18*2657594587, a(21) = 7508555437 because 7508555437^2+2 = 3^21*17*317042521.
Links
- Hiroaki Yamanouchi, Table of n, a(n) for n = 0..500
Crossrefs
Cf. A257567.
Programs
-
PARI
a(n)=if(n==1, return(2)); my(k=3^n,m=1,p); while(!issquare(m*k-2,&p) || !isprime(p), m+=2; if(m%3==0, m+=2)); p \\ Charles R Greathouse IV, May 01 2015
Extensions
a(16) corrected and a(22)-a(26) added by Hiroaki Yamanouchi, May 03 2015