cp's OEIS Frontend

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.

A120430 Greater of prime powers that differ by 1. In other words, numbers k such that k-1 and k are prime powers.

This page as a plain text file.
%I A120430 #8 Oct 05 2024 14:04:36
%S A120430 2,3,4,5,8,9,17,32,128,257,8192,65537,131072,524288,2147483648,
%T A120430 2305843009213693952,618970019642690137449562112,
%U A120430 162259276829213363391578010288128
%N A120430 Greater of prime powers that differ by 1. In other words, numbers k such that k-1 and k are prime powers.
%C A120430 See comments in A006549.
%F A120430 a(n) = A006549(n) + 1. - _Michel Marcus_, Aug 25 2013
%t A120430 Join[{2},Select[Range[0,10^6],PrimePowerQ[#]&&PrimePowerQ[#-1]&]] (* _James C. McMahon_, Oct 05 2024 *)
%o A120430 (PARI) isokp(n) = (n==1) || isprime(n) || (ispower(n, ,&k) && isprime(k));
%o A120430 isok(n) = isokp(n) && isokp(n-1); \\ _Michel Marcus_, Aug 25 2013
%Y A120430 Cf. A006549.
%K A120430 nonn
%O A120430 1,1
%A A120430 _Greg Huber_, Jul 13 2006