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

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

A081387 Number of non-unitary prime divisors of central binomial coefficient, C(2n,n) = A000984(n), i.e., number of prime factors in C(2n,n) whose exponent is greater than one.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Mar 27 2003

Keywords

Examples

			For n = 14: binomial(28,14) = 40116600 = 2*2*2*3*3*3*5*5*17*19*23; unitary prime divisors: {17,19,23}; non-unitary prime divisors: {2,3,5}, so a(14) = 3.
		

Crossrefs

Programs

Formula

a(n) = A056170(A000984(n)) = A001221(A000984(n)) - A081386(n) = A067434(n) - A081386(n).

A081389 Number of non-unitary prime divisors of Catalan numbers, i.e., number of those prime factors whose exponent is greater than one.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Mar 27 2003

Keywords

Examples

			For n=25: Catalan(25) = binomial(50,25)/26 = 4861946401452 =(2*2*3*3*7*7)*29*31*37*41*43*47;
unitary prime divisors: {29,31,37,41,43,47};
non-unitary prime divisors: {2,3,7}, so a(25) = 3.
		

Crossrefs

Programs

  • Mathematica
    Table[Boole[n == 1] + PrimeNu@ # - Count[Transpose[FactorInteger@ #][[2]], 1] &@ CatalanNumber@ n, {n, 105}] (* Michael De Vlieger, Feb 25 2017, after Harvey P. Dale at A056169 *)
  • PARI
    catalan(n) = binomial(2*n, n)/(n+1);
    nbud(n) = #select(x->x!=1, factor(n)[,2]);
    a(n) = nbud(catalan(n)); \\ Michel Marcus, Feb 26 2017

Formula

a(n) = A056170(A000108(n)).

A081388 Number of unitary prime divisors of the n-th Catalan number.

Original entry on oeis.org

0, 1, 1, 2, 3, 2, 3, 4, 4, 3, 5, 4, 3, 4, 5, 6, 8, 6, 9, 8, 8, 8, 7, 7, 6, 7, 9, 10, 10, 10, 11, 11, 12, 12, 13, 12, 12, 11, 13, 12, 13, 13, 12, 14, 14, 13, 15, 14, 15, 15, 15, 15, 18, 17, 17, 17, 17, 18, 17, 18, 17, 18, 18, 19, 21, 20, 22, 19, 19, 19, 21, 19, 19, 20, 20, 23, 23, 22
Offset: 1

Views

Author

Labos Elemer, Mar 27 2003

Keywords

Examples

			For n = 10: Catalan(10) = 16796 = 2^2*13*17*19, the unitary prime divisors are {13, 17, 19}, so a(10) = 3.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Count[FactorInteger[CatalanNumber[n]][[;;, 2]], 1]; a[1] = 0; Array[a, 100] (* Amiram Eldar, Aug 16 2024 *)
  • PARI
    nbupd(n) = my(f=factor(n)[, 2]); sum(i=1, #f, f[i]==1);
    a(n) = nbupd(binomial(2*n, n)/(n+1)); \\ Michel Marcus, Sep 05 2017

Formula

a(n) = A056169(A000108(n)).

A081391 Numbers k such that the central binomial coefficient C(2*k,k) has only one prime divisor whose exponent equals one.

Original entry on oeis.org

3, 6, 7, 8, 9, 10, 11, 12, 16, 21, 22, 28, 29, 30, 31, 36, 37, 54, 55, 57, 58, 110, 171, 784, 786
Offset: 1

Views

Author

Labos Elemer, Mar 27 2003

Keywords

Comments

Numbers k such that C(2*k,k) has one non-unitary prime divisor.
Numbers k for which A081387(k) = 1.
No more terms through 10^6; conjecture: no terms after 786. - Jon E. Schoenfield, Jul 29 2017

Examples

			For k = 786, C(1572,786) = 2*2*2*2*m, where m is a squarefree product of 169 primes.
		

Crossrefs

Programs

A081390 Number k such that the k-th Catalan number has only one non-unitary prime divisor; all the other prime divisors have exponent one.

Original entry on oeis.org

6, 10, 12, 15, 16, 20, 21, 22, 27, 28, 29, 30, 32, 33, 34, 36, 37, 39, 53, 54, 55, 56, 57, 58, 65, 67, 79, 80, 109, 110, 129, 135, 159, 161, 170, 171, 255, 783, 784, 785, 786, 902
Offset: 1

Views

Author

Labos Elemer, Mar 27 2003

Keywords

Comments

a(43) > 25000, if it exists. - Amiram Eldar, Jul 22 2024

Examples

			902 is a term because binomial(1804,902)/903 has 189 prime factor, 188 stand with exponent one, but 2 with 5: 2^5.
		

Crossrefs

Programs

A081392 Numbers k such that the central binomial coefficient C(k, floor(k/2)) has only one prime divisor whose exponent is greater than one.

Original entry on oeis.org

6, 9, 12, 13, 14, 15, 16, 18, 20, 21, 22, 24, 31, 32, 33, 35, 39, 41, 42, 43, 44, 55, 56, 57, 58, 59, 60, 61, 62, 65, 67, 72, 73, 74, 79, 107, 108, 109, 110, 113, 114, 115, 116, 131, 159, 219, 220, 271, 319, 341, 342, 1567, 1568, 1571, 1572
Offset: 1

Views

Author

Labos Elemer, Mar 27 2003

Keywords

Comments

As expected, the (single) non-unitary prime divisors for C(2k, k) and C(k, floor(k/2)) or for Catalan numbers equally come from the smallest prime(s).
Numbers k such that A001405(k) is in A190641. - Michel Marcus, Jul 30 2017
a(56) > 5*10^6 if it exists. - David A. Corneth, Apr 03 2021

Examples

			For k=341, binomial(341,170) = 2*2*2*2*M, where M is a squarefree product of 48 further prime factors.
		

Crossrefs

Programs

  • Mathematica
    pde1Q[n_]:=Length[Select[FactorInteger[Binomial[n,Floor[n/2]]],#[[2]]> 1&]] == 1; Select[Range[1600],pde1Q] (* Harvey P. Dale, Jan 21 2019 *)
  • PARI
    isok(n) = my(f=factor(binomial(n, n\2))); #select(x->(x>1), f[,2]) == 1; \\ Michel Marcus, Jul 30 2017
    
  • PARI
    is(n) = { my(nf2 = n\2, nmnf2 = n-nf2, t); forprime(p = 2, n, if(val(n, p) - val(nf2, p) - val(nmnf2, p) > 1, t++; if(t > 1, return(0) ) ) ); t==1 }
    val(n, p) = my(r=0); while(n, r+=n\=p); r \\ David A. Corneth, Apr 03 2021

Extensions

a(52)-a(55) from Michel Marcus, Jul 30 2017
Showing 1-7 of 7 results.