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 11 results. Next

A162644 Numbers m such that A162511(m) = +1.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 8, 10, 11, 13, 14, 15, 17, 19, 21, 22, 23, 24, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 46, 47, 51, 53, 54, 55, 56, 57, 58, 59, 61, 62, 65, 66, 67, 69, 70, 71, 73, 74, 77, 78, 79, 82, 83, 85, 86, 87, 88, 89, 91, 93, 94, 95, 96, 97, 100
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 08 2009

Keywords

Comments

Also numbers n with A008836(n)=(-1)^A001221(n). - Enrique Pérez Herrero, Aug 03 2012
This sequence has an asymptotic density (1 + A065472/zeta(2))/2 = 0.735840... (Mossinghoff and Trudgian, 2019). - Amiram Eldar, Jul 07 2020

Crossrefs

Complement of A162645.
A002035 is a subsequence.

Programs

  • Mathematica
    Select[Range[100], EvenQ[PrimeOmega[#] - PrimeNu[#]] &] (* Amiram Eldar, Jul 07 2020 *)

A162645 Numbers m such that A162511(m) = -1.

Original entry on oeis.org

4, 9, 12, 16, 18, 20, 25, 28, 44, 45, 48, 49, 50, 52, 60, 63, 64, 68, 72, 75, 76, 80, 81, 84, 90, 92, 98, 99, 108, 112, 116, 117, 121, 124, 126, 132, 140, 147, 148, 150, 153, 156, 162, 164, 169, 171, 172, 175, 176, 188, 192, 198, 200, 204, 207, 208, 212, 220, 228
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 08 2009

Keywords

Comments

Numbers n where A001222(n)-A001221(n) is odd. - Enrique Pérez Herrero, Jul 07 2012
This sequence has an asymptotic density (1 - A065472/zeta(2))/2 = 0.264159... (Mossinghoff and Trudgian, 2019). - Amiram Eldar, Jul 07 2020

Crossrefs

Complement of A162644.
Subsequence of A072587.

Programs

A162512 Dirichlet inverse of A162511.

Original entry on oeis.org

1, -1, -1, 2, -1, 1, -1, -4, 2, 1, -1, -2, -1, 1, 1, 8, -1, -2, -1, -2, 1, 1, -1, 4, 2, 1, -4, -2, -1, -1, -1, -16, 1, 1, 1, 4, -1, 1, 1, 4, -1, -1, -1, -2, -2, 1, -1, -8, 2, -2, 1, -2, -1, 4, 1, 4, 1, 1, -1, 2, -1, 1, -2, 32, 1, -1, -1, -2, 1, -1, -1, -8, -1, 1, -2, -2, 1, -1, -1, -8, 8, 1
Offset: 1

Views

Author

Gerard P. Michon, Jul 05 2009, Jul 06 2009

Keywords

Comments

The absolute value of this sequence is A162510.
The Moebius function (A008683) can be defined in terms of this sequence: A008683(n) is equal to a(n) if a(n) is odd and zero otherwise.

Crossrefs

Programs

  • Maple
    A162512 := proc(n)
        local a,f;
        a := 1;
        for f in ifactors(n)[2] do
            a := -a*(-2)^(op(2,f)-1) ;
        end do:
        return a;
    end proc:
    seq(A162512(n),n=1..100) ; # R. J. Mathar, May 20 2017
  • Mathematica
    b[n_] := (-1)^(PrimeOmega[n] - PrimeNu[n]);
    a[n_] := a[n] = If[n == 1, 1, -Sum[b[n/d] a[d], {d, Most@ Divisors[n]}]];
    Array[a, 100] (* Jean-François Alcover, Feb 17 2020 *)
  • PARI
    a(n) = my(f=factor(n)); for(i=1, #f~, f[i,1]=-(-2)^(f[i,2]-1); f[i,2]=1); factorback(f); \\ Michel Marcus, May 20 2017
    
  • Python
    from sympy import factorint
    from operator import mul
    def a(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [-(-2)**(f[i] - 1) for i in f]) # Indranil Ghosh, May 20 2017
    
  • Scheme
    (define (A162512 n) (if (= 1 n) n (* (- (expt -2 (- (A067029 n) 1))) (A162512 (A028234 n))))) ;; Antti Karttunen, May 20 2017, after the given multiplicative formula.

Formula

Multiplicative function with a(p^e)=-(-2)^(e-1) for any prime p and any positive exponent e.
a(n) = n/2 when n is a power of 4 (A000302).
a(n) = A008683(n) when n is a squarefree number (A005117).
Dirichlet g.f.: Product_{p prime} ((p^s + 1)/(p^s + 2)). - Amiram Eldar, Oct 26 2023

A046660 Excess of n = number of prime divisors (with multiplicity) - number of prime divisors (without multiplicity).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

a(n) depends only on prime signature of n (cf. A025487). So a(24) = a(375) since 24 = 2^3 * 3 and 375 = 3 * 5^3 both have prime signature (3, 1).
a(n) = 0 for squarefree n.
A162511(n) = (-1)^a(n). - Reinhard Zumkeller, Jul 08 2009
a(n) = the number of divisors of n that are each a composite power of a prime. - Leroy Quet, Dec 02 2009
a(A005117(n)) = 0; a(A060687(n)) = 1; a(A195086(n)) = 2; a(A195087(n)) = 3; a(A195088(n)) = 4; a(A195089(n)) = 5; a(A195090(n)) = 6; a(A195091(n)) = 7; a(A195092(n)) = 8; a(A195093(n)) = 9; a(A195069(n)) = 10. - Reinhard Zumkeller, Nov 29 2015

References

  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, pp. 51-52.

Crossrefs

Programs

  • Haskell
    import Math.NumberTheory.Primes.Factorisation (factorise)
    a046660 n = sum es - length es where es = snd $ unzip $ factorise n
    -- Reinhard Zumkeller, Nov 28 2015, Jan 09 2013
    
  • Maple
    with(numtheory); A046660 := n -> bigomega(n)-nops(factorset(n)):
    seq(A046660(k), k=1..100); # Wesley Ivan Hurt, Oct 27 2013
    # Or:
    with(NumberTheory): A046660 := n -> NumberOfPrimeFactors(n) - NumberOfPrimeFactors(n, 'distinct'):  # Peter Luschny, Jul 14 2023
  • Mathematica
    Table[PrimeOmega[n] - PrimeNu[n], {n, 50}] (* or *) muf[n_] := Module[{fi = FactorInteger[n]}, Total[Transpose[fi][[2]]] - Length[fi]]; Array[muf, 50] (* Harvey P. Dale, Sep 07 2011. The second program is several times faster than the first program for generating large numbers of terms. *)
  • PARI
    a(n)=bigomega(n)-omega(n) \\ Charles R Greathouse IV, Nov 14 2012
    
  • PARI
    a(n)=my(f=factor(n)[,2]); vecsum(f)-#f \\ Charles R Greathouse IV, Aug 01 2016
    
  • Python
    from sympy import factorint
    def A046660(n): return sum(e-1 for e in factorint(n).values()) # Chai Wah Wu, Jul 18 2023

Formula

a(n) = Omega(n) - omega(n) = A001222(n) - A001221(n).
Additive with a(p^e) = e - 1.
a(n) = Sum_{k = 1..A001221(n)} (A124010(n,k) - 1). - Reinhard Zumkeller, Jan 09 2013
G.f.: Sum_{p prime, k>=2} x^(p^k)/(1 - x^(p^k)). - Ilya Gutkovskiy, Jan 06 2017
Asymptotic mean: lim_{m->oo} (1/m) Sum_{k=1..m} a(k) = Sum_{p prime} 1/(p*(p-1)) = 0.773156... (A136141). - Amiram Eldar, Jul 28 2020
a(n) = Sum_{p|n} A286563(n/p,p), where p is prime. - Ridouane Oudra, Sep 13 2023
a(n) = A275812(n) - A056170(n). - Amiram Eldar, Jan 09 2024
a(n) = A001222(A003557(n)). - Peter Munn, Feb 06 2024

Extensions

More terms from David W. Wilson

A212172 Row n of table represents second signature of n: list of exponents >= 2 in canonical prime factorization of n, in nonincreasing order, or 0 if no such exponent exists.

Original entry on oeis.org

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

Views

Author

Matthew Vandermast, Jun 03 2012

Keywords

Comments

Length of row n equals A056170(n) if A056170(n) is positive, or 1 if A056170(n) = 0.
The multiset of exponents >=2 in the prime factorization of n completely determines a(n) for over 20 sequences in the database (see crossreferences). It also determines the fractions A034444(n)/A000005(n) and A037445(n)/A000005(n).
For squarefree numbers, this multiset is { } (the empty multiset). The use of 0 in the table to represent each n with no exponents >=2 in its prime factorization accords with the usual OEIS practice of using 0 to represent nonexistent elements when possible. In comments, the second signature of squarefree numbers will be represented as { }.
For each second signature {S}, there exist values of j and k such that, if the second signature of n is {S}, then A085082(n) is congruent to j modulo k. These values are nontrivial unless {S} = { }. Analogous (but not necessarily identical) values of j and k also exist for each second signature with respect to A088873 and A181796.
Each sequence of integers with a given second signature {S} has a positive density, unlike the analogous sequences for prime signatures. The highest of these densities is 6/Pi^2 = 0.607927... for A005117 ({S} = { }).

Examples

			First rows of table read: 0; 0; 0; 2; 0; 0; 0; 3; 2; 0; 0; 2;...
12 = 2^2*3 has positive exponents 2 and 1 in its canonical prime factorization (1s are often left implicit as exponents). Since only exponents that are 2 or greater appear in a number's second signature, 12's second signature is {2}.
30 = 2*3*5 has no exponents greater than 1 in its prime factorization. The multiset of its exponents >= 2 is { } (the empty multiset), represented in the table with a 0.
72 = 2^3*3^2 has positive exponents 3 and 2 in its prime factorization, as does 108 = 2^2*3^3. Rows 72 and 108 both read {3,2}.
		

Crossrefs

A181800 gives first integer of each second signature. Also see A212171, A212173-A212181, A212642-A212644.
Functions determined by exponents >=2 in the prime factorization of n:
Additive: A046660, A056170.
Other: A007424, A051903 (for n > 1), A056626, A066301, A071325, A072411, A091050, A107078, A185102 (for n > 1), A212180.
Sequences that contain all integers of a specific second signature: A005117 (second signature { }), A060687 ({2}), A048109 ({3}).

Programs

  • Magma
    &cat[IsEmpty(e)select [0]else Reverse(Sort(e))where e is[pe[2]:pe in Factorisation(n)|pe[2]gt 1]:n in[1..102]]; // Jason Kimberley, Jun 13 2012
  • Mathematica
    row[n_] := Select[ FactorInteger[n][[All, 2]], # >= 2 &] /. {} -> 0 /. {k__} -> Sequence[k]; Table[row[n], {n, 1, 100}] (* Jean-François Alcover, Apr 16 2013 *)

Formula

For nonsquarefree n, row n is identical to row A057521(n) of table A212171.

A307868 Decimal expansion of the asymptotic mean of phi(k)/psi(k), where phi(k) is Euler totient function (A000010) and psi(k) is Dedekind psi function (A001615).

Original entry on oeis.org

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

Views

Author

Amiram Eldar, May 02 2019

Keywords

Comments

Also, the asymptotic mean of A162511. - Amiram Eldar, Sep 18 2022

Examples

			0.47168061361299786807523563308048208742592638200698...
		

Crossrefs

Programs

  • Mathematica
    $MaxExtraPrecision = 1000; m = 1000; c = LinearRecurrence[{-2, 1, 2}, {0, -4, 6}, m]; RealDigits[(2/3) * Exp[NSum[Indexed[c, n]*(PrimeZetaP[n] - 1/2^n)/n, {n, 2, m}, NSumTerms -> m, WorkingPrecision -> m]], 10, 100][[1]]
  • PARI
    prodeulerrat(1 - 2/(p*(p+1))) \\ Vaclav Kotesovec, Sep 19 2020

Formula

Equals lim_{m->oo} (1/m)*Sum_{k=1..m} phi(k)/psi(k).
Equals Product_{p prime} (1 - 2/(p * (p+1))).
Equals A065472 / zeta(2). - Amiram Eldar, Sep 18 2022

Extensions

More digits from Vaclav Kotesovec, Sep 19 2020

A162510 Dirichlet inverse of A076479.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 4, 2, 1, 1, 2, 1, 1, 1, 8, 1, 2, 1, 2, 1, 1, 1, 4, 2, 1, 4, 2, 1, 1, 1, 16, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 2, 2, 1, 1, 8, 2, 2, 1, 2, 1, 4, 1, 4, 1, 1, 1, 2, 1, 1, 2, 32, 1, 1, 1, 2, 1, 1, 1, 8, 1, 1, 2, 2, 1, 1, 1, 8, 8, 1, 1, 2, 1, 1, 1, 4, 1, 2, 1, 2, 1, 1, 1, 16, 1, 2, 2, 4, 1, 1, 1, 4, 1
Offset: 1

Views

Author

Gerard P. Michon, Jul 05 2009

Keywords

Comments

Apart from signs, this sequence is identical to A162512.

Crossrefs

Programs

  • Maple
    A162510 := proc(n)
        local a,f;
        a := 1;
        for f in ifactors(n)[2] do
            a := a*2^(op(2,f)-1) ;
        end do:
        return a;
    end proc: # R. J. Mathar, May 20 2017
  • Mathematica
    a[n_] := 2^(PrimeOmega[n] - PrimeNu[n]); Array[a, 100] (* Jean-François Alcover, Apr 24 2017, after R. J. Mathar *)
  • PARI
    a(n)=my(f=factor(n)[,2]); 2^(vecsum(f)-#f) \\ Charles R Greathouse IV, Nov 02 2016
    
  • Python
    from sympy import factorint
    from operator import mul
    def a(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [2**(f[i] - 1) for i in f]) # Indranil Ghosh, May 20 2017

Formula

Multiplicative with a(p^e) = 2^(e-1) for any prime p and any positive exponent e.
a(n) = n/2 when n is a power of 2 (A000079).
a(n) = 1 when n is a squarefree number (A005117).
a(n) = 2^A046660(n) = A061142(n)/A034444(n). - R. J. Mathar, Nov 02 2016
a(n) = Sum_{d|n} mu(d) * 2^A001222(n/d). - Daniel Suteu, May 21 2020
a(1) = 1; a(n) = -Sum_{d|n, d < n} (-1)^omega(n/d) * a(d). - Ilya Gutkovskiy, Mar 10 2021
Dirichlet g.f.: (1/zeta(s)) * Product_{p prime} (1/(1 - 2/p^s)). - Amiram Eldar, Sep 16 2023
Sum_{k=1..n} 1/a(k) = c * n + o(n), where c = Product_{p prime} (1 - 1/(p*(2*p-1))) = 0.74030830284678515949... (Jakimczuk, 2024, Theorem 2.4, p. 16). - Amiram Eldar, Mar 08 2024
From Vaclav Kotesovec, Mar 08 2024: (Start)
Dirichlet g.f.: zeta(s) * (1 + 1/(2^s*(2^s - 2))) * f(s), where f(s) = Product_{p prime, p>2} (1 + 1/(p^s*(p^s - 2))).
Sum_{k=1..n} a(k) ~ (f(1)*n / (4*log(2))) * (log(n) - 1 + gamma + 5*log(2)/2 + f'(1)/f(1)), where
f(1) = Product_{p prime, p>2} (1 + 1/(p*(p-2))) = A167864 = 1.51478012813749125771853381230067247330485921179389884042843306025133959...,
f'(1) = f(1) * Sum_{p prime, p>2} (-2*log(p)/((p-1)*(p-2))) = -2*f(1)*A347195 = -2.6035805486753944250682818932032862770113061830543948257159113584026980...
and gamma is the Euler-Mascheroni constant A001620. (End)

A327666 a(n) = Sum_{k = 1..n} (-1)^(Omega(k) - omega(k)), where Omega(k) counts prime factors of k with multiplicity and omega(k) counts distinct prime factors.

Original entry on oeis.org

1, 2, 3, 2, 3, 4, 5, 6, 5, 6, 7, 6, 7, 8, 9, 8, 9, 8, 9, 8, 9, 10, 11, 12, 11, 12, 13, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 26, 25, 26, 27, 26, 25, 24, 25, 24, 25, 26, 27, 28, 29, 30, 31, 30, 31, 32, 31, 30, 31, 32, 33, 32, 33, 34
Offset: 1

Views

Author

Ilya Gutkovskiy, Sep 21 2019

Keywords

Comments

Partial sums of A162511.

Examples

			Omega(1) = omega(1) = 0. The difference is 0, so (-1)^0 = 1, so a(1) = 1.
Omega(2) = omega(2) = 1. The difference is 0, so (-1)^0 = 1, which is added to a(1) to give a(2) = 2.
Omega(3) = omega(3) = 1. The difference is 0, so (-1)^0 = 1, which is added to a(2) to give a(3) = 3.
Omega(4) = 2 but omega(4) = 1. The difference is 1, so (-1)^1 = -1, which is added to a(3) to give a(4) = 2.
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[(-1)^(PrimeOmega[k] - PrimeNu[k]), {k, n}], {n, 70}]
    f[p_, e_] := (-1)^(e - 1); Accumulate @ Table[Times @@ f @@@ FactorInteger[n], {n, 1, 100}] (* Amiram Eldar, Sep 18 2022 *)
  • PARI
    seq(n)={my(v=vector(n)); v[1]=1; for(k=2, n, v[k] = v[k-1] + (-1)^(bigomega(k)-omega(k))); v} \\ Andrew Howroyd, Sep 23 2019
    
  • Python
    from functools import reduce
    from sympy import factorint
    def A327666(n): return sum(-1 if reduce(lambda a,b:~(a^b), factorint(i).values(),0)&1 else 1 for i in range(1,n+1)) # Chai Wah Wu, Jan 01 2023

Formula

a(1) = 1, a(n) = a(n - 1) + (-1)^(Omega(n) - omega(n)) for n > 1.
a(n) ~ c * n, where c = A307868. - Amiram Eldar, Sep 18 2022

A327668 a(n) = n * Sum_{d|n} (-1)^(bigomega(d) - omega(d)) / d.

Original entry on oeis.org

1, 3, 4, 5, 6, 12, 8, 11, 11, 18, 12, 20, 14, 24, 24, 21, 18, 33, 20, 30, 32, 36, 24, 44, 29, 42, 34, 40, 30, 72, 32, 43, 48, 54, 48, 55, 38, 60, 56, 66, 42, 96, 44, 60, 66, 72, 48, 84, 55, 87, 72, 70, 54, 102, 72, 88, 80, 90, 60, 120, 62, 96, 88, 85, 84, 144, 68, 90, 96, 144
Offset: 1

Views

Author

Ilya Gutkovskiy, Sep 21 2019

Keywords

Crossrefs

Programs

  • Maple
    with(numtheory):
    a:= n-> n*add((-1)^(bigomega(d)-nops(factorset(d)))/d, d=divisors(n)):
    seq(a(n), n=1..80);  # Alois P. Heinz, Sep 21 2019
  • Mathematica
    a[n_] := n Sum[(-1)^(PrimeOmega[d] - PrimeNu[d])/d, {d, Divisors[n]}]; Table[a[n], {n, 1, 70}]
    f[p_, e_] := p^e + (p^e-(-1)^e)/(p+1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Dec 01 2022 *)
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, f[i,1]^f[i,2] + (f[i,1]^f[i,2] - (-1)^f[i,2])/(f[i,1]+1));} \\ Amiram Eldar, Dec 01 2022

Formula

G.f.: Sum_{k>=1} mu(rad(k)) * lambda(k) * x^k / (1 - x^k)^2.
a(p) = p + 1, where p is prime.
From Amiram Eldar, Dec 01 2022: (Start)
Multiplicative with a(p^e) = p^e + (p^e-(-1)^e)/(p+1).
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/2) * Product_{p prime} ((p^2+2)/(p^2+1)) = 0.7207673679... . (End)

A328181 a(n) = (-1)^(bigomega(n) - omega(n)) * Sum_{d|n} (-1)^(bigomega(d) - omega(d)) * d.

Original entry on oeis.org

1, 3, 4, 1, 6, 12, 8, 7, 5, 18, 12, 4, 14, 24, 24, 9, 18, 15, 20, 6, 32, 36, 24, 28, 19, 42, 22, 8, 30, 72, 32, 23, 48, 54, 48, 5, 38, 60, 56, 42, 42, 96, 44, 12, 30, 72, 48, 36, 41, 57, 72, 14, 54, 66, 72, 56, 80, 90, 60, 24, 62, 96, 40, 41, 84, 144, 68, 18, 96, 144
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 06 2019

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := (-1)^(PrimeOmega[n] - PrimeNu[n]) Sum[(-1)^(PrimeOmega[d] - PrimeNu[d]) d, {d, Divisors[n]}]; Table[a[n], {n, 1, 70}]
    f[p_, e_] := (p^(e+1) - (-1)^e *(2*p+1))/(p+1); a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Dec 02 2020 *)
  • PARI
    a(n) = (-1)^(bigomega(n)-omega(n))*sumdiv(n, d, (-1)^(bigomega(d)-omega(d))*d); \\ Michel Marcus, Oct 06 2019

Formula

a(p) = p + 1, where p is prime.
Multiplicative with a(p^e) = (p^(e+1) - (-1)^e*(2*p+1))/(p+1). - Amiram Eldar, Dec 02 2020
Sum_{k=1..n} a(k) ~ c * n^2, where c = (Pi^2/30) * Product_{p prime} (1 + 2/p^2 - 2/p^3) = 0.5507877576... . - Amiram Eldar, Nov 06 2022
Showing 1-10 of 11 results. Next