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.)

Original entry on oeis.org

5, 17, 37, 97, 149, 211, 307, 907, 1151, 1361, 5623, 8501, 9587, 15727, 19661, 31469, 156007, 360749, 370373, 492227, 1349651, 1357333, 2010881, 4652507, 17051887, 20831533, 47326913, 122164969, 189695893, 191913031, 387096383, 436273291, 1294268779
Offset: 1

Views

Author

Peter Luschny, Feb 01 2023

Keywords

Comments

Conjecture: Primitive prime powers are primes.

Examples

			The first few terms of the sequence are the minuends in the following differences. The differences are strictly increasing by definition.
  5 -   3 = 2;
 17 -  13 = 4;
 37 -  31 = 6;
 97 -  89 = 8;
149 - 139 = 10;
211 - 199 = 12;
307 - 293 = 14;
907 - 887 = 20.
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
		

Crossrefs

Programs

  • Mathematica
    a[1] = 5; candidates[n_] := Select[Range[NextPrime[n, -1], n], OddQ[#] && PrimePowerQ[#]&];
    difference[n_] := candidates[n][[-1]] - candidates[n][[-2]];
    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];
    a/@Range[16] (* Ivan N. Ianakiev, Feb 02 2023 *)
  • SageMath
    def A360204_list(n):
        R = []; L = 3; MAX = 1
        for C in xsrange(3, n, 2):
            if C.is_prime_power():
                if C - L > MAX:
                    MAX = C - L
                    R.append(C)
                L = C
        return R
    print(A360204_list(6000))