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.

A076981 Smallest k such that n*(n+1)*(n+2)*...*(n+k) is divisible by the product of primes up to n.

Original entry on oeis.org

0, 0, 1, 2, 1, 4, 3, 6, 5, 4, 4, 10, 9, 12, 11, 10, 9, 16, 15, 18, 17, 16, 15, 22, 21, 20, 19, 18, 17, 28, 27, 30, 29, 28, 27, 26, 25, 36, 35, 34, 33, 40, 39, 42, 41, 40, 39, 46, 45, 44, 43, 42, 41, 52, 51, 50, 49, 48, 47, 58, 57, 60, 59, 58, 57, 56, 55, 66, 65, 64, 63, 70, 69
Offset: 1

Views

Author

Amarnath Murthy, Oct 23 2002

Keywords

Examples

			a(8) = 6 as 8*9*10*11*12*13 is not divisible by 2*3*5*7 but 8*9*10*11*12*13*14 is.
		

Programs

  • Mathematica
    a[n_] := For[k = 0, True, k++, If[Divisible[Pochhammer[n, k+1], Times @@ Select[Range[2, n], PrimeQ]], Return[k]]]; Array[a, 73] (* Jean-François Alcover, Oct 07 2016 *)
  • PARI
    a(n)=if(n<0,0,k=0; while(prod(i=0,k,n+i)%prod(v=1,precprime(n),if(isprime(v),v,1))>0,k++); k)

Formula

For any n, a(n)0, a(A049591(k)+3)=A049591(k)-3 etc. - Benoit Cloitre, Oct 24 2002

Extensions

More terms from Benoit Cloitre, Oct 24 2002
Offset corrected by Sean A. Irvine, Apr 24 2025