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.

A204894 Least prime p such that n divides p-q for some prime q

This page as a plain text file.
%I A204894 #17 Aug 31 2024 14:29:55
%S A204894 3,5,5,7,7,11,17,11,11,13,13,17,29,17,17,19,19,23,41,23,23,29,53,29,
%T A204894 53,29,29,31,31,37,67,37,71,37,37,41,79,41,41,43,43,47,89,47,47,53,97,
%U A204894 53,101,53,53,59,109,59,113,59,59,61,61,67,127,67,131,67,67,71
%N A204894 Least prime p such that n divides p-q for some prime q<p.
%C A204894 For a guide to related sequences, see A204892.
%H A204894 Charles R Greathouse IV, <a href="/A204894/b204894.txt">Table of n, a(n) for n = 1..10000</a>
%H A204894 Tony Haddad, Sun-Kai Leung, and Cihan Sabuncu, <a href="https://arxiv.org/abs/2408.11781">Visiting early at prime times</a>, arXiv preprint (2024). arXiv:2408.11781 [math.NT]
%F A204894 n + 2 <= a(n) <= prime(n+1). - _Charles R Greathouse IV_, Jul 17 2015
%F A204894 Haddad, Leung, & Sabuncu prove that a(n) < 270*n for all large n. Probably this holds for all n. - _Charles R Greathouse IV_, Aug 29 2024
%t A204894 (See the program at A204892.)
%o A204894 (PARI) a(n)=forprime(p=n+2, , forstep(k=p%n, p-1, n, if(isprime(k), return(p)))) \\ _Charles R Greathouse IV_, Mar 20 2013
%o A204894 (PARI) a(n)=if(isprime(n+2),return(n+2)); my(s=if(n%2,2*n,n),t); forprime(p=s+3,, t=p%n; forstep(q=if(t%2,t,t+n),p-s,s,if(isprime(q), return(p)))) \\ _Charles R Greathouse IV_, Jul 17 2015
%o A204894 (PARI) a(n)=if(isprime(n+2),return(n+2)); my(s=if(n%2,2*n,n),r); forprime(p=s+3,2*s+1, if(isprime(p-s), return(p))); forprime(p=2*s+3,, r=p%n; forstep(q=if(r%2,r,r+n),p-s,s,if(isprime(q), return(p)))) \\ _Charles R Greathouse IV_, Aug 31 2024
%Y A204894 Cf. A204892, A204903, A000040.
%K A204894 nonn
%O A204894 1,1
%A A204894 _Clark Kimberling_, Jan 20 2012