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-4 of 4 results.

A099795 Least common multiple of 1, 2, 3, ..., prime(n)-1.

Original entry on oeis.org

1, 2, 12, 60, 2520, 27720, 720720, 12252240, 232792560, 80313433200, 2329089562800, 144403552893600, 5342931457063200, 219060189739591200, 9419588158802421600, 3099044504245996706400, 164249358725037825439200, 9690712164777231700912800
Offset: 1

Views

Author

Ray Chandler, Oct 29 2004

Keywords

Comments

Alternative definition: a(n) = Product{i = 1..(n-1)}prime(i)^e_i, where prime(i)^e_i is the greatest power of prime(i) which does not exceed prime(n). Every term is a product of prime powers, and also of primorial powers(the greatest of which is A002110(n-1); see Example and A053589). - David James Sycamore, Oct 24 2024

Examples

			For n = 7, prime(7) = 17, using the alternative definition (see Comment), a(7) = 2^4*3^2*5^1*7^1*11^1*13^1 = 16*9*5*7*11*13 = 720720 = 24*30030 = 2^2*6*30030 = A002110(1)^2*A002110(2)*A002110(6). - _David James Sycamore_, Oct 24 2024
		

Crossrefs

Programs

  • Magma
    [Lcm([2..p-1]): p in PrimesUpTo(70)]; // Bruno Berselli, Feb 06 2015
  • Maple
    Primes:= select(isprime, [2,$3..100]):
    seq(ilcm($2..Primes[i]-1),i=1..nops(Primes)); # Robert Israel, Jul 19 2016
  • Mathematica
    LCM@@Range[#]&/@(Prime[Range[20]]-1) (* Harvey P. Dale, Jan 30 2015 *)

Formula

a(n) = (A094998(n)-1) / A099796(n).
a(n) = A038610(A000040(n)). - Anthony Browne, Jul 19 2016
Rad(a(n)) = A007947(a(n)) = A002110(n-1). - David James Sycamore, Oct 24 2024

Extensions

a(18) from Bruno Berselli, Feb 06 2015

A094998 a(n) is smallest positive integer multiple of n-th prime, say k*prime(n), such that k*prime(n) == 1 (mod j) for each integer j with 1 < j < prime(n).

Original entry on oeis.org

2, 3, 25, 301, 25201, 83161, 7207201, 49008961, 698377681, 2248776129601, 39594522567601, 2599263952084801, 160287943711896001, 4381203794791824001, 386203114510899285601, 130159869178331861668801
Offset: 1

Views

Author

Mark Troll (mtroll(AT)u.washington.edu), Oct 22 2004

Keywords

Examples

			For n = 1 there are no such j, so the condition is vacuously satisfied and we can take k=1, getting a(1)=2. - _N. J. A. Sloane_, Feb 10 2015
		

Crossrefs

Programs

  • Magma
    /* By definition (slow): */
    S:=[]; for n in [1..9] do k:=1; while not forall{j: j in [2..NthPrime(n)-1] | IsOne(k*NthPrime(n) mod j)} do k:=k+1; end while; Append(~S, k*NthPrime(n)); end for; S; /* or */
    [p eq 2 select p else Modinv(p, Lcm([1..p-1]))*p: p in PrimesUpTo(60)]; // Bruno Berselli, Feb 08 2015
    
  • Mathematica
    a[1] = 2; a[2] = 3; a[n_] := Module[{p, m, r, r0, r1}, p = Prime[n]; m = LCM @@ Range[2, p - 1]; r = Reduce[k > 0 && p*k + m*j == 1, {k, j}, Integers]; r0 = r /. C[] -> 0; r1 = r /. C[] -> 1; If[r0 === False, r1[[1, 2]], Min[r0[[1, 2]], r1[[1, 2]]]]*p]; Table[a[n], {n, 1, 20}] (* Jean-François Alcover, Feb 09 2015 *)
  • PARI
    a(n) = {p=prime(n); k=1; for(n=2, p-1, k=lcm(k,n)); for(j=1, p, if((j*k+1)/p==ceil((j*k+1)/p), t=j*k+1; break())); return(t);} \\ Dimitri Papadopoulos, Dec 28 2018

Formula

a(n) = A099795(n) * A099796(n) + 1 = A099794(n) * prime(n).
log(a(n)) = prime(n) (approximately, empirical observation). - Dimitri Papadopoulos, Dec 27 2018

Extensions

Edited and extended by Ray Chandler, Oct 29 2004
Added "positive" to definition. - N. J. A. Sloane, Feb 10 2015

A099794 a(n) = smallest integer k such that k*prime(n) == 1 mod j for each integer j with 1

Original entry on oeis.org

1, 1, 5, 43, 2291, 6397, 423953, 2579419, 30364247, 77544004469, 1277242663471, 70250377083373, 3909462041753561, 101888460343995907, 8217087542785091183, 2455846588270412484317, 38974424104246263663539
Offset: 1

Views

Author

Ray Chandler, Oct 29 2004

Keywords

Crossrefs

Programs

  • Magma
    /* By definition (slow): */
    S:=[]; for n in [1..9] do k:=1; while not forall{j: j in [2..NthPrime(n)-1] | IsOne(k*NthPrime(n) mod j)} do k:=k+1; end while; Append(~S, k); end for; S; /* or */
    [p eq 2 select 1 else Modinv(p, Lcm([1..p-1])): p in PrimesUpTo(60)];// Bruno Berselli, Feb 08 2015
  • Mathematica
    a[1] = a[2] = 1; a[n_] := Module[{p, m, r, r0, r1}, p = Prime[n]; m = LCM @@ Range[2, p-1]; r = Reduce[k>0 && p*k + m*j == 1, {k, j}, Integers]; r0 = r /. C[] -> 0; r1 = r /. C[] -> 1 ; If[r0 === False, r1[[1, 2]], Min[r0[[1, 2]], r1[[1, 2]]]]]; Table[a[n], {n, 1, 20}] (* Jean-François Alcover, Feb 09 2015 *)

Formula

a(n) = A094998(n) / prime(n).

A059955 a(n) = floor( prime(n)!/lcm(1..prime(n)) ) modulo prime(n).

Original entry on oeis.org

1, 2, 5, 10, 3, 10, 4, 3, 28, 17, 18, 30, 20, 41, 42, 14, 19, 30, 37, 63, 50, 7, 12, 83, 30, 91, 19, 69, 91, 97, 56, 22, 80, 39, 137, 44, 9, 154, 19, 37, 141, 141, 168, 126, 183, 200, 205, 136, 55, 95, 204, 126, 213, 230, 68, 63, 158, 202, 162, 102, 182, 104, 38, 165
Offset: 2

Views

Author

Lekraj Beedassy, Mar 13 2001

Keywords

Comments

a(n) gives also the smallest coefficient for which the multiple M of lcm(1 through p(n)-1) satisfies p(n) divides M + 1. This computes the solution of the puzzle requiring the smallest number such that grouping in 2's, 3's, etc. up to the n-th prime,all leave a remainder of one except the last which leaves no remainder.

Examples

			a(2)=1 because prime(2)=3 and floor(3!/lcm(1,2,3)) mod 3 = 1 mod 3 = 1;
a(3)=2 because prime(3)=5 and floor(5!/lcm(1,2,3,4,5)) mod 5 = 2 mod 5 = 2;
a(4)=5 because prime(4)=7 and floor(7!/lcm(1,2,3,4,5,6,7)) mod 7 = 12 mod 7 = 5;
a(7)=10 because prime(7)=17 and floor(17!/lcm(1,2,...,17)) mod 17 = 29030400 mod 17 = 10.
		

Crossrefs

Programs

  • Magma
    [Floor( Factorial(p)/Lcm([1..p]) ) mod p: p in PrimesInInterval(3,400)]; // Bruno Berselli, Feb 08 2015
  • Maple
    for n from 2 to 150 do printf(`%d,`, floor(ithprime(n)!/ilcm(i $ i=1..ithprime(n))) mod ithprime(n) ); od:

Extensions

More terms from James Sellers, Mar 15 2001
Showing 1-4 of 4 results.