A224470 Numbers k such that 7^k - k is prime.
2, 6, 8, 12, 44, 48, 512, 1088, 1104, 6038
Offset: 1
Programs
-
PARI
forstep(n=2,10^4,2,if(ispseudoprime(7^n-n),print1(n,", "))); /* Joerg Arndt, Apr 07 2013 */
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.
forstep(n=2,10^4,2,if(ispseudoprime(7^n-n),print1(n,", "))); /* Joerg Arndt, Apr 07 2013 */
import java.math.BigInteger; public class A224471 { public static void main (String[] args) { BigInteger b8 = BigInteger.valueOf(8); BigInteger m = BigInteger.valueOf(64); for(long n=1; ; n+=2) { BigInteger b = b8.subtract(BigInteger.valueOf(n)); if (b.isProbablePrime(2)) { if (b.isProbablePrime(80)) System.out.printf("%d\n", n); } b8 = b8.multiply(m); } } }
forstep(n=1,10^4,2,if(ispseudoprime(8^n-n),print1(n,", "))); /* Joerg Arndt, Apr 07 2013 */
[a: n in [0..400] | IsPrime(a) where a is 6^n-n ];
Select[Table[6^n - n, {n, 400}], PrimeQ[#] &]
Select[Range[1000], PrimeQ[9^# - #] &] (* Alonso del Arte, Apr 11 2013 *)
is(n)=ispseudoprime(9^n-n) \\ Charles R Greathouse IV, Jun 13 2017
Comments