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.
%I A277583 #40 Nov 19 2024 22:11:35 %S A277583 1,4,1,10,5,2,4,14,1,12,3,2,3,9,1,31,2,1,15,7,5,6,2,3,12,20,1,19,11,2, %T A277583 2,5,3,4,9,1,1,15,1,54,1,1,20,4,3,12,1,6,7,3,4,11,1,2,16,10,1,22,6,2, %U A277583 1,3,2,3,14,1,1,9,1,2,13,1,1,2,2,17,5,1,11,28,2,7,1,10,4,15 %N A277583 Goldbach's problem extended to squares of prime gaps (>=2): smallest integer >= ((A078587(n) - A078496(n))^2)/n for n >= 4. %C A277583 Where A078587(n) + A078496(n) = 2n and A078587(n) < A078496(n). %e A277583 a(5) = 4 because ((A078587(5) - A078496(5))^2)/5 = ((3 - 7)^2)/5 < 4, where 3 (prime) = 7 (prime) = 2*5; %e A277583 a(6) = 1 because ((A078587(6) - A078496(6))^2)/6 = ((5 - 7)^2)/6 < 1, where 5 (prime) + 7 (prime) = 2*6; %e A277583 a(7) = 10 because ((A078587(7) - A078496(7))^2)/7 = ((3 - 11)^2)/7 < 10, where 3 (prime) + 11 (prime) = 2*7. %t A277583 Table[k = 1; While[k < ((Last@ # - First@ #)^2)/n, k++] &@ Block[{p = n + 1, q}, q = 2 n - p; While[q > 0 && Nand[PrimeQ@ p, PrimeQ@ q], p++; q--]; {p, q}]; k, {n, 4, 89}] (* or *) %t A277583 Table[Ceiling[4 (n - #)^2/n] &@ Block[{p = n + 1, q}, q = 2 n - p; While[q > 0 && Nand[PrimeQ@ p, PrimeQ@ q], p++; q--]; p], {n, 4, 89}] (* _Michael De Vlieger_, Oct 26 2016, after _T. D. Noe_ at A078587 and _Michel Marcus_ PARI *) %o A277583 (PARI) maxp(n) = {my(p = precprime(n-1)); while(!isprime(2*n-p), p = precprime(p-1)); p;} %o A277583 a(n) = ceil(4*(n - maxp(n))^2/n); \\ _Michel Marcus_, Oct 22 2016 %Y A277583 Cf. A002375, A078496, A078587, A277581 (Goldbach's problem extended to squares of prime gaps >= 0). %K A277583 nonn %O A277583 4,2 %A A277583 _Juri-Stepan Gerasimov_, Oct 22 2016