OFFSET
1,1
COMMENTS
From R. J. Mathar, Jul 22 2015: (Start)
10 is not in the sequence because 10^k-2 is even and 10^k-1 is divisible by 3 (because 10^k mod 3 = 1 as 10 mod 3 = 1). 16 is not in the sequence because 16^k-2 is even and 16^k-1 is divisible by 3 (because 16^k mod 3 = 1 as 16 mod 3 = 1). For the same reason almost all even numbers of the form 3m+1 (A016957) are absent, the only exception being 4, as 4^1-1 is a prime.
36 is not in the sequence because 36^k-1 is even and 36^k-1 is divisible by 5 (because 36^k mod 5 = 1 as 36 mod 5 = 1). This reasoning excludes all terms of A017341 (except for 6, as 6^1-1 is prime) from this sequence. With the same methology we can fish for (and exclude) even numbers of the form m*p+1 for primes p >= 3. (End)
EXAMPLE
2 is not in this sequence because 2^2 - 1 = 3 and 2^2 - 2 = 2 are both prime.
3 is in this sequence because 3^1 - 1 = 2 (prime) and 3^1 - 2 = 1 (nonprime) or 3^2 - 1 = 5 (prime) and 3^2 - 2 = 4 (nonprime).
PROG
(PARI) is(n)=n>2 && if(n%2, 1, isprime(n-1)) \\ Charles R Greathouse IV, Jun 03 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Juri-Stepan Gerasimov, May 23 2015
STATUS
approved