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.

Showing 1-3 of 3 results.

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

Original entry on oeis.org

0, 2, 3, 2, 5, 4, 7, 6, 5, 5, 11, 10, 13, 12, 11, 10, 17, 16, 19, 18, 17, 16, 23, 22, 21, 20, 19, 18, 29, 28, 31, 30, 29, 28, 27, 26, 37, 36, 35, 34, 41, 40, 43, 42, 41, 40, 47, 46, 45, 44, 43, 42, 53, 52, 51, 50, 49, 48, 59, 58, 61, 60, 59, 58, 57, 56, 67, 66, 65, 64, 71, 70
Offset: 1

Views

Author

Amarnath Murthy, Sep 20 2002

Keywords

Examples

			a(6) = 4 as (6+1)*(6+2)*(6+3)*(6+4) is divisible by 2*3*5 but (6+1)*(6+2)*(6+3) is not.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{div, k, pr}, div=Times@@Prime/@Range[PrimePi[n]]; For[k=0; pr=1, True, k++; pr*=n+k, If[Mod[pr, div]==0, Return[k]]]]

Formula

If p <= n < q, where p and q are consecutive primes, then a(n) = 2p-n, unless n=10. Sketch of proof: a(n) >= 2p-n, to make (n+1)...(n+a(n)) divisible by p. If r is a prime less than p and r does not divide (n+1)...(2p), then r > 2p-n and 2r <= n, so 4p < 3n < 3q. But q/p is known to be < 4/3 for all primes p >= 11.

Extensions

Edited by Dean Hickerson, Oct 28 2002

A075366 Smallest product (n+1)(n+2)...(n+k) that is divisible by the product of all the primes up to n.

Original entry on oeis.org

1, 12, 120, 30, 30240, 5040, 17297280, 2162160, 240240, 360360, 28158588057600, 2346549004800, 64764752532480000, 4626053752320000, 308403583488000, 19275223968000, 830034394580628357120000, 46113021921146019840000
Offset: 1

Views

Author

Amarnath Murthy, Sep 20 2002

Keywords

Crossrefs

Programs

  • Haskell
    a075366 n = a075366_list !! (n-1)
    a075366_list = 1 : f 2 1 a000040_list where
       f x pp ps'@(p:ps)
         | p <= x    = f x (p * pp) ps
         | otherwise = g $ dropWhile (< pp) $ scanl1 (*) [x+1, x+2 ..]
         where g (z:zs) | mod z pp == 0 = z : f (x + 1) pp ps'
                        | otherwise     = g zs
    -- Reinhard Zumkeller, May 18 2015
  • Mathematica
    a75365[n_] := Module[{div, k, pr}, div=Times@@Prime/@Range[PrimePi[n]]; For[k=0; pr=1, True, k++; pr*=n+k, If[Mod[pr, div]==0, Return[k]]]]; a[n_] := Times@@Range[n+1, n+a75365[n]]

Formula

If p <= n < q, where p and q are consecutive primes, then a(n) = (2p)!/n!, unless n=10.

Extensions

Edited by Dean Hickerson, Oct 28 2002

A075368 Smallest integer value of lcm(n+1, n+2, ..., n+k) (for k >= 0) divided by the product of all the primes up to n.

Original entry on oeis.org

1, 6, 10, 5, 84, 84, 1716, 858, 286, 286, 100776, 100776, 891480, 891480, 891480, 445740, 282861360, 282861360, 550835280, 550835280, 550835280, 550835280, 42222721680, 42222721680, 8444544336, 8444544336, 2814848112, 2814848112
Offset: 1

Views

Author

Amarnath Murthy, Sep 20 2002

Keywords

Examples

			a(3) = 10 as the product of primes <= (n = 3) is 6 and the smallest integer of the form lcm(3+1, 3+2, ..., 3+k) = lcm(4, 5, 6) = 60 giving a(3) = 60/6 = 10. - _David A. Corneth_, Dec 05 2023
		

Crossrefs

Programs

  • Mathematica
    a75365[n_] := Module[{div, k, pr}, div=Times@@Prime/@Range[PrimePi[n]]; For[k=0; pr=1, True, k++; pr*=n+k, If[Mod[pr, div]==0, Return[k]]]]; a[1]=1; a[n_] := LCM@@Range[n+1, n+a75365[n]]/Times@@Prime/@Range[PrimePi[n]]
  • PARI
    a(n) = {if(n==1, return(1));
    	my(pp = vecprod(primes(primepi(n))), l = n+1);
    	for(k = n+2, 2*n,
    		l = lcm(l, k);
    		if(l%pp == 0,
    			return(l\pp)
    		)
    	)
    } \\ David A. Corneth, Dec 05 2023

Formula

a(n) = A075367(n)/A034386(n).

Extensions

Edited by Dean Hickerson, Oct 28 2002
Showing 1-3 of 3 results.