A072562 Smallest of exactly n consecutive integers divisible respectively by the first n primes.
4, 2, 8, 158, 3098, 788, 210998, 5316098, 34415168, 703693778, 194794490678, 5208806743928, 138782093170508, 5006786309605868, 253579251611336438, 12551374903381164638, 142908008812141343558, 77053322014980646906358
Offset: 1
Keywords
Examples
a(4)=158 because 158 is the least number such that 158, 159, 160 and 161 are divisible by 4 consecutive primes, namely 2, 3, 5 and 7 respectively. a(5) does not equal A069561(5)=788 because 788 is the smallest integer in a run of 6 (not 5) consecutive integers that are divisible respectively by the first 6 consecutive primes. - _Geoffrey Critzer_, Oct 29 2014
Links
- Robert Israel, Table of n, a(n) for n = 1..320
Programs
-
Maple
A:= proc(n) local r; if n = 1 then return 4 fi; r:= chrem([seq(-i,i=0..n-1)],[seq(ithprime(i),i=1..n)]); if r + n mod ithprime(n+1) = 0 then r + mul(ithprime(i),i=1..n) else r fi end proc: seq(A(n),n=1..50); # Robert Israel, Oct 29 2014
-
Mathematica
f[n_] := Block[{p = Prime@ Range@ n}, r = ChineseRemainder[-Range@ n + 1, p]; If[ Mod[r + n, Prime[n + 1]] == 0, r + Times @@ p, r]]; f[1] = 4; Array[f, 20] (* Robert G. Wilson v, Oct 30 2014 *)
-
PARI
a(n)=if(n==1,return(4)); my(m=chinese(vector(n, k, Mod(1-k, prime(k)))), p=prime(n+1), t=lift(m)); if((t+n)%p, t, t+m.mod) \\ Charles R Greathouse IV, Jun 20 2015
Formula
If A069561(n+1) = A069561(n), then a(n) = A069561(n) + A002110(n). Otherwise, then a(n) = A069561(n). - David Wasserman, Oct 21 2004
a(n) = A069561(n) or A069561(n) + A002110(n), hence log a(n) << n log n. - Charles R Greathouse IV, Jun 20 2015
Extensions
More terms from David Wasserman, Oct 21 2004
Comments