login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Numbers n such that prime(n) modulo n is less than n/2.
1

%I #14 Sep 08 2022 08:45:54

%S 1,5,6,7,8,12,13,14,15,16,17,18,21,31,32,33,34,35,36,37,38,39,40,41,

%T 42,43,44,45,46,47,69,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,

%U 89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108

%N Numbers n such that prime(n) modulo n is less than n/2.

%C The sequence consists largely of long runs of consecutive integers. However, there are also a few isolated integers such that the distance to both neighbor terms is greater than 1: 21, 69, 181, 1052, 4137, 4142, 6466, 63424, 100362.

%e 1 is a term because prime(1) mod 1 = 2 mod 1 = 0 < 1/2; 5 is a term because prime(5) mod 5 = 11 mod 5 = 1 < 5/2; 6 is a term because prime(6) mod 6 = 13 mod 6 = 1 < 6/2.

%o (PARI) for(n=1,300,prime(n)%n<n/2&print1(n","))

%o (Magma) [ n: n in [1..120] | NthPrime(n) mod n lt n/2 ];

%Y Cf. companion sequence A178462.

%K nonn

%O 1,2

%A _Zak Seidov_, Dec 23 2010