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.

A277124 Numbers k such that (k+1)*prime(k) + k is a prime.

This page as a plain text file.
%I A277124 #26 Jan 16 2023 06:12:26
%S A277124 1,2,3,5,6,8,9,11,13,14,20,21,26,29,30,33,35,36,39,41,43,49,54,55,62,
%T A277124 68,69,75,76,79,81,89,90,105,110,113,117,119,126,134,141,146,154,162,
%U A277124 174,176,178,179,186,191,195,207,209,215,216,222,225,227,230,231,234,237
%N A277124 Numbers k such that (k+1)*prime(k) + k is a prime.
%H A277124 Robert Israel, <a href="/A277124/b277124.txt">Table of n, a(n) for n = 1..10000</a>
%p A277124 p:= 1: count:= 0: Res:= NULL:
%p A277124 for n from 1 while count < 100 do
%p A277124   p:= nextprime(p);
%p A277124   if isprime(n*p+n+p) then
%p A277124     count:= count+1; Res:= Res, n
%p A277124   fi
%p A277124 od:
%p A277124 Res; # _Robert Israel_, Oct 25 2018
%t A277124 npQ[n_]:=Module[{p=Prime[n]},PrimeQ[n*p+n+p]]; Select[Range[250],npQ] (* _Harvey P. Dale_, Mar 27 2022 *)
%o A277124 (PARI) is(n) = isprime((n + 1) * (prime(n) + 1) - 1); \\ _Altug Alkan_, Oct 01 2016
%Y A277124 Cf. A000040, A086172.
%K A277124 nonn
%O A277124 1,2
%A A277124 _Alex Ratushnyak_, Sep 30 2016