A227174 Numbers n such that (140^n + 139^n)/279 is prime.
23, 41, 43, 151, 2927, 6133
Offset: 1
Programs
-
PARI
is(n)=ispseudoprime((140^n+139^n)/279) \\ Charles R Greathouse IV, Jun 13 2017
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.
is(n)=ispseudoprime((140^n+139^n)/279) \\ Charles R Greathouse IV, Jun 13 2017
a(10) = 4 because (5^29 + 4^29)/9 = 2149818248341 is prime and (2^29 + 1^29)/3, (3^29 + 2^29)/5 and (4^29 + 3^29)/7 are all composite.
Table[p = Prime[n]; k = 1; While[q = ((b+1)^n+b^n)/(2*b+1); ! PrimeQ[q], k++]; k, {n, 200}] f[n_] := Block[{b = 1, p = Prime@ n}, While[! PrimeQ[((b +1)^p + b^p)/(2b +1)], b++]; b]; Array[f, 70, 2] (* Robert G. Wilson v, Jun 13 2018 *)
for(n=2, 200, b=0; until(isprime((((b+1)^prime(n)+b^prime(n))/(2*b+1))), b++); print1(b,", ")) \\ corrected by Eric Chen, Jun 06 2018
[p: p in PrimesUpTo(1000) | IsPrime((10^p+7^p) div 17)]; // Modified by Jinyuan Wang, Jan 22 2020
Select[Table[Prime[n], {n, 500}], PrimeQ[(10^#+7^#)/17] &] (* Modified by Jinyuan Wang, Jan 22 2020 *)
forprime(k=3, 10000, if(isprime((10^k+7^k)/17), print1(k, ", ")))
Comments