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.

A162566 Those primes p where (q-p) divides (p+1), where q is the least prime > p.

This page as a plain text file.
%I A162566 #18 Aug 06 2023 17:11:46
%S A162566 2,3,5,7,11,17,19,23,29,41,43,47,53,59,67,71,79,83,101,103,107,127,
%T A162566 131,137,139,149,163,167,173,179,191,197,223,227,233,239,251,257,263,
%U A162566 269,281,293,307,311,347,353,359,379,383,409,419,431,439,443,461,463,467
%N A162566 Those primes p where (q-p) divides (p+1), where q is the least prime > p.
%H A162566 Harvey P. Dale, <a href="/A162566/b162566.txt">Table of n, a(n) for n = 1..1000</a>
%e A162566 The 17th prime is 59 and the 18th prime is 61. (61-59) = 2, and 2 divides 59+1 = 60. So 59 is in the sequence.
%t A162566 For[n = 1, n <= 1000, n++, If[Mod[Prime[n] + 1, Prime[n + 1] - Prime[n]] == 0, Print[Prime[n]]]] (* Jasper Mulder (jasper.mulder(AT)planet.nl), Jul 15 2009 *)
%t A162566 Select[Partition[Prime[Range[100]],2,1],Divisible[#[[1]]+1,#[[2]]-#[[1]]]&][[;;,1]] (* _Harvey P. Dale_, Aug 06 2023 *)
%Y A162566 Cf. A162565.
%K A162566 nonn
%O A162566 1,1
%A A162566 _Leroy Quet_, Jul 06 2009
%E A162566 More terms from Jasper Mulder (jasper.mulder(AT)planet.nl), Jul 15 2009