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.

A360204 Primitive prime powers. p is a primitive prime power iff it is an odd prime power that exceeds the preceding odd prime power by more than any smaller odd prime power does. ('Prime power' defined in the sense of A246655.)

This page as a plain text file.
%I A360204 #25 Feb 02 2023 06:48:53
%S A360204 5,17,37,97,149,211,307,907,1151,1361,5623,8501,9587,15727,19661,
%T A360204 31469,156007,360749,370373,492227,1349651,1357333,2010881,4652507,
%U A360204 17051887,20831533,47326913,122164969,189695893,191913031,387096383,436273291,1294268779
%N A360204 Primitive prime powers. p is a primitive prime power iff it is an odd prime power that exceeds the preceding odd prime power by more than any smaller odd prime power does. ('Prime power' defined in the sense of A246655.)
%C A360204 Conjecture: Primitive prime powers are primes.
%e A360204 The first few terms of the sequence are the minuends in the following differences. The differences are strictly increasing by definition.
%e A360204   5 -   3 = 2;
%e A360204  17 -  13 = 4;
%e A360204  37 -  31 = 6;
%e A360204  97 -  89 = 8;
%e A360204 149 - 139 = 10;
%e A360204 211 - 199 = 12;
%e A360204 307 - 293 = 14;
%e A360204 907 - 887 = 20.
%e A360204 The example above might suggest the subtrahends are also prime. In general they are not, as the example a(10) shows, where 1361 - 1331 = 30, but 1331 is not prime. - _Ivan N. Ianakiev_, Feb 02 2023
%t A360204 a[1] = 5; candidates[n_] := Select[Range[NextPrime[n, -1], n], OddQ[#] && PrimePowerQ[#]&];
%t A360204 difference[n_] := candidates[n][[-1]] - candidates[n][[-2]];
%t A360204 a[n_] := a[n] = Module[{k = a[n-1]+2}, While[OddQ[k] && !PrimePowerQ[k] || difference[k] <= difference[a[n-1]], k = k+2]; k];
%t A360204 a/@Range[16] (* _Ivan N. Ianakiev_, Feb 02 2023 *)
%o A360204 (SageMath)
%o A360204 def A360204_list(n):
%o A360204     R = []; L = 3; MAX = 1
%o A360204     for C in xsrange(3, n, 2):
%o A360204         if C.is_prime_power():
%o A360204             if C - L > MAX:
%o A360204                 MAX = C - L
%o A360204                 R.append(C)
%o A360204             L = C
%o A360204     return R
%o A360204 print(A360204_list(6000))
%Y A360204 Cf. A246655, A061345.
%K A360204 nonn
%O A360204 1,1
%A A360204 _Peter Luschny_, Feb 01 2023