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

A141700 Triangle read by rows: A120007 interleaved with (k-1) zeros.

Original entry on oeis.org

0, 2, 0, 3, 0, 0, 2, 2, 0, 0, 5, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 2, 2, 0, 2, 0, 0, 0, 0, 3, 0, 3, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 2, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 0, 2, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Mats Granvik, Jun 30 2008

Keywords

Comments

Similar to A140256. At row index equal to a prime power one more prime of that prime power is added each time the prime power increases. At row index equal to lcm of {1,2,3...} the A120007 can be read alliteratively from the right to the left, meaning that A120007 begins over and over again.
This table illustrates the fundamental theorem of arithmetic and the known identity where the row products are the natural numbers A000027. In this formatting the pattern of primes so to say repeats itself endlessly in a layered interleaved manner. The row sums of this table gives A001414.

Examples

			Table begins:
0;
2,0;
3,0,0;
2,2,0,0;
5,0,0,0,0;
0,3,2,0,0,0;
7,0,0,0,0,0,0;
		

Crossrefs

Programs

  • Excel
    =if(row()>=column();if(mod(row();column())=0;lookup(row()/column();A000027;A120007);0);"")

A001414 Integer log of n: sum of primes dividing n (with repetition). Also called sopfr(n).

Original entry on oeis.org

0, 2, 3, 4, 5, 5, 7, 6, 6, 7, 11, 7, 13, 9, 8, 8, 17, 8, 19, 9, 10, 13, 23, 9, 10, 15, 9, 11, 29, 10, 31, 10, 14, 19, 12, 10, 37, 21, 16, 11, 41, 12, 43, 15, 11, 25, 47, 11, 14, 12, 20, 17, 53, 11, 16, 13, 22, 31, 59, 12, 61, 33, 13, 12, 18, 16, 67, 21, 26, 14, 71, 12, 73, 39, 13, 23, 18, 18
Offset: 1

Views

Author

Keywords

Comments

MacMahon calls this the potency of n.
Downgrades the operators in a prime decomposition. E.g., 40 factors as 2^3 * 5 and sopfr(40) = 2 * 3 + 5 = 11.
Consider all ways of writing n as a product of zero, one, or more factors; sequence gives smallest sum of terms. - Amarnath Murthy, Jul 07 2001
a(n) <= n for all n, and a(n) = n iff n is 4 or a prime.
Look at the graph of this sequence. At the lower edge of the logarithmic scatterplot there is a set of fuzzy but unmistakable diagonal fringes, sloping toward the southeast. Their spacing gradually increases, and their slopes gradually decrease; they are more distinct toward the lower edge of the range. Is any explanation known? - Allan C. Wechsler, Oct 11 2015
For n >= 2, the glb and lub are: 3 * log(n) / log(3) <= a(n) <= n, where the lub occurs when n = 3^k, k >= 1. (Jakimczuk 2012) - Daniel Forgues, Oct 12 2015
Except for the initial term, row sums of A027746. - M. F. Hasler, Feb 08 2016
Atanassov proves that a(n) <= A065387(n) - n. - Charles R Greathouse IV, Dec 06 2016
From Robert G. Wilson v, Aug 15 2022: (Start)
Differs from A337310 beginning with n at 64, 192, 256, 320, 448, 512, ..., .
The number of terms which equal k is A000607(k).
The first occurrence of k>1 is A056240(k).
The last occurrence of k>1 is A000792(k).
The Amarnath Murthy comment of Jul 07 2001 is a result of the fundamental theorem of arithmetic.
(End)

Examples

			a(24) = 2+2+2+3 = 9.
a(30) = 10: 30 can be written as 30, 15*2, 10*3, 6*5, 5*3*2. The corresponding sums are 30, 17, 13, 11, 10. Among these 10 is the least.
		

References

  • K. Atanassov, New integer functions, related to ψ and σ functions. IV., Bull. Number Theory Related Topics 12 (1988), pp. 31-35.
  • Amarnath Murthy, Generalization of Partition function and introducing Smarandache Factor Partition, Smarandache Notions Journal, Vol. 11, 1-2-3, Spring-2000.
  • Amarnath Murthy and Charles Ashbacher, Generalized Partitions and Some New Ideas on Number Theory and Smarandache Sequences, Hexis, Phoenix; USA 2005. See Section 1.4.
  • Joe Roberts, Lure of the Integers, Math. Assoc. America, 1992, p. 89.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A000607(n) gives the number of values of k for which A001414(k) = n.
Cf. A036349 (indices of even terms), A356163 (their char. function), A335657 (indices of odd terms), A289142 (of multiples of 3), A373371 (their char. function).
For sum of squares of prime factors see A067666, for cubes see A224787.
Other completely additive sequences with primes p mapped to a function of p include: A001222 (with a(p)=1), A056239 (with a(p)=primepi(p)), A059975 (with a(p)=p-1), A064097 (with a(p)=1+a(p-1)), A113177 (with a(p)=Fib(p)), A276085 (with a(p)=p#/p), A341885 (with a(p)=p*(p+1)/2), A373149 (with a(p)=prevprime(p)), A373158 (with a(p)=p#).
For other completely additive sequences see the cross-references in A104244.

Programs

  • Haskell
    a001414 1 = 0
    a001414 n = sum $ a027746_row n
    -- Reinhard Zumkeller, Feb 27 2012, Nov 20 2011
    
  • Magma
    [n eq 1 select 0 else (&+[j[1]*j[2]: j in Factorization(n)]): n in [1..100]]; // G. C. Greubel, Jan 10 2019
  • Maple
    A001414 := proc(n) add( op(1,i)*op(2,i),i=ifactors(n)[2]) ; end proc:
    seq(A001414(n), n=1..100); # Peter Luschny, Jan 17 2011
  • Mathematica
    a[n_] := Plus @@ Times @@@ FactorInteger@ n; a[1] = 0; Array[a, 78] (* Ray Chandler, Nov 12 2005 *)
  • PARI
    a(n)=local(f); if(n<1,0,f=factor(n); sum(k=1,matsize(f)[1],f[k,1]*f[k,2]))
    
  • PARI
    A001414(n) = (n=factor(n))[,1]~*n[,2] \\ M. F. Hasler, Feb 07 2009
    
  • Python
    from sympy import factorint
    def A001414(n):
        return sum(p*e for p,e in factorint(n).items()) # Chai Wah Wu, Jan 08 2016
    
  • Sage
    [sum(factor(n)[j][0]*factor(n)[j][1] for j in range(0,len(factor(n)))) for n in range(1,79)] # Giuseppe Coppoletta, Jan 19 2015
    

Formula

If n = Product p_j^k_j then a(n) = Sum p_j * k_j.
Dirichlet g.f. f(s)*zeta(s), where f(s) = Sum_{p prime} p/(p^s-1) = Sum_{k>0} primezeta(k*s-1) is the Dirichlet g.f. for A120007. Totally additive with a(p^e) = p*e. - Franklin T. Adams-Watters, Jun 02 2006
For n > 1: a(n) = Sum_{k=1..A001222(n)} A027746(n,k). - Reinhard Zumkeller, Aug 27 2011
Sum_{n>=1} (-1)^a(n)/n^s = ((2^s + 1)/(2^s - 1))*zeta(2*s)/zeta(s), if Re(s)>1 and 0 if s=1 (Alladi and Erdős, 1977). - Amiram Eldar, Nov 02 2020
a(n) >= k*log(n), where k = 3/log(3). This bound is sharp. - Charles R Greathouse IV, Jul 28 2025

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

A349394 a(p^e) = p^(e-1) for prime powers, a(n) = 0 for all other n; Dirichlet convolution of A003415 (arithmetic derivative of n) with A055615 (Dirichlet inverse of n).

Original entry on oeis.org

0, 1, 1, 2, 1, 0, 1, 4, 3, 0, 1, 0, 1, 0, 0, 8, 1, 0, 1, 0, 0, 0, 1, 0, 5, 0, 9, 0, 1, 0, 1, 16, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 32, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 27, 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

Antti Karttunen, Nov 18 2021

Keywords

Comments

Dirichlet convolution of this sequence with Euler phi (A000010) is A300251.
Convolving this sequence with sigma (A000203) produces A319684.
With a(1) = 1 instead of 0, this would be the Dirichlet convolution of A129283 (A003415(n)+n) with A055615. Thus when we subtract A063524 from that convolution, we get this sequence. (See also A349434). Compare also to the convolution of A069359 (sequence agreeing with A003415 on squarefree numbers) with A055615, which is the characteristic function of primes, A010051. - Antti Karttunen, Nov 20 2021

Crossrefs

Programs

  • Haskell
    import Math.NumberTheory.Primes
    a n = case factorise n of
        [(p,e)] -> unPrime p^(e-1) :: Int
         -> 0 -- _Sebastian Karlsson, Nov 19 2021
  • Mathematica
    f[p_, e_] := e/p; d[1] = 0; d[n_] := n * Plus @@ f @@@ FactorInteger[n]; a[n_] := DivisorSum[n, # * MoebiusMu[#] * d[n/#] &]; Array[a, 100] (* Amiram Eldar, Nov 19 2021 *)
  • PARI
    A003415(n) = if(n<=1, 0, my(f=factor(n)); n*sum(i=1, #f~, f[i, 2]/f[i, 1]));
    A055615(n) = (n*moebius(n));
    A349394(n) = sumdiv(n,d,A003415(n/d)*A055615(d));
    
  • PARI
    A349394(n) = { my(p=0,e); if((e=isprimepower(n,&p)),p^(e-1),0); }; \\ (After Sebastian Karlsson's new formula) - Antti Karttunen, Nov 20 2021
    

Formula

a(n) = Sum_{d|n} A003415(n/d) * A055615(d).
a(n) = 0 unless n is a prime power (A246655), in which case a(p^e) = p^(e-1). - Sebastian Karlsson, Nov 19 2021
a(n) = A003557(n) * A069513(n). [From above] - Antti Karttunen, Nov 20 2021
Dirichlet g.f.: Sum_{p prime} 1/(p^s-p) [Follows from the D.g.f. of A003415 proved by Haukkanen et al.]. - Sebastian Karlsson, Nov 25 2021
Sum_{k=1..n} a(k) has an average value c*n, where c = A137245 = Sum_{primes p} 1/(p*log(p)) = 1.63661632335... - Vaclav Kotesovec, Mar 03 2023

Extensions

Added Sebastian Karlsson's formula as the new primary definition - Antti Karttunen, Nov 20 2021

A140508 Mobius transform applied twice to A001414.

Original entry on oeis.org

0, 2, 3, 0, 5, -5, 7, 0, 0, -7, 11, 0, 13, -9, -8, 0, 17, 0, 19, 0, -10, -13, 23, 0, 0, -15, 0, 0, 29, 10, 31, 0, -14, -19, -12, 0, 37, -21, -16, 0, 41, 12, 43, 0, 0, -25, 47, 0, 0, 0, -20, 0, 53, 0, -16, 0, -22, -31, 59, 0, 61, -33, 0, 0, -18, 16, 67, 0, -26, 14, 71, 0, 73
Offset: 1

Views

Author

Mats Granvik, Jun 30 2008

Keywords

Comments

Mobius transform applied once to A120007. Except for first term and zero divided by zero, this sequence gives A008683 as:
mu(n) = -a(n)/abs(a(n)) through the conjecture in A140254.

Crossrefs

Showing 1-5 of 5 results.