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.

A167186 Record gaps between nonprime prime powers.

Original entry on oeis.org

3, 4, 7, 9, 17, 40, 41, 74, 151, 307, 312, 408, 424, 912, 1032, 1217, 1872, 2518, 3713, 4920, 5208, 8400, 8520, 8892, 9297, 12840, 16008, 21840, 24360, 35880, 38808, 80760, 102168, 129480, 167160, 183960, 201072, 258720, 290760, 301242, 358848, 375468, 415920
Offset: 1

Views

Author

Michael B. Porter, Oct 29 2009, Oct 31 2009, Nov 03 2009

Keywords

Examples

			17 is in the sequence since A025475(9) - A025475(8) = 49 - 32 = 17, and no previous gap is larger.
A025475(10) - A025475(9) = 64 - 49 = 15, but the previous gap is larger, so 15 is not in the sequence.
		

Crossrefs

List of nonprime prime powers: A025475.
Gaps between nonprime prime powers: A053707.
Record gaps between prime powers including primes: A121492.

Programs

  • Mathematica
    Join[{3},DeleteDuplicates[Differences[Select[Range[10^6],PrimePowerQ[#] && !PrimeQ[ #]&]], GreaterEqual]] (* Harvey P. Dale, Feb 28 2023 *)
  • PARI
    isA025475(n) = (omega(n) == 1 & !isprime(n)) || (n == 1)
    d_max=0;n_prev=1;for(n=2,32e6,if(isA025475(n),d=n-n_prev;n_prev=n;if(d>d_max,print(d);d_max=d)))