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.

A378186 With p(n) = A002145(n) = n-th non-Pythagorean prime, a(n) is the least k such p(n) + k is a non-Pythagorean prime and 2 p(n) + k - 5 is a Pythagorean prime; and a(n) = 0 if there is no such k .

This page as a plain text file.
%I A378186 #5 Jan 14 2025 09:49:57
%S A378186 4,4,12,4,20,16,16,12,24,64,12,4,20,28,20,64,20,40,16,16,24,20,20,28,
%T A378186 16,16,12,68,12,20,40,100,4,36,16,12,20,100,4,36,20,72,4,48,16,12,24,
%U A378186 100,32,4,20,76,40,8,16,12,8,40,64,196,16,12,60,68,52,20
%N A378186 With p(n) = A002145(n) = n-th non-Pythagorean prime, a(n) is the least k such p(n) + k is a non-Pythagorean prime and 2 p(n) + k - 5 is a Pythagorean prime; and a(n) = 0 if there is no such k .
%e A378186 3 + 4 = 7, the least non-Pythagorean prime after 3,
%e A378186 and 3 + 7 - 5 = 5, a Pythagorean prime, so a(1) = 4.
%t A378186 s = Select[Prime[Range[450]], Mod[#, 4] == 3 &]
%t A378186 a[n_] := Select[Range[200],  MemberQ[s, s[[n]] + #] && PrimeQ[2 s[[n]] + # - 5] &, 1]
%t A378186 Flatten[Table[a[n], {n, 1, 140}]]
%Y A378186 Cf. A000041, A002144, A002145, A378187.
%K A378186 nonn
%O A378186 1,1
%A A378186 _Clark Kimberling_, Jan 13 2025