login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A070858 Smallest prime == 1 mod L, where L = LCM of 1 to n. 6

%I #20 Dec 05 2013 19:55:19

%S 2,3,7,13,61,61,421,2521,2521,2521,55441,55441,4324321,4324321,

%T 4324321,4324321,85765681,85765681,232792561,232792561,232792561,

%U 232792561,10708457761,10708457761,26771144401,26771144401,401567166001

%N Smallest prime == 1 mod L, where L = LCM of 1 to n.

%C Beginning with 3, smallest prime p = a(n) such that p + k is divisible by k + 1 for each k = 1, 2, ..., n. For example: 61 --> 62, 63, 64, 65 and 66 are divisible respectively by 2, 3, 4, 5 and 6. - _Robin Garcia_, Jul 23 2012

%H R. J. Mathar, <a href="/A070858/b070858.txt">Table of n, a(n) for n = 1..200</a>

%p A070858 := proc(n)

%p local l,p;

%p l := ilcm(seq(i,i=1..n)) ;

%p for p from 1 by l do

%p if isprime(p) then

%p return p;

%p end if;

%p end do:

%p end proc; # _R. J. Mathar_, Jun 25 2013

%o (PARI) a(n)=my(L=lcm(vector(n,i,i)),k=1);while(!ispseudoprime(k+=L),); k \\ _Charles R Greathouse IV_, Jun 25 2013

%Y Cf. A060357, A075059, A003418, A070844 to A070856, A035091.

%K nonn

%O 1,1

%A _Amarnath Murthy_, May 16 2002

%E More terms from _Sascha Kurz_, Feb 02 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 07:53 EDT 2024. Contains 371964 sequences. (Running on oeis4.)