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.

A138198 First occurrence of prime gaps which are squares.

This page as a plain text file.
%I A138198 #29 May 02 2025 07:59:04
%S A138198 2,7,1831,9551,89689,396733,11981443,70396393,1872851947,10958687879,
%T A138198 47203303159,767644374817,8817792098461,78610833115261,
%U A138198 497687231721157,2069461000669981,22790428875364879,78944802602538877,1799235198379903447,30789586795090405813
%N A138198 First occurrence of prime gaps which are squares.
%C A138198 More precisely, consider the possible squares which can occur as prime gaps: g_0=1, g_1=2^2, g_2=4^2, g_3=6^2, g_4=8^2, ... Then a(n) = smallest prime p(i) such that p(i+1)-p(i) = g_n, or a(n) = -1 if the gap g_n never occurs. - _N. J. A. Sloane_, Oct 28 2016
%H A138198 Thomas R. Nicely, <a href="https://faculty.lynchburg.edu/~nicely/gaps/gaplist.html">First occurrence prime gaps</a> [For local copy see A000101]
%H A138198 The Prime Gap List, <a href="https://primegap-list-project.github.io/lists/prime-gaps-first-occurrences/">First occurrence prime gaps</a>
%F A138198 a(n) = A000230(2*n^2). - _R. J. Mathar_, Feb 13 2025
%e A138198 Notes by Thomas R. Nicely:
%e A138198 No gap exceeding 1442 has been definitively established as a first occurrence; larger gaps included in these lists are instead first occurrences presently known of prime gaps. The smallest gap whose first occurrence remains uncertain is the (nonsquare) gap of 1208.
%e A138198 prime,gap
%e A138198 2, 1=1^2
%e A138198 7, 4=2^2
%e A138198 1831, 16=4^2
%e A138198 9551, 36=6^2
%e A138198 89689, 64=8^2
%e A138198 396733, 100=10^2
%e A138198 11981443, 144=12^2
%e A138198 70396393, 196=14^2
%e A138198 1872851947, 256=16^2
%e A138198 10958687879, 324=18^2
%e A138198 47203303159, 400=20^2
%e A138198 767644374817, 484=22^2
%e A138198 8817792098461, 576=24^2
%e A138198 78610833115261, 676=26^2
%e A138198 497687231721157, 784=28^2
%e A138198 2069461000669981, 900=30^2
%e A138198 22790428875364879, 1024=32^2
%e A138198 78944802602538877, 1156=34^2
%e A138198 2980374211158121907, 1296=36^2
%e A138198 18479982848279580912452968237, 1444=38^2
%e A138198 10338270318362067887873513954823823, 1600=40^2
%e A138198 5462539353768233509094313080601639583, 1764=42^2
%e A138198 9634432076725832064810529394509018411, 1936=44^2
%e A138198 24103660699017475735076387748469761375352177, 2116=46^2
%e A138198 1171872038536282864481405693168029955108099, (*48^2*)
%e A138198 169512938487733553802932479078305855585466971701227, (*50^2*)
%e A138198 228422210024736896126707605155690522381875250546666532046327, (*52^2*)
%e A138198 7229972437439469171089374324333535009566526827968927563, (*54^2*)
%e A138198 1263895714932859021916447978075625934206362807439043695674222113, (*56^2*)
%e A138198 569493611436727594340298806603382857255173440636060754222617328828425379, (*58^2*)
%e A138198 281376087412013738611508677824321032930454474305215907812114263492815921, (*60^2*)
%e A138198 680561565394793619717614472954048053005171290126070180152868857556290989645629867 (*62^2*)
%t A138198 Function[w, Prime@ First@ # & /@ Map[w[[ Key@ # ]] &, Select[Keys@ w, IntegerQ@ Sqrt@ # &]]]@ PositionIndex@ Differences@ Prime@ Range[10^7] (* _Michael De Vlieger_, Oct 27 2016 *)
%o A138198 (PARI) a(n)=my(k=max(1,4*(n-1)^2),p=2);forprime(q=3,,if(q-p==k,return(p));p=q) \\ _Charles R Greathouse IV_, Jun 05 2013
%K A138198 nonn
%O A138198 0,1
%A A138198 _Zak Seidov_, Mar 05 2008
%E A138198 Edited by _N. J. A. Sloane_, Oct 28 2016
%E A138198 Misprints in EXAMPLE fixed by _Zak Seidov_, Oct 18 2018
%E A138198 a(18)-a(19) from _Brian Kehrig_, May 02 2025