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.

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

This page as a plain text file.
%I A070858 #28 Mar 15 2025 11:29:58
%S A070858 2,3,7,13,61,61,421,2521,2521,2521,55441,55441,4324321,4324321,
%T A070858 4324321,4324321,85765681,85765681,232792561,232792561,232792561,
%U A070858 232792561,10708457761,10708457761,26771144401,26771144401,401567166001,401567166001,18632716502401,18632716502401
%N A070858 Smallest prime == 1 mod L, where L = LCM of 1 to n.
%C A070858 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 A070858 Amiram Eldar, <a href="/A070858/b070858.txt">Table of n, a(n) for n = 1..1000</a> (terms 1..200 from R. J. Mathar)
%p A070858 A070858 := proc(n)
%p A070858     local l,p;
%p A070858     l := ilcm(seq(i,i=1..n)) ;
%p A070858     for p from 1 by l do
%p A070858         if isprime(p) then
%p A070858             return p;
%p A070858         end if;
%p A070858     end do:
%p A070858 end proc; # _R. J. Mathar_, Jun 25 2013
%t A070858 a[n_] := Module[{m = 1, lcm = LCM @@ Range[n]}, While[!PrimeQ[m], m += lcm]; m]; Array[a, 30] (* _Amiram Eldar_, Mar 15 2025 *)
%o A070858 (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 A070858 Cf. A060357, A075059, A003418, A070844 to A070856, A035091.
%K A070858 nonn
%O A070858 1,1
%A A070858 _Amarnath Murthy_, May 16 2002
%E A070858 More terms from _Sascha Kurz_, Feb 02 2003