Displaying 1-9 of 9 results found.
page
1
a(n) = Sum_{d|n} A061019(d) * A003961(n/d), where A061019 negates the primes in the prime factorization, while A003961 shifts the factorization one step towards larger primes.
+20
7
1, 1, 2, 7, 2, 2, 4, 13, 19, 2, 2, 14, 4, 4, 4, 55, 2, 19, 4, 14, 8, 2, 6, 26, 39, 4, 68, 28, 2, 4, 6, 133, 4, 2, 8, 133, 4, 4, 8, 26, 2, 8, 4, 14, 38, 6, 6, 110, 93, 39, 4, 28, 6, 68, 4, 52, 8, 2, 2, 28, 6, 6, 76, 463, 8, 4, 4, 14, 12, 8, 2, 247, 6, 4, 78, 28, 8, 8, 4, 110, 421, 2, 6, 56, 4, 4, 4, 26, 8, 38, 16
COMMENTS
All terms are positive because all terms of A347237 are nonnegative and A347237(1) = 1.
Union of sequences A001359 and A108605 (= 2* A001359) seems to give the positions of 2's in this sequence.
MATHEMATICA
f[p_, e_] := ((np = NextPrime[p])^(e + 1) - (-p)^(e + 1))/(np + p); a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 02 2021 *)
PROG
(PARI)
A003961(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
A061019(n) = (((-1)^bigomega(n))*n);
CROSSREFS
Cf. A000040, A001223, A001359, A003961, A003973, A061019, A108605, A158523, A347237 (Möbius transform), A347238 (Dirichlet inverse), A347239.
1, -1, -4, 0, -5, 1, -6, -14, -5, 5, -6, -18, -31, -17, -2, 14, -3, -21, -40, -60, -39, -17, -40, -16, 9, 35, 8, -20, -49, -79, -110, -142, -109, -75, -40, -4, -41, -3, 36, 76, 35, -7, -50, -94, -139, -93, -140, -188, -139, -189, -138, -190, -243, -189, -134
MATHEMATICA
Accumulate[Table[n*(-1)^PrimeOmega[n], {n, 70}]] (* Harvey P. Dale, Apr 02 2015 *)
PROG
(Haskell)
a239122 n = a239122_list !! (n-1)
a239122_list = scanl1 (+) a061019_list
(Python)
from functools import reduce
from operator import ixor
from sympy import factorint
def A239122(n): return sum(-i if reduce(ixor, factorint(i).values(), 0)&1 else i for i in range(1, n+1)) # Chai Wah Wu, Jan 03 2023
Negate primes in factorizations of divisors of n, then sum.
+10
16
1, -1, -2, 3, -4, 2, -6, -5, 7, 4, -10, -6, -12, 6, 8, 11, -16, -7, -18, -12, 12, 10, -22, 10, 21, 12, -20, -18, -28, -8, -30, -21, 20, 16, 24, 21, -36, 18, 24, 20, -40, -12, -42, -30, -28, 22, -46, -22, 43, -21, 32, -36, -52, 20, 40, 30, 36, 28, -58, 24, -60, 30, -42, 43, 48, -20, -66, -48, 44, -24, -70, -35
COMMENTS
Analog of sigma function A000203(n) with primes negated.
Unsigned sequence |a(n)| ( A206369) gives the number of numbers 1 <= k <= n for which GCD(k,n) is a square. |a(n)| = Sum_{d|n} d*(-1)^bigomega(n/d). - Vladeta Jovovic, Dec 29 2002
LINKS
Dana G. Korssjoen, Biyao Li, Stefan Steinerberger, Raghavendra Tripathi, and Ruimin Zhang, Finding structure in sequences of real numbers via graph theory: a problem list, Involve, a Journal of Mathematics, Vol. 15, No. 2 (2022), pp. 251-270; arXiv preprint, arXiv:2012.04625 [math.CO], 2020-2021.
FORMULA
Replace each divisor d of n by A061019[d] and sum. Replace p^q with (1-(-p)^(q+1))/(1+p) in prime factorization of n.
Inverse mobius transform of A061019. In other words a(n) = Sum_{d|n} d*(-1)^bigomega(d), where bigomega(n) = A001222(n).
a(n) = Sum_{d|n} d*mu(core(d)) where core(x) = A007913(x) is the smallest number such that x*core(x) is a square. - Benoit Cloitre, Apr 07 2002
G.f.: A(x) = Sum_{k>=1} lambda(k)*k*x^k/(1 - x^k) where lambda(k) is the Liouville function, A008836. - Stuart Clary, Apr 15 2006
Dirichlet g.f.: zeta(s)*zeta(2 s - 2)/zeta(s - 1). - Stuart Clary, Apr 15, 2006
EXAMPLE
a(12) = 1-2-3+4+6-12 = (1-2+4)*(1-3) = -6.
MAPLE
with(numtheory):
A061020 := proc(n) local d; add(d*(-1)^bigomega(d), d=divisors(n)) end:
MATHEMATICA
nmax = 72; Drop[ CoefficientList[ Series[ Sum[ LiouvilleLambda[k] k x^k/(1 - x^k), {k, 1, nmax} ], {x, 0, nmax} ], x ], 1 ] (* Stuart Clary, Apr 15 2006, updated by Jean-François Alcover, Dec 04 2017 *)
f[p_, e_] := ((-p)^(e+1)-1)/(-p-1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 24 2023 *)
PROG
(PARI) for(n=1, 100, print1(sumdiv(n, d, (d)*moebius(core(d))), ", "))
(PARI) a(n)=if(n<1, 0, direuler(p=2, n, 1/(1-X)/(1+p*X))[n]) \\ Ralf Stephan
(PARI) A061020(n) = {my(f=factorint(n)); prod(k=1, #f[, 2], ((-f[k, 1])^(f[k, 2]+1)-1)/(-f[k, 1]-1))} \\ Andrew Lelechenko, Apr 22 2014
(Haskell)
a061020 = sum . map a061019 . a027750_row
Moebius transform of negated primes in factorization of n.
+10
7
1, -3, -4, 6, -6, 12, -8, -12, 12, 18, -12, -24, -14, 24, 24, 24, -18, -36, -20, -36, 32, 36, -24, 48, 30, 42, -36, -48, -30, -72, -32, -48, 48, 54, 48, 72, -38, 60, 56, 72, -42, -96, -44, -72, -72, 72, -48, -96, 56, -90, 72, -84, -54, 108, 72, 96, 80, 90, -60, 144, -62, 96, -96, 96, 84, -144, -68, -108, 96, -144
FORMULA
Multiplicative with a(p^e) = (-1)^e*(p+1)*p^(e-1), e>0. a(1)=1.
Inverse Moebius transform gives A061019.
Dirichlet g.f.: zeta(2*s-2)/(zeta(s-1)*zeta(s)). - Amiram Eldar, Jan 05 2023
EXAMPLE
a(72) = a(2^3*3^2) = (-1)^3*(2+1)*2^(3-1) * (-1)^2*(3+1)*3^(2-1) = (-12)*12 = -144.
MATHEMATICA
f[p_, e_] := (-1)^e*(p + 1)*p^(e - 1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jan 05 2023 *)
PROG
(PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~, (-1)^f[i, 2]*(f[i, 1]+1)*f[i, 1]^(f[i, 2]-1)); } \\ Amiram Eldar, Jan 05 2023
CROSSREFS
Cf. A061019, A008683, A061020, A007427, A000012, A007428, A000005, A001615, A001222, A000040, A006881, A120944, A000961, A378434.
1, -1, -2, -6, -2, 2, -4, 0, -15, 2, -2, 12, -4, 4, 4, 0, -2, 15, -4, 12, 8, 2, -6, 0, -35, 4, 0, 24, -2, -4, -6, 0, 4, 2, 8, 90, -4, 4, 8, 0, -2, -8, -4, 12, 30, 6, -6, 0, -77, 35, 4, 24, -6, 0, 4, 0, 8, 2, -2, -24, -6, 6, 60, 0, 8, -4, -4, 12, 12, -8, -2, 0, -6, 4, 70, 24, 8, -8, -4, 0, 0, 2, -6, -48, 4, 4, 4, 0, -8
COMMENTS
It seems that A046099 gives the positions of zeros.
FORMULA
a(1) = 1; a(n) = -Sum_{d|n, d < n} A347236(n/d) * a(d).
PROG
(PARI)
up_to = 16384;
DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1]*sumdiv(n, d, if(d<n, v[n/d]*u[d], 0)))); (u) }; \\ Compute the Dirichlet inverse of the sequence given in input vector v.
A003961(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
A061019(n) = (((-1)^bigomega(n))*n);
v347238 = DirInverseCorrect(vector(up_to, n, A347236(n)));
Expansion of Sum_{k>=1} lambda(k) * k * x^k/(1 + x^k) where lambda(k) is the Liouville function, A008836.
+10
3
1, -3, -2, 5, -4, 6, -6, -11, 7, 12, -10, -10, -12, 18, 8, 21, -16, -21, -18, -20, 12, 30, -22, 22, 21, 36, -20, -30, -28, -24, -30, -43, 20, 48, 24, 35, -36, 54, 24, 44, -40, -36, -42, -50, -28, 66, -46, -42, 43, -63, 32, -60, -52, 60, 40, 66, 36, 84, -58, 40, -60, 90, -42, 85, 48, -60, -66, -80, 44, -72, -70, -77, -72, 108, -42
FORMULA
a(n) = Sum_{d|n} (-1)^(n/d - 1)*lambda(d)*d, Dirichlet convolution of A061019 and A062157.
G.f.: A(x) is x times the logarithmic derivative of A118207(x).
Dirichlet g.f.: zeta(s)*zeta(2s-2)*(1-2^(1-s))/zeta(s-1). - R. J. Mathar, Jul 03 2011
Multiplicative with a(2^e) = ((-1)^e*2^(e+2) - 1)/3, and a(p^e) = (p*(-p)^e+1)/(p+1) for an odd prime p. - Amiram Eldar, Aug 12 2023
MATHEMATICA
nmax = 80; lambda[k_Integer?Positive] := If[ k > 1, (-1)^Total[ Part[Transpose[FactorInteger[k]], 2] ], 1 ]; Drop[ CoefficientList[ Series[ Sum[ lambda[k] k x^k/(1 + x^k), {k, 1, nmax} ], {x, 0, nmax} ], x ], 1 ]
f[p_, e_] := (p*(-p)^e+1)/(p+1); f[2, e_] := ((-1)^e*2^(e+2) - 1)/3; a[n_] := Times @@ f @@@ FactorInteger[n]; a[1] = 1; Array[a, 100] (* Amiram Eldar, Aug 12 2023 *)
PROG
(PARI) a(n) = sumdiv(n, d, (-1)^(n/d - 1)*(-1)^vecsum(factor(d)[, 2])*d) \\ Michel Marcus, Dec 10 2016
1, 0, 1, 6, 1, 0, 3, 6, 17, 0, 1, 6, 3, 0, 1, 42, 1, 0, 3, 6, 3, 0, 5, 6, 37, 0, 49, 18, 1, 0, 5, 78, 1, 0, 3, 102, 3, 0, 3, 6, 1, 0, 3, 6, 17, 0, 5, 42, 89, 0, 1, 18, 5, 0, 1, 18, 3, 0, 1, 6, 5, 0, 51, 330, 3, 0, 3, 6, 5, 0, 1, 102, 5, 0, 37, 18, 3, 0, 3, 42, 353, 0, 5, 18, 1, 0, 1, 6, 7, 0, 9, 30, 5, 0, 3, 78, 3, 0, 17
COMMENTS
All terms are nonnegative because sequence is multiplicative and a(p^k) >= 0 for all primes p and k >= 0.
Proof: For any prime p, sequence a(p^k), k>=0, is obtained as an ordinary convolution of sequences (-p)^k and the first differences of q^k, where q = A151800(p). (E.g., for powers of 2, the sequences convolved are A122803 and A025192, giving A102901.) This convolution is an alternating sum, with the terms 1*(q-1)*q^(k-1), -(p)*(q-1)*q^(k-2), (p^2)*(q-1)*q^(k-3), -(p^3)*(q-1)*q^(k-4), ..., (p^(k-1))*(q-1), -(p^k), for odd k, with sum of each consecutive pair being nonnegative because q >= p+1, while with an even exponent k, the leftover term p^k at the end is also positive, thus the whole sum is nonnegative also in that case.
(End)
FORMULA
For all n >= 0, a(2^n) = A102901(n).
For all n >= 0, a(3^n) = A120612(n).
PROG
(PARI)
A003961(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
A061019(n) = (((-1)^bigomega(n))*n);
\\ Or alternatively as:
A158523(n) = { my(f=factor(n)); prod(i=1, #f~, my(p=f[i, 1], e=f[i, 2]); ((-1)^e)*(p+1)*(p^(e-1))); };
CROSSREFS
Cf. A000040, A001223, A003961, A003972, A008683, A008836, A016825 (positions of zeros), A061019, A102901, A120612, A158523, A347236.
Sum of A347236 and its Dirichlet inverse.
+10
3
2, 0, 0, 1, 0, 4, 0, 13, 4, 4, 0, 26, 0, 8, 8, 55, 0, 34, 0, 26, 16, 4, 0, 26, 4, 8, 68, 52, 0, 0, 0, 133, 8, 4, 16, 223, 0, 8, 16, 26, 0, 0, 0, 26, 68, 12, 0, 110, 16, 74, 8, 52, 0, 68, 8, 52, 16, 4, 0, 4, 0, 12, 136, 463, 16, 0, 0, 26, 24, 0, 0, 247, 0, 8, 148, 52, 16, 0, 0, 110, 421, 4, 0, 8, 8, 8, 8, 26, 0, 8, 32
COMMENTS
It seems that A030059 gives the positions of all zeros.
FORMULA
a(1) = 2, and for n >1, a(n) = -Sum_{d|n, 1<d<n} A347236(d) * A347238(n/d).
PROG
(PARI)
up_to = 16384;
DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1]*sumdiv(n, d, if(d<n, v[n/d]*u[d], 0)))); (u) }; \\ Compute the Dirichlet inverse of the sequence given in input vector v.
A003961(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
A061019(n) = (((-1)^bigomega(n))*n);
v347238 = DirInverseCorrect(vector(up_to, n, A347236(n)));
Multiplicative sequence with a(p^e) = (-1)^e * p^(2*floor(e/2)) for prime p and e >= 0.
+10
1
1, -1, -1, 4, -1, 1, -1, -4, 9, 1, -1, -4, -1, 1, 1, 16, -1, -9, -1, -4, 1, 1, -1, 4, 25, 1, -9, -4, -1, -1, -1, -16, 1, 1, 1, 36, -1, 1, 1, 4, -1, -1, -1, -4, -9, 1, -1, -16, 49, -25, 1, -4, -1, 9, 1, 4, 1, 1, -1, 4, -1, 1, -9, 64, 1, -1, -1, -4, 1, -1, -1, -36, -1, 1, -25, -4, 1, -1, -1, -16
FORMULA
Dirichlet g.f.: zeta(2*s-2) / zeta(s).
Dirichlet inverse b(n), n > 0, is multiplicative with b(p) = 1 and b(p^e) = 1 - p^2 for prime p and e > 1.
Conjecture: a(n) = Sum_{k=1..n} gcd(k, n) * lambda(gcd(k, n)) for n > 0.
MAPLE
local a, pe, e, p ;
a := 1;
for pe in ifactors(n)[2] do
e := op(2, pe) ;
p := op(1, pe) ;
a := a*(-1)^e*p^(2*floor(e/2)) ;
end do:
a ;
end proc:
MATHEMATICA
f[p_, e_] := (-1)^e * p^(2*Floor[e/2]); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 07 2022 *)
PROG
(Python)
from math import prod
from sympy import factorint
def A358272(n): return prod(-p**(e&-2) if e&1 else p**(e&-2) for p, e in factorint(n).items()) # Chai Wah Wu, Jan 17 2023
Search completed in 0.010 seconds
|