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.

A090125 a(n) is the least positive integer such that nextprime(a(n)^n) - prevprime(a(n)^n) = 4.

This page as a plain text file.
%I A090125 #17 Sep 03 2019 21:13:37
%S A090125 5,3,2,2,411,195,2,392,141,105,1161,909,69,3243,171,370,1659,165,
%T A090125 26289,1065,8541,19593,43521,1323,84651,25767,25641,7029,63009,693,
%U A090125 231,957,2601,7137,368265,14769,8169,13071,23679,45,13875,6693,136611,34869,55725,4887,231,1935,730071,10305
%N A090125 a(n) is the least positive integer such that nextprime(a(n)^n) - prevprime(a(n)^n) = 4.
%H A090125 Daniel Suteu, <a href="/A090125/b090125.txt">Table of n, a(n) for n = 1..100</a>
%e A090125 with q-p=4,q,p are primes:
%e A090125 n=1:a(1)=5 because {p=3,a(1)^1=5,q=5};
%e A090125 n=7:a(7)=2 because {p=127,a(7)^7=128, q=131};
%e A090125 n=10:a(10)=105 because {p=c-2,c=a(10)^10=162889462677744140625,q=c+2}
%t A090125 Table[fla=1;Do[If[((PrimeQ[s=n^k-3]&&PrimeQ[s1=n^k+1]) ||(PrimeQ[s=n^k-2]&&PrimeQ[s1=n^k+2])||(PrimeQ[s=n^k-1] &&PrimeQ[s1=n^k+3]))&&Equal[fla, 1]&&!Equal[n, 1], Print[{n, p, n^k, q, {k}}];fla=0], {n, 1, 1000000}], {k, 1, 60}]
%o A090125 (PARI) a(n) = {my(k=1); while (nextprime(k^n+1) - precprime(k^n-1) != 4, k++); k;} \\ _Michel Marcus_, Sep 03 2019
%o A090125 (PARI) f(k,r) = ispseudoprime(k-r) && ispseudoprime(k-r+4);
%o A090125 a(n) = for(k=1, oo, my(t=k^n); if((f(t,1) || f(t,2) || f(t,3)) && nextprime(t+1)-precprime(t-1)==4, return(k))); \\ _Daniel Suteu_, Sep 03 2019
%Y A090125 Cf. A090121, A090122, A090123, A090124.
%K A090125 nonn
%O A090125 1,1
%A A090125 _Labos Elemer_, Jan 12 2004
%E A090125 a(2) corrected and a(45)-a(50) from _Daniel Suteu_, Sep 03 2019