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.

A254924 a(n) = (A060371(n) - A094998(n))/A056604(n) for n > 1, with a(1)=1.

Original entry on oeis.org

1, 0, 0, 1, 130, 1329, 1707670, 27502484, 209927657739, 130904517147542068, 3673771932850374193, 69623451054783204822486486, 3724616892817543661693877073170, 149157913707716515940392007441860, 12429106799179771738076359013310638297
Offset: 1

Views

Author

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

Keywords

Comments

Let theta(p) be the smallest nonnegative solution z to the system of congruences z == 0 (mod p), z == 1 (mod v(p-1)), where p is a prime and v(p-1) = lcm(1,...,p-1). Theta(p) is unique mod lcm(p, v(p-1)), therefore it is unique mod v(p). Since both (p-1)!+1 and theta(p) are solutions to these congruences, ((p-1)!+1 - theta(p))/v(p) is always an integer. The sequence lists the values of this ratio (assuming theta(2)=0 and p=prime(n)).

Examples

			For n=5, a(5) = (A060371(5) - A094998(5))/A056604(5) = (3628801 - 25201)/27720 = 130.
		

Crossrefs

Programs

  • Magma
    [(Factorial(p-1)+1-Modinv(p,Lcm([1..p-1]))*p)/Lcm([1..p]): p in PrimesUpTo(50)];
  • Maple
    with(numtheory): P:=proc(q)  local a,j,k,ok,n;  print(1); a:=[1];
    for n from 3 to q do k:=0; a:=[op(a),n]; if isprime(n) then ok:=0;  while ok=0 do ok:=1;
    k:=k+1; for j from 2 to n-1 do if not (k*n mod j)=1 then ok:=0; break; fi; od; od;
    print((((n-1)!+1)-k*n)/lcm(op(a))); fi; od; end: P(100); # Paolo P. Lava, Feb 16 2015
  • Mathematica
    r[k_] := LCM @@ Range[k]; s[k_] := PowerMod[k, -1, r[k - 1]] k; w[k_] := ((k - 1)! + 1 - s[k])/r[k]; Table[w[Prime[n]], {n, 1, 20}]

A024620 Positions of primes among the powers of primes (A000961).

Original entry on oeis.org

2, 3, 5, 6, 9, 10, 12, 13, 14, 17, 18, 20, 21, 22, 23, 25, 26, 27, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 44, 46, 47, 48, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 70, 72, 73, 74, 75, 76, 77, 78, 80, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91, 93, 94
Offset: 1

Views

Author

Keywords

Crossrefs

Complement of A024621.
Cf. A001222 (bigomega), A025474, A056604, A027883.

Programs

  • Haskell
    a024620 n = a024620_list !! (n-1)
    a024620_list = filter ((== 1) . a025474) [1..]
    -- Reinhard Zumkeller, May 01 2015
    
  • Mathematica
    a[n_] := PrimeOmega[LCM @@ Range@Prime@n] + 1; Array[a, 100] (* Amiram Eldar, Dec 02 2018 *)
  • PARI
    lista(nn) = my(powpr = select((i->((omega(i)==1) || (i==1))), [1..nn])); for (i = 1, #powpr, if (isprime(powpr[i]), print1(i, ", ")); ); \\ Michel Marcus, Jun 03 2021
    
  • Python
    from sympy import prime, primepi, integer_nthroot
    def A024620(n):
        x = prime(n)
        return n+1+sum(primepi(integer_nthroot(x,k)[0]) for k in range(2,x.bit_length())) # Chai Wah Wu, Nov 05 2024

Formula

A025474(a(n)) = 1. - Reinhard Zumkeller, May 01 2015
a(n) = A001222(A056604(n)) + 1. - Eric Desbiaux, Dec 02 2018
From Ridouane Oudra, Oct 18 2020: (Start)
a(n) = A027883(n) + 1;
a(n) = A025528(A000040(n)) + 1;
a(n) = A065515(A000040(n)). (End)

A329571 a(n) = Product_{prime p} p^floor(log_p P) with P = A329570(n) the least prime with log_p P >= valuation(n,p) for all primes p.

Original entry on oeis.org

2, 2, 6, 60, 60, 6, 420, 27720, 27720, 60, 27720, 60, 360360, 420, 60, 12252240, 12252240, 27720, 232792560, 60, 420, 27720, 5354228880, 27720, 2329089562800, 360360, 2329089562800, 420, 2329089562800, 60, 72201776446800, 5342931457063200, 27720, 12252240, 420, 27720, 5342931457063200, 232792560, 360360, 27720, 219060189739591200, 420, 9419588158802421600, 27720
Offset: 1

Views

Author

M. F. Hasler, Jan 03 2020

Keywords

Comments

Related to the inequality (54) in Ramanujan's paper about highly composite numbers (HCN) A002182, also used in A199337: This is the square root of the (not minimal) bound a(n)^2 above which all HCN are divisible by n, according to the right part of that inequality.
Like the highly composite numbers A002182, all terms in this sequence are a product of primorials.

Crossrefs

Cf. A329570, A002182 (highly composite numbers), A199337 (number of HCN not divisible by n), A003418 (lcm(1..n)), A056604 (lcm(1..prime(n))), A025487.

Programs

  • Mathematica
    a[n_] := Module[{P = NextPrime[Max[Power @@@ FactorInteger[n]] - 1], p}, p = Select[Range[P], PrimeQ]; Times @@ (p^Floor[Log[p, P]])]; a[1] = 2; Array[a, 50] (* Amiram Eldar, Jan 17 2025 *)
  • PARI
    apply( {A329571(n)=vecprod([p^logint(n,p)|p<-primes([2,n=A329570(n)])])}, [1..44])

Formula

a(n) = lcm([1..P]) = A003418(P) = A056604(i) with P = A329570(n), i = A000720(P).

A154524 Primes p such that lcm(1,2,3,...,p-2,p-1,p) - 1 is prime.

Original entry on oeis.org

3, 5, 7, 19, 23, 29, 47, 61, 97, 181, 233, 307, 401, 887, 1021, 1087, 1361, 1481, 2053, 2293, 5407, 5857, 11059, 14281, 27277, 27803, 36497, 44987, 53017
Offset: 1

Views

Author

Lekraj Beedassy, Jan 11 2009

Keywords

Comments

a(28) > 42000. - Daniel Suteu, Oct 06 2018
a(30) > 100000. - Michael S. Branicky, Jul 04 2025

Examples

			7 is in the sequence because it is prime and also lcm(1,2,3,4,5,6,7)-1 = 420-1 = 419 is prime. - _Emeric Deutsch_, Jan 16 2009
		

Crossrefs

Programs

  • Maple
    P := proc(n) options operator, arrow: ilcm(seq(j, j = 1 .. n)) end proc: a := proc(n) if isprime(n) and isprime(P(n)-1) then n else end if end proc: seq(a(n), n = 1 .. 3000); # Emeric Deutsch, Jan 16 2009

Formula

A057825 INTERSECT A000040. - R. J. Mathar, Jan 14 2009

Extensions

a(8)-a(17) from Ray Chandler, Jan 16 2009
a(18)-a(22) from Emeric Deutsch, Jan 16 2009
a(23)-a(27) from Daniel Suteu, Oct 06 2018
a(28)-a(29) from Michael S. Branicky, Jul 03 2025

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

A154525 Primes p such that lcm(1,2,3,...,p-2,p-1,p) + 1 is prime.

Original entry on oeis.org

2, 3, 5, 7, 19, 31, 47, 89, 127, 139, 2251, 3271, 4253, 4373, 4549, 5449, 13331, 37123, 55291
Offset: 1

Views

Author

Lekraj Beedassy, Jan 11 2009

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[1000], PrimeQ[#] && PrimeQ[LCM@@Range[#]+1] &] (* Amiram Eldar, Nov 21 2018 *)
  • PARI
    isok(p) = isprime(p) && (isprime(lcm(vector(p, i, i)) + 1)); \\ Michel Marcus, Oct 26 2013, Feb 25 2014

Formula

A049537 INTERSECT A000040. - Ray Chandler, Jan 16 2009

Extensions

a(1)=2 inserted and a(8)-a(18) from Ray Chandler, Jan 16 2009
a(19) from Daniel Suteu, Nov 21 2018

A154526 Primes p such that lcm(1,2,3,...,p-2,p-1,p) -+ 1 are both primes.

Original entry on oeis.org

3, 5, 7, 19, 47
Offset: 1

Views

Author

Lekraj Beedassy, Jan 11 2009

Keywords

Comments

Intersection of A154524 and A154525.

Crossrefs

Programs

  • PARI
    isok(p) = {if (! isprime(p), return (0)); lcmv = lcm(vector(p, i, i)); isprime(lcmv + 1) && isprime(lcmv - 1);} \\ Michel Marcus, Oct 26 2013

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.