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.

A133519 Smallest k such that p(n)^4 - k is prime where p(n) is the n-th prime.

This page as a plain text file.
%I A133519 #10 Nov 20 2023 10:12:53
%S A133519 3,2,6,2,2,2,24,14,18,2,8,8,2,2,12,2,2,24,24,38,2,8,2,54,12,2,12,12,
%T A133519 44,18,14,18,12,32,12,24,38,14,12,12,54,2,50,8,32,8,12,14,24,8,8,2,2,
%U A133519 12,18,30,50,12,2,24,12,2,32,2,84,12,8,12,8,74,14,18,2,20,24,14,2,14,14,2,18
%N A133519 Smallest k such that p(n)^4 - k is prime where p(n) is the n-th prime.
%H A133519 Harvey P. Dale, <a href="/A133519/b133519.txt">Table of n, a(n) for n = 1..1000</a>
%e A133519 p(3)=5, 5^4 = 625; for odd k and n > 1, p(n)^r - k is even and thus not prime, so we only need consider even k.
%e A133519 for k = 2: 625 - 2 = 623, which is 7 * 89 and not prime.
%e A133519 for k = 4: 625 - 4 = 621, which is 3^3 * 23, also not prime.
%e A133519 for k = 6: 625 - 6 = 619, which is prime, so 6 is the smallest number that can be subtracted from 625 to make another prime.
%e A133519 Hence a(3) = 6.
%t A133519 sk[p_]:=Module[{k=1,c=p^4},While[CompositeQ[c-k],k++];k]; sk/@Prime[Range[100]] (* _Harvey P. Dale_, Nov 19 2023 *)
%t A133519 Table[With[{c=p^4},c-NextPrime[c,-1]],{p,Prime[Range[100]]}] (* _Harvey P. Dale_, Nov 20 2023 *)
%Y A133519 Cf. A030814, A054271, A091666, A133517, A133518, A133520, A133521, A133522, (A001223).
%K A133519 easy,nonn
%O A133519 1,1
%A A133519 _Carl R. White_, Sep 14 2007