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.
%I A264747 #21 Oct 10 2018 13:51:13 %S A264747 1,5,7,9,16,17,31,32,127,128,256,257,8191,8192,65536,65537,131071, %T A264747 131072,524287,524288,2147483647,2147483648,2305843009213693951, %U A264747 2305843009213693952,618970019642690137449562111 %N A264747 Prime powers n such that either n - 1 or n + 1 is a prime power, but not both. %C A264747 From _Robert Israel_, Nov 25 2015: (Start) %C A264747 By Mihailescu's theorem, the only case where n-1 and n are both in A025475 is n=9. Thus for n > 9 the sequence consists of the following: %C A264747 n = 2^p - 1 and 2^p where 2^p-1 is a Mersenne prime (A000668); %C A264747 n = 2^(2^m) and 2^(2^m)+1 where 2^(2^m)+1 is a Fermat prime (A019434). %C A264747 (End) %H A264747 Robert Israel, <a href="/A264747/b264747.txt">Table of n, a(n) for n = 1..42</a> %e A264747 7 is in this sequence because 7 and 7 + 1 = 8 are both prime power, but 7 - 1 = 6 is not a prime power. %p A264747 fermats:= {seq(2^(2^m)+1, m=1..4)}: %p A264747 mersennes:= {seq(numtheory:-mersenne([i]), i=2..14)}: %p A264747 R:= fermats union map(`-`,fermats,1) union mersennes union map(`+`,mersennes,1): %p A264747 sort(convert(R union {1,9} minus {2,3,4,8},list)); # _Robert Israel_, Nov 25 2015 %o A264747 (PARI) is(k) = isprimepower(k) || k==1; %o A264747 for(k=1, 1e6, if(is(k) && is(k-1) + is(k+1) == 1, print1(k, ", "))) \\ _Altug Alkan_, Nov 23 2015 %Y A264747 Cf. A000668, A000961, A019434, A164512, A174269. %K A264747 nonn %O A264747 1,2 %A A264747 _Juri-Stepan Gerasimov_, Nov 23 2015