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

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

A133790 A014963*A100994.

Original entry on oeis.org

1, 4, 9, 8, 25, 1, 49, 16, 27, 1, 121, 1, 169, 1, 1, 32, 289, 1, 361, 1, 1, 1, 529, 1, 125, 1, 81, 1, 841, 1, 961, 64, 1, 1, 1, 1, 1369, 1, 1, 1, 1681, 1, 1849, 1, 1, 1, 2209, 1, 343, 1, 1, 1, 2809, 1, 1, 1, 1, 1, 3481, 1, 3721, 1, 1, 128, 1, 1, 4489, 1, 1, 1, 5041, 1, 5329, 1, 1, 1
Offset: 1

Views

Author

Mats Granvik, Jan 21 2008

Keywords

Crossrefs

Formula

A133937 A100994-n/A014963.

Original entry on oeis.org

0, 1, 2, 2, 4, -5, 6, 4, 6, -9, 10, -11, 12, -13, -14, 8, 16, -17, 18, -19, -20, -21, 22, -23, 20, -25, 18, -27, 28, -29, 30, 16, -32, -33, -34, -35, 36, -37, -38, -39, 40, -41, 42, -43, -44, -45, 46, -47, 42, -49, -50, -51, 52, -53, -54, -55, -56, -57, 58, -59, 60, -61, -62, 32, -64, -65, 66, -67, -68, -69, 70, -71, 72, -73
Offset: 1

Views

Author

Mats Granvik, Jan 21 2008

Keywords

Crossrefs

Formula

a(n) = A100994-n/A014963.

A014963 Exponential of Mangoldt function M(n): a(n) = 1 unless n is a prime or prime power, in which case a(n) = that prime.

Original entry on oeis.org

1, 2, 3, 2, 5, 1, 7, 2, 3, 1, 11, 1, 13, 1, 1, 2, 17, 1, 19, 1, 1, 1, 23, 1, 5, 1, 3, 1, 29, 1, 31, 2, 1, 1, 1, 1, 37, 1, 1, 1, 41, 1, 43, 1, 1, 1, 47, 1, 7, 1, 1, 1, 53, 1, 1, 1, 1, 1, 59, 1, 61, 1, 1, 2, 1, 1, 67, 1, 1, 1, 71, 1, 73, 1, 1, 1, 1, 1, 79, 1, 3, 1, 83, 1, 1, 1, 1, 1, 89, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Keywords

Comments

There are arbitrarily long runs of ones (Sierpiński). - Franz Vrabec, Sep 26 2005
a(n) is the smallest positive integer such that n divides Product_{k=1..n} a(k), for all positive integers n. - Leroy Quet, May 01 2007
For n>1, resultant of the n-th cyclotomic polynomial with the 1st cyclotomic polynomial x-1. - Ralf Stephan, Aug 14 2013
A368749(n) is the smallest prime p such that the interval [a(p), a(q)] contains n 1's; q = nextprime(p), n >= 0. - David James Sycamore, Mar 21 2024

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, Section 17.7.
  • I. Vardi, Computational Recreations in Mathematica. Reading, MA: Addison-Wesley, pp. 146-147, 152-153 and 249, 1991.

Crossrefs

Apart from initial 1, same as A020500. With ones replaced by zeros, equal to A120007.
Cf. A003418, A007947, A008683, A008472, A008578, A048671 (= n/a(n)), A072107 (partial sums), A081386, A081387, A099636, A100994, A100995, A140255 (inverse Mobius transform), A140254 (Mobius transform), A297108, A297109, A340675, A000027, A348846, A368749.
First column of A140256. Row sums of triangle A140581.
Cf. also A140579, A140580 (= n*a(n)).

Programs

  • Haskell
    a014963 1 = 1
    a014963 n | until ((> 0) . (`mod` spf)) (`div` spf) n == 1 = spf
              | otherwise = 1
              where spf = a020639 n
    -- Reinhard Zumkeller, Sep 09 2011
    
  • Maple
    a := n -> if n < 2 then 1 else numtheory[factorset](n); if 1 < nops(%) then 1 else op(%) fi fi; # Peter Luschny, Jun 23 2009
    A014963 := n -> n/ilcm(op(numtheory[divisors](n) minus {1,n}));
    seq(A014963(i), i=1..69); # Peter Luschny, Mar 23 2011
    # The following is Nowicki's LCM-Transform - N. J. A. Sloane, Jan 09 2024
    LCMXFM:=proc(a)  local p,q,b,i,k,n:
    if whattype(a) <> list then RETURN([]); fi:
    n:=nops(a):
    b:=[a[1]]: p:=[a[1]];
    for i from 2 to n do q:=[op(p),a[i]]; k := lcm(op(q))/lcm(op(p));
    b:=[op(b),k]; p:=q;; od:
    RETURN(b); end:
    # Alternative, to be called by 'seq' as shown, not for a single n.
    a := proc(n) option remember; local i; global f; f := ifelse(n=1, 1, f*n);
    iquo(f, mul(a(i)^iquo(n, i), i=1..n-1)) end: seq(a(n), n=1..95); # Peter Luschny, Apr 05 2025
  • Mathematica
    a[n_?PrimeQ] := n; a[n_/;Length[FactorInteger[n]] == 1] := FactorInteger[n][[1]][[1]]; a[n_] := 1; Table[a[n], {n, 95}] (* Alonso del Arte, Jan 16 2011 *)
    a[n_] := Exp[ MangoldtLambda[n]]; Table[a[n], {n, 95}] (* Jean-François Alcover, Jul 29 2013 *)
    Ratios[LCM @@ # & /@ Table[Range[n], {n, 100}]] (* Horst H. Manninger, Mar 08 2024 *)
    Table[Which[PrimeQ[n],n,PrimePowerQ[n],Surd[n,FactorInteger[n][[-1,2]]],True,1],{n,100}] (* Harvey P. Dale, Mar 01 2025 *)
  • PARI
    A014963(n)=
    {
        local(r);
        if( isprime(n), return(n));
        if( ispower(n,,&r) && isprime(r), return(r) );
        return(1);
    }  \\ Joerg Arndt, Jan 16 2011
    
  • PARI
    a(n)=ispower(n,,&n);if(isprime(n),n,1) \\ Charles R Greathouse IV, Jun 10 2011
    
  • Python
    from sympy import factorint
    def A014963(n):
        y = factorint(n)
        return list(y.keys())[0] if len(y) == 1 else 1
    print([A014963(n) for n in range(1, 71)]) # Chai Wah Wu, Sep 04 2014
  • Sage
    def A014963(n) : return simplify(exp(add(moebius(d)*log(n/d) for d in divisors(n))))
    [A014963(n) for n in (1..50)]  # Peter Luschny, Feb 02 2012
    
  • Sage
    def a(n):
        if n == 1: return 1
        return prod(1 - E(n)**k for k in ZZ(n).coprime_integers(n+1))
    [a(n) for n in range(1, 14)] # F. Chapoton, Mar 17 2020
    

Formula

a(n) = A003418(n) / A003418(n-1) = lcm {1..n} / lcm {1..n-1}. [This is equivalent to saying that this sequence is the LCM-transform (as defined by Nowicki, 2013) of the positive integers. - David James Sycamore, Jan 09 2024.]
a(n) = 1/Product_{d|n} d^mu(d) = Product_{d|n} (n/d)^mu(d). - Vladeta Jovovic, Jan 24 2002
a(n) = gcd( C(n+1,1), C(n+2,2), ..., C(2n,n) ) where C(n,k) = binomial(n,k). - Benoit Cloitre, Jan 31 2003
a(n) = gcd(C(n,1), C(n+1,2), C(n+2,3), ...., C(2n-2,n-1)), where C(n,k) = binomial(n,k). - Benoit Cloitre, Jan 31 2003; corrected by Ant King, Dec 27 2005
Note: a(n) != gcd(A008472(n), A007947(n)) = A099636(n), GCD of rad(n) and sopf(n) (this fails for the first time at n=30), since a(30) = 1 but gcd(rad(30), sopf(30)) = gcd(30,10) = 10.
a(n)^A100995(n) = A100994(n). - N. J. A. Sloane, Feb 20 2005
a(n) = Product_{k=1..n-1, if(gcd(n, k)=1, 1-exp(2*Pi*i*k/n), 1)}, i=sqrt(-1); a(n) = n/A048671(n). - Paul Barry, Apr 15 2005
Sum_{n>=1} (log(a(n))-1)/n = -2*A001620 [Bateman Manuscript Project Vol III, ed. by Erdelyi et al.]. - R. J. Mathar, Mar 09 2008
n*a(n) = A140580(n) = n^2/A048671(n) = A140579 * [1,2,3,...]. - Gary W. Adamson, May 17 2008
a(n) = (2*Pi)^phi(n) / Product_{gcd(n,k)=1} Gamma(k/n)^2 (for n > 1). - Peter Luschny, Aug 08 2009
a(n) = A166140(n) / A166142(n). - Mats Granvik, Oct 08 2009
a(n) = GCD of rows in A167990. - Mats Granvik, Nov 16 2009
a(n) = A010055(n)*(A007947(n) - 1) + 1. - Reinhard Zumkeller, Mar 26 2010
a(n) = 1 + (A007947(n)-1) * floor(1/A001221(n)), for n>1. - Enrique Pérez Herrero, Jun 01 2011
a(n) = Product_{k=1..n-1} if(gcd(k,n)=1, 2*sin(Pi*k/n), 1). - Peter Luschny, Jun 09 2011
a(n) = exp(Sum_{k>=1} A191898(n,k)/k) for n>1 (conjecture). - Mats Granvik, Jun 19 2011
Dirichlet g.f.: Sum_{n>0} e^Lambda(n)/n^s = Zeta(s) + Sum_{p prime} Sum_{k>0} (p-1)/p^(k*s) = Zeta(s) - ppzeta(s) + Sum(p prime, p/(p^s-1)); for a ppzeta definition see A010055. - Enrique Pérez Herrero, Jan 19 2013
a(n) = exp(lim_{s->1} zeta(s)*Sum_{d|n} moebius(d)/d^(s-1)) for n>1. - Mats Granvik, Jul 31 2013
a(n) = gcd_{k=1..n-1} binomial(n,k) for n > 1, see A014410. - Michel Marcus, Dec 08 2015 [Corrected by Jinyuan Wang, Mar 20 2020]
a(n) = 1 + Sum_{k=2..n} (k-1)*A010051(k)*(floor(k^n/n) - floor((k^n - 1)/n)). - Anthony Browne, Jun 16 2016
The Dirichlet series for log(a(n)) = Lambda(n) is given by the logarithmic derivative of the zeta function -zeta'(s)/zeta(s). - Mats Granvik, Oct 30 2016
a(n) = A008578(1+A297109(n)), For all n >= 1, Product_{d|n} a(d) = n. - Antti Karttunen, Feb 01 2021
Product_{k=1..floor(n/2)} Product_{j=1..floor(n/k)} a(j) = n!. - Ammar Khatab, Jan 28 2025

Extensions

Additional reference from Eric W. Weisstein, Jun 29 2008

A100995 If n is a prime power p^m, m >= 1, then m, otherwise 0.

Original entry on oeis.org

0, 1, 1, 2, 1, 0, 1, 3, 2, 0, 1, 0, 1, 0, 0, 4, 1, 0, 1, 0, 0, 0, 1, 0, 2, 0, 3, 0, 1, 0, 1, 5, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 6, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 4, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 26 2004

Keywords

Comments

Calculate matrix powers: (A175992^1)/1 - (A175992^2)/2 + (A175992^3)/3 - (A175992^4)/4 + ... Then the nonzero values of a(n) are found as reciprocals in the first column. Compare this to the Taylor series for log(1+x) = (x)/1 - (x^2)/2 + (x^3)/3 - (x^4)/4 + ... Therefore it is natural to write 0, 1/1, 1/1, 1/2, 1/1, 0, 1/1, 1/3, 1/2, 0, 1/1, ... Raising n to a such power gives A014963. - Mats Granvik, Gary W. Adamson, Apr 04 2011
The Dirichlet series that generates the reciprocals of this sequence is the logarithm of the Riemann zeta function. - Mats Granvik, Gary W. Adamson, Apr 04 2011
Number of automorphisms of the finite field with n elements, or 0 if the field does not exist. For n=p^k where p is a prime and k is an integer, the automorphism group of the finite field with n elements is a cyclic group of order k generated by the Frobenius endomorphism. - Yancheng Lu, Jan 11 2021

Crossrefs

Programs

  • Haskell
    a100995 n = f 0 n where
       f e 1 = e
       f e x = if r > 0 then 0 else f (e + 1) x'
               where (x', r) = divMod x p
       p = a020639 n
    -- Reinhard Zumkeller, Mar 19 2013
  • Maple
    f:= proc(n) local F;
        F:= ifactors(n)[2];
        if nops(F) = 1 then F[1][2]
        else 0
        fi
    end proc:
    map(f, [$1..100]); # Robert Israel, Jun 09 2015
  • Mathematica
    ppm[n_]:=If[PrimePowerQ[n],FactorInteger[n][[1,2]],0]; Array[ppm,110] (* Harvey P. Dale, Mar 03 2014 *)
    a=Table[Limit[Sum[If[Mod[n, k] == 0, MoebiusMu[n/k]/(n/k)^(s - 1)/(1 - 1/n^(s - 1)), 0], {k, 1, n}], s -> 1], {n, 1, 105}];
    Numerator[a]*Denominator[a] (* Mats Granvik, Jun 09 2015 *)
    a = FullSimplify[Table[MangoldtLambda[n]/Log[n], {n, 1, 105}]]
    Numerator[a]*Denominator[a] (* Mats Granvik, Jun 09 2015 *)
  • PARI
    {a(n) = my(t); if( n<1, 0, t = factor(n); if( [1,2] == matsize(t), t[1,2], 0))} /* Michael Somos, Aug 15 2012 */
    
  • PARI
    {a(n) = my(t); if( n<1, 0, if( t = isprimepower(n), t))} /* Michael Somos, Aug 15 2012 */
    

Formula

A100994(n) = A014963(n)^a(n);
a(A000961(n)) = A025474(n).
a(n) = Sum_{d|n, gcd(d, n/d) = 1} (-1)^omega(n/d) * bigomega(d). - Ilya Gutkovskiy, Apr 15 2021

Extensions

Edited by Daniel Forgues and N. J. A. Sloane, Aug 18 2009

A133936 Number of times prime powers occur in the columns of tables A133232 and A133233.

Original entry on oeis.org

0, 2, 6, 4, 20, 0, 42, 8, 18, 0, 110, 0, 156, 0, 0, 16, 272, 0, 342, 0, 0, 0, 506, 0, 100, 0, 54, 0, 812, 0, 930, 32, 0, 0, 0, 0, 1332, 0, 0, 0, 1640, 0, 1806, 0, 0, 0, 2162, 0, 294, 0, 0, 0, 2756, 0, 0, 0, 0, 0, 3422, 0, 3660, 0, 0, 64, 0, 0, 4422, 0, 0, 0, 4970, 0, 5256, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Mats Granvik, Jan 21 2008

Keywords

Crossrefs

Programs

Formula

a(n) = if A014963*A100994A014963*A100994-n

A134579 Column products of tables A133232 and A133233.

Original entry on oeis.org

1, 4, 729, 256, 95367431640625, 0, 311973482284542371301330321821976049, 16777216, 150094635296999121, 0, 3574335935197503226412197580625705154978327969466895714094061686977589739390331653361877238387305580817715435470601
Offset: 1

Views

Author

Mats Granvik, Jan 23 2008

Keywords

Examples

			a(1) = 1^(1*1-1) = 1
a(2) = 2^(2*2-2) = 4
a(3) = 3^(3*3-3) = 729
a(4) = 4^(2*4-4) = 256
a(5) = 5^(5*5-5) = 95367431640625
a(6) = 6^(1*1-6) = 0
		

Crossrefs

Programs

  • Maple
    A100994 := proc(n) if nops(numtheory[factorset](n)) <> 1 then 1 ; else n ; fi ; end: A014963 := proc(n) if nops(numtheory[factorset](n)) <> 1 then 1 ; else op(1,op(1,ifactors(n)[2])) ; fi ; end: A134579 := proc(n) local e ; e := A014963(n)*A100994(n)-n ; if e >= 0 then n^e ; else 0 ; fi ; end: seq(A134579(n),n=1..13) ; # R. J. Mathar, Jan 30 2008

Formula

a(n) = if A014963(n)*A100994(n)-n >= 0 then n^(A014963(n)*A100994(n)-n) else 0.

Extensions

More terms from R. J. Mathar, Jan 30 2008

A308819 Product of prime powers <= n.

Original entry on oeis.org

1, 1, 2, 6, 24, 120, 120, 840, 6720, 60480, 60480, 665280, 665280, 8648640, 8648640, 8648640, 138378240, 2352430080, 2352430080, 44696171520, 44696171520, 44696171520, 44696171520, 1028011944960, 1028011944960, 25700298624000, 25700298624000, 693908062848000
Offset: 0

Views

Author

Ilya Gutkovskiy, Jun 26 2019

Keywords

Comments

a(n) is the smallest number that's divisible by all numbers less than or equal to n. - Keith F. Lynch, Apr 24 2025

Examples

			a(9) = 60480 because 2, 3, 4, 5, 7, 8, 9 are the prime powers less than or equal to 9 and 2 * 3 * 4 * 5 * 7 * 8 * 9 = 60480.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Product[If[PrimePowerQ[k], k, 1], {k, 1, n}]; Table[a[n], {n, 0, 27}]
    Module[{nn=50,ppwr},ppwr=Select[Range[nn],PrimePowerQ[#]&];Table[Times@@ Select[ ppwr,#<= n&],{n,0,nn}]] (* Harvey P. Dale, Apr 03 2024 *)
  • PARI
    a(n) = prod(k=1, n, if (isprime(k) || isprimepower(k), k, 1)); \\ Michel Marcus, Jun 27 2019

A158377 a(1) = 0, a(n) = lcm(A034684(n), A034699(n)) for n >= 2.

Original entry on oeis.org

0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 10, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 14, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 15, 61, 62, 63, 64, 65, 22, 67, 68, 69, 14, 71, 72
Offset: 1

Views

Author

Jaroslav Krizek, Mar 17 2009

Keywords

Comments

a(n) for n >= 2 equals LCM of minimal and maximal prime power factors in prime factorization of n. For n >= 2 holds: a(n)*A100994(n) = A034684(n)*A034699(n). a(n) for n >= 2 it deviates from A000027(n), first different term is a(30)=a(2*3*5), a(30)=lcm(2,5)=10, A000027(30)= 30. Sequence of deviations from A000027(n): 30,42,60,66,70,78,84,90,...

Examples

			For n = 30 = 2*3*5, a(30) = lcm(2,5) = 10.
		

Crossrefs

Formula

a(1) = 0, a(p) = p, a(pq) = pq, a(pq...z) = pz, a(p^k) = p^k, for p = primes (A000040), pq = product of two distinct primes (A006881), pq...z = product of k (k > 2) distinct primes p, q, ..., z (A120944), p^k = prime powers (A000961(n) for n > 1), k = natural numbers (A000027).
Showing 1-9 of 9 results.