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-10 of 378 results. Next

A180000 a(n) = lcm{1,2,...,n} / swinging_factorial(n) = A003418(n) / A056040(n).

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 3, 3, 12, 4, 10, 10, 30, 30, 105, 7, 56, 56, 252, 252, 1260, 60, 330, 330, 1980, 396, 2574, 286, 2002, 2002, 15015, 15015, 240240, 7280, 61880, 1768, 15912, 15912, 151164, 3876, 38760, 38760, 406980, 406980, 4476780, 99484, 1144066
Offset: 0

Views

Author

Peter Luschny, Aug 17 2010

Keywords

Comments

Characterization: Let e_{p}(m) denote the exponent of the prime p in the prime factorization of m and [.] denote the Iverson bracket, then
e_{p}(a(n)) = Sum_{k>=1} [floor(n/p^k) is even].
This implies, among other things, that no prime > floor(n/2) can divide a(n). The prime exponents e_{2}(a(2n)) give Guy Steele's sequence GS(5,3) A080100.
Asymptotics: log a(n) ~ n(1 - log 2). It is conjectured that log a(n) ~ n(1 - log 2) + O(n^{1/2+eps}) for all eps > 0.
Bounds: A056040(floor(n/3)) <= a(n) <= A056040(floor(n/2)) if n >= 285.

Crossrefs

Programs

  • Maple
    a := proc(n) local A014963, k;
    A014963 := proc(n) if n < 2 then 1 else numtheory[factorset](n);
    if 1 < nops(%) then 1 else op(%) fi fi end;
    mul(A014963(k)*(k/2)^((-1)^k), k=1..n)/2^n end;
    # Also:
    A180000 := proc(n) local lcm, sf;
    lcm := ilcm(seq(i,i=1..n));
    sf := n!/iquo(n,2)!^2;
    lcm/sf end;
  • Mathematica
    a[0] = 1; a[n_] := LCM @@ Range[n] / (n! / Floor[n/2]!^2); Table[a[n], {n, 0, 46}] (* Jean-François Alcover, Jul 23 2013 *)
  • PARI
    L=1; X(n)={ ispower(n, , &n);if(isprime(n),n,1); }
    Y(n)={ a=X(n); b=if(bitand(1,n),a,a*(n/2)^2); L=(b*L)/n; }
    A180000_list(n)={ L=1; vector(n,m,Y(m)); }  \\ for n>0
    
  • Sage
    def Exp(m,n) :
        s = 0; p = m; q = n//p
        while q > 0 :
            if is_even(q) :
                s = s + 1
            p = p * m
            q = n//p
        return s
    def A180000(n) :
        A = [1,1,1,1,2,2,3,3,12]
        if n < 9 : return A[n]
        R = []; r = isqrt(n)
        P = Primes(); p = P.first()
        while p <= n//2 :
            if p <= r : R.append(p^Exp(p,n))
            elif p <= n//3 :
                if is_even(n//p) : R.append(p)
            else : R.append(p)
            p = P.next(p)
        return mul(x for x in R)

Formula

a(n) = 2^(-n)*Product_{1<=k<=n} A014963(k)*(k/2)^((-1)^k).

A049536 Primes of the form lcm(1, ..., n) + 1 = A003418(n) + 1.

Original entry on oeis.org

2, 3, 7, 13, 61, 421, 2521, 232792561, 26771144401, 72201776446801, 442720643463713815201, 718766754945489455304472257065075294401, 6676878045498705789701874602220118271269436344024536001
Offset: 1

Views

Author

Keywords

Examples

			Lcm(9) + 1 = lcm(10) + 1 = 2521, a prime.
		

Crossrefs

Subsequence of A070858.

Programs

  • Mathematica
    Select[Table[LCM@@Range[n]+1,{n,150}],PrimeQ]//Union (* Harvey P. Dale, May 31 2017 *)
  • PARI
    N=1; print1(2); for(n=1,1e3, if(isprimepower(n,&p), N*=p; if(isprime(N+1), print1(", "N+1)))) \\ Charles R Greathouse IV, Nov 18 2015

A064859 Decimal expansion of sum of reciprocals of lcm(1..n) = A003418(n).

Original entry on oeis.org

1, 7, 8, 7, 7, 8, 0, 4, 5, 6, 1, 7, 2, 4, 6, 6, 5, 4, 6, 0, 6, 4, 9, 3, 4, 3, 2, 6, 0, 2, 5, 6, 6, 2, 7, 9, 4, 5, 9, 3, 9, 6, 1, 7, 4, 7, 2, 9, 6, 9, 6, 0, 8, 3, 7, 2, 5, 3, 0, 2, 6, 9, 9, 2, 9, 2, 2, 8, 9, 0, 2, 3, 5, 0, 8, 2, 2, 3, 2, 6, 1, 5, 5, 2, 8, 3, 3, 6, 8, 7, 8, 0, 8, 5, 6, 9, 7, 9, 7, 9, 9, 4, 6, 9, 5
Offset: 1

Views

Author

Labos Elemer, Oct 08 2001

Keywords

Comments

This constant is irrational (Erdős and Graham, 1980). - Amiram Eldar, Apr 13 2020

Examples

			1.7877804561724665460649343260256627945939617472969608372530269929228902350...
		

Crossrefs

Programs

  • Mathematica
    f[n_] := LCM @@ Range@ n; RealDigits[Plus @@ (1/Array[f, 255]), 10, 111][[1]] (* Robert G. Wilson v, Jul 11 2011 *)
  • PARI
    suminf(k=1, 1/lcm(vector(k, j, j))) \\ Michel Marcus, Mar 11 2018

Formula

Equals Sum_{j>=1} 1/lcm(1..j).

A049537 Values of k for which A075059(k) = A003418(k) + 1 is prime.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 9, 10, 19, 20, 21, 22, 25, 26, 31, 47, 48, 89, 90, 91, 92, 93, 94, 95, 96, 127, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 1369, 1370, 1371, 1372, 2251, 2252, 2253, 2254, 2255, 2256, 2257, 2258, 2259, 2260, 2261, 2262, 2263, 2264, 2265, 2266, 3271, 3272, 3273, 3274, 3275, 3276, 3277, 3278, 3279, 3280, 3281, 3282, 3283, 3284, 3285, 3286, 3287
Offset: 1

Views

Author

Keywords

Examples

			8 is not in the sequence because A075059(8) = 1 + A003418(8) = 1 + lcm(1, 2, ..., 8) = 841 = 29^2 is not prime.
127 is in the sequence because A075059(127) = 1 + A003418(127) = 1 + lcm(1, 2, ..., 127) = 6676878045498705789701874602220118271269436344024536001 is prime.
		

Crossrefs

Programs

  • Mathematica
    Join[{0}, Select[Range[250], PrimeQ[LCM@@Range[#]+1]&]] (* Harvey P. Dale, Nov 15 2011 *)
  • PARI
    isok(n) = isprime(lcm(vector(n, i, i))+1); \\ Michel Marcus, Feb 25 2014

Extensions

a(43)-a(57) from Ray Chandler, Jan 16 2009
a(1)=0 prepended and a(58)-a(86) added by Max Alekseyev, Sep 04 2015

A075059 a(n) = 1 + lcm(1, 2, ..., n) = 1 + A003418(n).

Original entry on oeis.org

2, 2, 3, 7, 13, 61, 61, 421, 841, 2521, 2521, 27721, 27721, 360361, 360361, 360361, 720721, 12252241, 12252241, 232792561, 232792561, 232792561, 232792561, 5354228881, 5354228881, 26771144401, 26771144401, 80313433201, 80313433201
Offset: 0

Views

Author

Amarnath Murthy, Sep 08 2002

Keywords

Comments

Consider the triangle in which the n-th row contains the second run of n consecutive numbers such that the r-th term is divisible by r. Sequence gives the first column of the triangle. The first run trivially begins with 1.
Also the smallest of n consecutive integers (with the first greater than 1) divisible respectively by 1, 2, 3, ..., n. - Robert G. Wilson v, Oct 30 2014
Also the smallest number m > 1 such that m == 1 (mod i) for all 1 <= i <= n. - Franz Vrabec, Aug 18 2023

Examples

			First column of the triangle A075061:
   2;
   3,  4;
   7,  8,  9;
  13, 14, 15, 16;
  61, 62, 63, 64, 65;
  61, 62, 63, 64, 65, 66;
  ...
		

Crossrefs

Programs

Formula

a(n) = 1 + A003418(n).

Extensions

New definition from Vladeta Jovovic, Jun 16 2003
Edited by N. J. A. Sloane, Jul 01 2008 at the suggestion of R. J. Mathar
a(0)=2 prepended by Max Alekseyev, Sep 04 2015

A133232 Triangle T(n,k) read by rows with a minimum number of prime powers A100994 for which the least common multiple of T(n,1),..,T(n,n) is A003418(n).

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 1, 1, 3, 4, 1, 1, 3, 4, 5, 1, 1, 3, 4, 5, 1, 1, 1, 3, 4, 5, 1, 7, 1, 1, 3, 1, 5, 1, 7, 8, 1, 1, 1, 1, 5, 1, 7, 8, 9, 1, 1, 1, 1, 5, 1, 7, 8, 9, 1, 1, 1, 1, 1, 5, 1, 7, 8, 9, 1, 11, 1, 1, 1, 1, 5, 1, 7, 8, 9, 1, 11, 1, 1, 1, 1, 1, 5, 1, 7, 8, 9, 1, 11, 1, 13, 1, 1, 1, 1, 5, 1, 7, 8, 9, 1, 11, 1
Offset: 1

Views

Author

Mats Granvik, Oct 13 2007

Keywords

Comments

Checked up to 28th row. The rest of the ones in the table are there for the least common multiple to calculate correctly.

Examples

			2 occurs 2*1 = 2 times in column 2.
3 occurs 3*2 = 6 times in column 3.
4 occurs 4*1 = 4 times in column 4.
5 occurs 5*4 = 20 times in column 5.
k occurs A133936(k) times in column k. The first rows of the triangle and the least common multiple of the rows are:
lcm{1} = 1
lcm{1, 2} = 2
lcm{1, 2, 3} = 6
lcm{1, 1, 3, 4} = 12
lcm{1, 1, 3, 4, 5} = 60
lcm{1, 1, 3, 4, 5, 1} = 60
lcm{1, 1, 3, 4, 5, 1, 7} = 420
lcm{1, 1, 3, 1, 5, 1, 7, 8} = 840
lcm{1, 1, 1, 1, 5, 1, 7, 8, 9} = 2520
		

Crossrefs

Programs

  • Excel
    =if(and(row()>=column();row()A120112));column();1)
    
  • Excel
    =if(and(n>=k; n < A014963*A100994); A100994; 1) - Mats Granvik, Jan 21 2008
  • Maple
    A120112 := proc(n) 1-ilcm(seq(i,i=1..n+1))/ilcm(seq(i,i=1..n)) ; end proc:
    A133232 := proc(n) if n < k*(1+abs(A120112(k-1))) then k else 1; end if; end proc:
    seq(seq(A133232(n,k),k=1..n),n=1..15) ; # R. J. Mathar, Nov 23 2010
  • Mathematica
    b[n_] := b[n] = If[n == 0, 1, LCM @@ Range[n]];
    c[n_] := 1 - b[n+1]/b[n];
    T[n_, k_] := If[n < k*(1+Abs[c[k-1]]), k, 1];
    Table[T[n, k], {n, 1, 10}, {k, 1, n}] // Flatten (* Jean-François Alcover, Mar 01 2021 *)

Formula

T(n,k) = if nA120112(k-1)| then k, else 1 (1<=k<=n).
T(n,k) = if n < A014963(k)*A100994(k) then A100994(k), else 1 (1<=k<=n). - Mats Granvik, Jan 21 2008

Extensions

Indices added to formulas by R. J. Mathar, Nov 23 2010

A225629 a(n) = Last value in column n of A225630 which is not yet the fixed point A003418(n) of that column.

Original entry on oeis.org

1, 1, 1, 3, 4, 30, 30, 84, 120, 1260, 840, 13860, 13860, 180180, 180180, 180180, 240240, 6126120, 6126120, 116396280, 58198140, 116396280, 116396280, 2677114440, 2677114440, 13385572200, 13385572200, 40156716600, 40156716600, 776363187600, 776363187600
Offset: 0

Views

Author

Antti Karttunen, May 13 2013

Keywords

Comments

a(n) = also the second rightmost terms of row n of irregular table A225632.
a(0)= a(1) = 1 by convention.

Crossrefs

Programs

Formula

a(n) = A225630(n,max(0,A225633(n)-1)).

A045948 a(n) = A003418(n)/A034386(n).

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 2, 4, 12, 12, 12, 12, 12, 12, 12, 24, 24, 24, 24, 24, 24, 24, 24, 24, 120, 120, 360, 360, 360, 360, 360, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 5040, 5040, 5040, 5040, 5040, 5040, 5040, 5040, 5040
Offset: 1

Views

Author

Keywords

Examples

			n=11: lcm(1..11) = 27720 = 8*9*5*7*11 = 2310*12. A034386(11)=2310, so the quotient is 12. Thus a(11) = 12.
		

Crossrefs

Programs

  • Mathematica
    Table[Exp[Sum[MangoldtLambda[n], {n, 1, m}]]/ Product[x, {x, Prime[Range[PrimePi[m]]]}], {m, 1, 57}] (* Fred Daniel Kline, Apr 02 2015 *)
  • PARI
    a(n)=lcm([1..n])/prod(i=1,primepi(n),prime(i)) \\ Charles R Greathouse IV, Apr 02 2015; corrected by Michel Marcus, Dec 26 2020

A225558 a(n) = A003418(n)/A000793(n).

Original entry on oeis.org

1, 1, 1, 2, 3, 10, 10, 35, 56, 126, 84, 924, 462, 6006, 4290, 3432, 5148, 58344, 58344, 554268, 554268, 554268, 554268, 6374082, 6374082, 21246940, 21246940, 52151580, 34767720, 924241890, 504131940, 15628090140, 26447537160, 26447537160, 15628090140
Offset: 0

Views

Author

Antti Karttunen, May 10 2013

Keywords

Crossrefs

Programs

  • Maple
    g:= proc(n) g(n):= `if`(n=0, 1, ilcm(n, g(n-1))) end:
    b:= proc(n, i) option remember; local p;
          p:= `if`(i<1, 1, ithprime(i));
          `if`(n=0 or i<1, 1, max(b(n, i-1),
               seq(p^j*b(n-p^j, i-1), j=1..ilog[p](n))))
        end:
    a:= n->g(n)/b(n, `if`(n<8, 3,
        numtheory[pi](ceil(1.328*isqrt(n*ilog(n)))))):
    seq(a(n), n=0..40); # Alois P. Heinz, May 22 2013
  • Mathematica
    b[n_, i_] := b[n, i] = Module[{p}, p = If[i<1, 1, Prime[i]]; If[n==0 || i<1, 1, Max[b[n, i-1], Table[p^j*b[n-p^j, i-1], {j, 1, Log[p, n] // Floor }]]]]; a[0]=1; a[n_] := LCM @@ Range[n] / b[n, If[n<8, 3, PrimePi[ Ceiling[ 1.328*Sqrt[n*Log[n] // Floor]]]]]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Feb 27 2016, after Alois P. Heinz *)

Formula

a(n) = A003418(n)/A000793(n).
A074115(n)/a(n) = A025527(n).

A057825 Values of k for which A003418(k) - 1 is prime.

Original entry on oeis.org

3, 4, 5, 6, 7, 8, 19, 20, 21, 22, 23, 24, 29, 30, 32, 33, 34, 35, 36, 47, 48, 61, 62, 63, 97, 98, 99, 100, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 233, 234, 235, 236, 237, 238, 307, 308, 309, 310, 401, 402, 403, 404, 405, 406, 407, 408, 887, 888, 889, 890
Offset: 1

Views

Author

Labos Elemer, Nov 08 2000

Keywords

Comments

Fewer distinct primes than distinct values of a(n) are generated. So, e.g., k = 97, 98, 99, 100 all correspond to lcm([1..97]) - 1 = 69720375229712477164533808935312303556799, a prime.

Crossrefs

Programs

  • PARI
    isok(k) = ispseudoprime(lcm(vector(k, i, i))-1); \\ Jinyuan Wang, May 02 2020
Showing 1-10 of 378 results. Next