login
Smallest of exactly n consecutive integers divisible respectively by the first n primes.
12

%I #20 Jun 20 2015 10:50:59

%S 4,2,8,158,3098,788,210998,5316098,34415168,703693778,194794490678,

%T 5208806743928,138782093170508,5006786309605868,253579251611336438,

%U 12551374903381164638,142908008812141343558,77053322014980646906358

%N Smallest of exactly n consecutive integers divisible respectively by the first n primes.

%C a(n) often equals A069561(n).

%C For n>2, a(n) == 8 (mod 30). - _Robert G. Wilson v_, Oct 30 2014

%C For n<1000 a(n)>a(n+1) when n = 1, 5, 90. - _Robert G. Wilson v_, Oct 30 2014

%H Robert Israel, <a href="/A072562/b072562.txt">Table of n, a(n) for n = 1..320</a>

%F If A069561(n+1) = A069561(n), then a(n) = A069561(n) + A002110(n). Otherwise, then a(n) = A069561(n). - _David Wasserman_, Oct 21 2004

%F a(n) = A069561(n) or A069561(n) + A002110(n), hence log a(n) << n log n. - _Charles R Greathouse IV_, Jun 20 2015

%e 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.

%e 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

%p A:= proc(n)

%p local r;

%p if n = 1 then return 4 fi;

%p r:= chrem([seq(-i,i=0..n-1)],[seq(ithprime(i),i=1..n)]);

%p if r + n mod ithprime(n+1) = 0 then r + mul(ithprime(i),i=1..n) else r fi

%p end proc:

%p seq(A(n),n=1..50); # _Robert Israel_, Oct 29 2014

%t 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 *)

%o (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

%Y Cf. A073606, A073607, A072555, A069561.

%K nonn

%O 1,1

%A _Robert G. Wilson v_, Aug 06 2002

%E More terms from _David Wasserman_, Oct 21 2004