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

A099796 a(n) = (A094998(n)-1) / A099795(n).

Original entry on oeis.org

1, 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, 119
Offset: 1

Views

Author

Ray Chandler, Oct 29 2004

Keywords

Crossrefs

Cf. A059955. [From R. J. Mathar, Sep 02 2008]

A254939 a(n) = (A099795(n)^-1 mod p)*A099795(n), where p = prime(n).

Original entry on oeis.org

1, 4, 36, 120, 2520, 277200, 5045040, 183783600, 4655851200, 80313433200, 32607253879200, 2743667504978400, 58772246027695200, 5038384364010597600, 56517528952814529600, 34089489546705963770400, 7391221142626702144764000
Offset: 1

Views

Author

Bruno Berselli, Feb 12 2015 - proposed by Umberto Cerruti (Department of Mathematics "Giuseppe Peano", University of Turin, Italy)

Keywords

Comments

The sequence lists the smallest nonnegative solutions z to the system of congruences z == 1 (mod p), z == 0 (mod v(p-1)), where p is a prime and v(p-1) = lcm(1,...,p-1).

Examples

			5045040 is the seventh term of the sequence because the modular inverse of A099795(7) mod A000040(7) is 7 and 7*A099795(7) = 7*720720 = 5045040.
		

Crossrefs

Programs

  • Magma
    [Modinv(Lcm([1..p-1]),p)*Lcm([1..p-1]): p in PrimesUpTo(60)];
    
  • Maple
    with(numtheory): P:=proc(q)  local a, n;  a:=[];
    for n from 1 to q do a:=[op(a),n]; if isprime(n+1) then
    print(lcm(op(a))*(lcm(op(a))^(-1) mod (n+1))); fi;
    od; end: P(10^3); # Paolo P. Lava, Feb 16 2015
  • Mathematica
    r[k_] := LCM @@ Range[k]; u[k_] := PowerMod[r[k - 1], -1, k] r[k - 1]; Table[u[Prime[n]], {n, 1, 20}]
  • PARI
    a099795(n) = lcm(vector(prime(n)-1, k, k));
    a(n) = {my(m = a099795(n)); m*lift(1/Mod(m, prime(n)));} \\ Michel Marcus, Feb 13 2015

Formula

a(n) = A255010(n)*A099795(n).

A255010 a(n) = A099795(n)^-1 mod prime(n).

Original entry on oeis.org

1, 2, 3, 2, 1, 10, 7, 15, 20, 1, 14, 19, 11, 23, 6, 11, 45, 42, 37, 34, 10, 29, 76, 77, 14, 71, 12, 88, 40, 22, 30, 75, 115, 59, 110, 14, 113, 154, 13, 154, 142, 40, 50, 25, 71, 16, 11, 18, 91, 174, 138, 35, 115, 38, 27, 195, 206, 113, 75, 119, 181, 111, 203
Offset: 1

Views

Author

Bruno Berselli, Feb 13 2015 - proposed by Umberto Cerruti (Department of Mathematics "Giuseppe Peano", University of Turin, Italy)

Keywords

Comments

By the definition, a(n)*A099795(n) == 1 (mod prime(n)).
a(n) is 1 with the primes 2, 11, 29, 787, 15773 (see A178629).

Crossrefs

Programs

  • Magma
    [Modinv(Lcm([1..p-1]),p): p in PrimesUpTo(400)];
    
  • Maple
    with(numtheory): P:=proc(q)  local a, n;  a:=[];
    for n from 1 to q do a:=[op(a),n]; if isprime(n+1) then print(lcm(op(a))^(-1) mod (n+1)); fi;
    od; end: P(10^3); # Paolo P. Lava, Feb 16 2015
  • Mathematica
    r[k_] := LCM @@ Range[k]; t[k_] := PowerMod[r[k - 1], -1, k]; Table[t[Prime[n]], {n, 1, 70}]
  • PARI
    a(n) = lift(1/Mod(lcm(vector(prime(n)-1, k, k)), prime(n))); \\ Michel Marcus, Feb 13 2015
  • Sage
    [inverse_mod(lcm([1..p-1]),p) for p in primes(400)]
    

Formula

a(n) = A254939(n)/A099795(n).

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).

A354882 a(n) is the smallest number k that is divisible by all numbers d with d < p = prime(n), and such that all of k+1, k-1, k+p, k-p are prime.

Original entry on oeis.org

12, 60, 93240, 2383920, 298378080, 5133688560, 73329656400, 2168462696400, 1215784751781600, 150901712773812000, 133573286426580000, 657837749787992373600, 10597036678652724300000, 2761248653283183065402400, 2053281233421697855815439200
Offset: 3

Views

Author

Florian Baur, Jun 10 2022

Keywords

Comments

Suggested by Charles Kusniec on the mersenneforum.org message board (see "Links" section): a number c(n) = k(n) + r(n), where k(n) = m * A099795(n), r(n) = {-1, 1, p, -p} and p = prime(n), is not divisible by any d with d < p and the density of primes among c(n) is expected to be higher than for random numbers of that magnitude.
The probability that an arbitrary c(n) is prime is higher than that of an arbitrary number of the same magnitude. Let t(n) denote that probability, then t(n) = 1/(((1/2)*(2/3)*(4/5)*(6/7)*...*(prime(n-1)-1)/prime(n-1)) * log(c(n))). According to Mertens's third theorem the value asymptotically approaches 1/((e^gamma/log(prime(n-1))) * log(c(n))). log(c(n)) can be approximated as prime(n-1). This yields t(n) ~ log(prime(n-1))/(e^gamma*prime(n-1)). The probability that c(n) is prime for a random value of m is t(n)^4. Thus, the sequence is expected to grow with (prime(n-1)/log(prime(n-1)))^4*A099795(n). For n < 201 the arithmetic mean of m(n)*t(n)^4 is 1.1. - Florian Baur, Jul 12 2023
For all n < 171, a(n) > a(n-1) with the exception of a(11) < a(10). This occurs whenever m(n-1) > prime(n) * m(n).
The principle can be extended to r(n,i) = {-1,1,-p,p,-q_i,q_i} where q_i = prime(n+i). Such a sequence b for i = 1 would have b(3) = 12, as 5, 7, 11, 13, 17, 19 are all prime. This is the only number k for which all three of k+-1, k+-5, and k+-7 are prime. To satisfy the first requirement for k > 6, we need k == {0, 2, 8} (mod 10). Under this condition, one of k-5 or k+-7 will be divisible by 5. Since 12 - 7 = 5 is the only prime that is divisible by 5, k = 12 is the only k satisfying the condition.
If q, with a(n) + 1 < q < a(n) + prime(n)^2, is prime, the difference r(n) = q - a(n) is also prime. Proof: Per definition a(n) is divisible by all d < prime(n). It follows that, if r is divisible by any d, then so is q = a(n) + r, whence q is not prime. Thus, if q is prime, then r is either also prime or only has prime factors f >= prime(n), i.e., r >= prime(n)^2. See "Fortunate Numbers" (A005235).
There is no a(1) and a(2). Since prime(1) = 2, both k+1 and k+2 need to be prime. This is only true for k = 1, but 1 - 1 = 0 is not prime. For a(2) we have prime(2) = 3 and one of k+1, k-1, k+3 is divisible by 3.

Examples

			a(3): The 3rd prime is 5. The smallest number divisible by all d < 5 is 12. Since 12 - 1 = 11, 12 + 1 = 13, 12 + 5 = 17, 12 - 5 = 7 are all prime, a(3) = 12.
a(5): The 5th prime is 11. The smallest number divisible by all d < 11 is 2520. However, 2520 - 1 = 2519 is not prime. The smallest number satisfying all conditions is 93240, since 93240 - 1, 93240 + 1, 93240 + 11, 93240 - 11 are all prime and 93240 is divisible by all d < 11. Thus, a(5) = 93240.
		

Programs

  • PARI
    A354882(n) = { my(s = 1, p = prime(n), c = lcm([1..p-1])); while(!(isprime(s*c+1) & isprime(s*c-1) & isprime(s*c+p) & isprime(s*c-p)), s++); return(s*c)} \\ Florian Baur, Jul 17 2023

Formula

a(n) = m(n) * A099795(n). Specifically, m(3) = m(4) = 1. For all other n < 201, 25 < m(n) < 333054037 and m(n) cannot have prime(n) as a factor. - Florian Baur, Jul 12 2023

A377356 a(n) = Product{i = 1..(n-1)} prime(i)^e_i, where prime(i)^e_i is the smallest power of prime(i) which exceeds prime(n).

Original entry on oeis.org

1, 4, 72, 1800, 529200, 64033200, 21643221600, 6254891042400, 2258015666306400, 17917354312141284000, 15068494976510819844000, 28961647344853795740168000, 39648495215104846368289992000, 66649120456591246745095476552000, 123234223724237215231681536144648000, 1905570801447880059127491593404692024000
Offset: 1

Views

Author

David James Sycamore, Oct 26 2024

Keywords

Comments

a(n) is the product of powers of primes p, for all p < prime(n), where each prime power is the smallest which exceeds prime(n), (compare with A099795). Every term may be expressed as a product of primorial powers, (A002110(n-1)^2 being the greatest primorial power divisor of a(n)).
From Michael De Vlieger, Oct 26 2024: (Start)
This sequence adds 1 to all exponents of prime power factors of A099795(n) for n > 1.
Proper subset of A001694, all terms are powerful. (End)

Examples

			For n = 5, a(5) = 529200, since prime(5) = 11, thus we have 2^4*3^3*5^2*7^2 = 16*27*25*49 = 529200. We may express this instead as 210*2520 = A002110(4)*A099795(5) = 210^2*6^1*2^1 = 529200.
From _Michael De Vlieger_, Oct 26 2024: (Start)
Table of first 12 terms showing exponents of prime power factors of a(n), where "." represents 0.
                                    Exponents of primes
                                            1 1 1 1 2 2 3
   n                          a(n)  2 3 5 7 1 3 7 9 3 9 1
  -------------------------------------------------------
   1                            1   . . . . . . . . . . .
   2                            4   2 . . . . . . . . . .
   3                           72   3 2 . . . . . . . . .
   4                         1800   3 2 2 . . . . . . . .
   5                       529200   4 3 2 2 . . . . . . .
   6                     64033200   4 3 2 2 2 . . . . . .
   7                  21643221600   5 3 2 2 2 2 . . . . .
   8                6254891042400   5 3 2 2 2 2 2 . . . .
   9             2258015666306400   5 3 2 2 2 2 2 2 . . .
  10         17917354312141284000   5 4 3 2 2 2 2 2 2 . .
  11      15068494976510819844000   5 4 3 2 2 2 2 2 2 2 .
  12   28961647344853795740168000   6 4 3 2 2 2 2 2 2 2 2 (End)
		

Crossrefs

Programs

  • Mathematica
    Array[Product[Prime[i]^(1 + Floor[Log[Prime[i], Prime[#]]]), {i, # - 1}] &, 12] (* Michael De Vlieger, Oct 26 2024 *)

Formula

a(n) = A002110(n-1)*A099795(n); A007947(a(n)) = rad(a(n)) = A002110(n-1).

Extensions

More terms from Michael De Vlieger, Oct 26 2024

A109923 a(n) = lcm(1,2,3,...,prime(n))/(1 + 2 + ... + prime(n)).

Original entry on oeis.org

1, 4, 15, 420, 3960, 80080, 1225224, 19399380, 5354228880, 145568097675, 7600186994400, 254425307479200, 9957281351799600, 392482839950100900, 114779426083185063200, 5474978624167927514640, 312603618218620377448800
Offset: 2

Views

Author

Amarnath Murthy, Jul 16 2005

Keywords

Examples

			a(4)=15 because the 4th prime is 7 and lcm(1,2,3,4,5,6,7)/(1+2+3+4+5+6+7) = 420/28 = 15.
		

Crossrefs

Programs

  • Maple
    a:=n->lcm(seq(i,i=1..ithprime(n)))/sum(j,j=1..ithprime(n)): seq(a(n),n=2..20); # Emeric Deutsch, Jul 16 2005
  • PARI
    a(n) = lcm(vector(prime(n), k, k))/sum(k=1, prime(n), k); \\ Michel Marcus, Mar 07 2018

Formula

a(n) = A099795(n)/A006254(n-1). - Andrey Zabolotskiy, Mar 07 2018
a(n) = A056604(n)/A034953(n). - Michel Marcus, Mar 07 2018

Extensions

More terms from Emeric Deutsch, Jul 16 2005
Showing 1-8 of 8 results.