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.

Showing 1-2 of 2 results.

A123996 Smallest prime q such that the gap between q and the previous prime is a perfect power that has not occurred earlier as a gap.

Original entry on oeis.org

3, 11, 97, 1847, 5623, 9587, 89753, 396833, 3851587, 11981587, 70396589, 202551883, 1872852203, 10958688203, 47203303559, 767644375301, 8817792099037, 78610833115937, 497687231721941, 2069461000670881
Offset: 1

Views

Author

Walter Kehowski, Oct 31 2006

Keywords

Comments

So far the powers have occurred in numerical order. Here is the list of primes and powers: [11, 4], [97, 8], [1847, 16], [5623, 32], [9587, 36], [89753, 64], [396833, 100], [3851587, 128], [11981587, 144], [70396589, 196], [202551883, 216], [1872852203, 256], [10958688203, 324]. I have searched out to the prime p=26689111613.

Examples

			a(2)=97 since 97-prevprime(97)=97-89=8 is the first occurrence of 8 as a difference between successive primes.
		

Crossrefs

Programs

  • Maple
    with(numtheory); egcd := proc(n::posint) local L; if n>1 then L:=ifactors(n)[2]; L:=map(z->z[2],L); return igcd(op(L)) else return 1 fi end: P:={}; Q:=[]; p:=2; for w to 1 do for k from 0 do # keep track if k mod 10^6 = 0 then print(k,p) fi; lastprime:=p; q:=nextprime(p); d:=q-p; x:=egcd(d); if x>1 and not d in P then P:=P union {d}; Q:=[op(Q), [q,d]]; print(q,d); print(P); print(Q); fi ; p:=q; od od; # let it run with AutoSave enabled.
  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ@k, k++ ]; k]; perfectPowerQ[x_] := GCD @@ Last /@ FactorInteger@x > 1; dd = {1}; pp = {2}; qq = {3}; p = 3; Do[q = NextPrim@p; d = q - p; If[perfectPowerQ@d && !MemberQ[dd, d], Print@q; AppendTo[qq, q]; AppendTo[dd, d]]; p = q, {n, 10^7}]; qq (* Robert G. Wilson v, Nov 03 2006 *)

Formula

Next prime after A123995.

Extensions

Edited and extended by Robert G. Wilson v, Nov 03 2006, corrected Nov 04 2006
Definition corrected by M. F. Hasler, Oct 19 2018

A204813 Primes followed by a gap of 256 = nextprime(p)-p.

Original entry on oeis.org

1872851947, 2362150363, 2394261637, 2880755131, 2891509333, 3353981623, 3512569873, 3727051753, 3847458487, 4008610423, 4486630573, 4541745583, 4755895531, 4837532347, 5227869607, 5389475977, 6201260587, 6229685347, 6952228483, 7325665111, 7414468513
Offset: 1

Views

Author

M. F. Hasler, Jan 19 2012

Keywords

Crossrefs

Programs

  • PARI
    list_gaps(g=256,f,N=25,p=0)=for(c=1,N,while(g+p!=p=nextprime(p+1),);if(f,write(f".txt",c" ",p-g),print1(", "p-g)))

Extensions

a(8)-a(21) from Washington Bomfim
Showing 1-2 of 2 results.