[go: up one dir, main page]

login
Search: a228441 -id:a228441
     Sort: relevance | references | number | modified | created      Format: long | short | data
Square array A(n,k), n >= 1, k >= 0, read by antidiagonals: A(n,k) = Sum_{d|n} (-1)^(n/d+d)*d^k.
+10
16
1, 1, -2, 1, -3, 2, 1, -5, 4, -1, 1, -9, 10, -3, 2, 1, -17, 28, -13, 6, -4, 1, -33, 82, -57, 26, -12, 2, 1, -65, 244, -241, 126, -50, 8, 0, 1, -129, 730, -993, 626, -252, 50, -3, 3, 1, -257, 2188, -4033, 3126, -1394, 344, -45, 13, -4, 1, -513, 6562, -16257, 15626, -8052, 2402, -441, 91, -18, 2
OFFSET
1,3
COMMENTS
For each k, the k-th column sequence (T(n,k))(n>=1) is a multiplicative function of n, equal to (-1)^(n+1)*(Id_k * 1) in the notation of the Bala link. - Peter Bala, Mar 19 2022
FORMULA
G.f. of column k: Sum_{j>=1} (-1)^(j+1)*j^k*x^j/(1 + x^j).
EXAMPLE
Square array begins:
1, 1, 1, 1, 1, 1, ...
-2, -3, -5, -9, -17, -33, ...
2, 4, 10, 28, 82, 244, ...
-1, -3, -13, -57, -241, -993, ...
2, 6, 26, 126, 626, 3126, ...
-4, -12, -50, -252, -1394, -8052, ...
MATHEMATICA
Table[Function[k, Sum[(-1)^(n/d+d) d^k, {d, Divisors[n]}]][i - n], {i, 0, 11}, {n, 1, i}] // Flatten
Table[Function[k, SeriesCoefficient[Sum[(-1)^(j + 1) j^k x^j/(1 + x^j), {j, 1, n}], {x, 0, n}]][i - n], {i, 0, 11}, {n, 1, i}] // Flatten
f[p_, e_, k_] := If[k == 0, e + 1, (p^(k*e + k) - 1)/(p^k - 1)]; f[2, e_, k_] := If[k == 0, e - 3, -((2^(k - 1) - 1)*2^(k*e + 1) + 2^(k + 1) - 1)/(2^k - 1)]; T[1, k_] = 1; T[n_, k_] := Times @@ (f[First[#], Last[#], k] & /@ FactorInteger[n]); Table[T[n - k, k], {n, 1, 11}, {k, n - 1, 0, -1}] // Flatten (* Amiram Eldar, Nov 22 2022 *)
PROG
(PARI) T(n, k)={sumdiv(n, d, (-1)^(n/d+d)*d^k)}
for(n=1, 10, for(k=0, 8, print1(T(n, k), ", ")); print); \\ Andrew Howroyd, Nov 26 2018
KEYWORD
sign,tabl
AUTHOR
Ilya Gutkovskiy, Nov 26 2018
STATUS
approved
a(n) = Sum_{d divides n} (-1)^(d + n/d) * d^2.
+10
7
1, -5, 10, -13, 26, -50, 50, -45, 91, -130, 122, -130, 170, -250, 260, -173, 290, -455, 362, -338, 500, -610, 530, -450, 651, -850, 820, -650, 842, -1300, 962, -685, 1220, -1450, 1300, -1183, 1370, -1810, 1700, -1170, 1682, -2500, 1850, -1586, 2366
OFFSET
1,2
FORMULA
G.f.: Sum_{k>=1} (-1)^(k+1)*k^2*x^k/(1 + x^k). - Ilya Gutkovskiy, Nov 27 2018
G.f.: Sum_{k>=1} (-1)^(k+1)*(x^k - x^(2*k))/(1 + x^k)^3. - Michael Somos, Oct 24 2019
a(n) = -(-1)^n A328667(n). a(2*n + 1) = A078306(2*n + 1). a(2*n) = A078306(2*n) - 8*A078306(n). - Michael Somos, Oct 24 2019
From Peter Bala, Jan 29 2022: (Start)
Multiplicative with a(2^k) = - (2^(2*k+1) + 7)/3 for k >= 1 and a(p^k) = (p^(2*k+2) - 1)/(p^2 - 1) for odd prime p.
n^2 = (-1)^(n+1)*Sum_{d divides n} A067856(n/d)*a(d). (End)
EXAMPLE
G.f. = x - 5*x^2 + 10*x^3 - 13*x^4 + 26*x^5 - 50*x^6 + 50*x^7 + ... - Michael Somos, Oct 24 2019
MATHEMATICA
a[n_] := DivisorSum[n, (-1)^(# + n/#)*#^2 &]; Array[a, 50] (* Amiram Eldar, Nov 27 2018 *)
PROG
(PARI) apply( A321558(n)=sumdiv(n, d, (-1)^(n\d-d)*d^2), [1..30]) \\ M. F. Hasler, Nov 26 2018
(Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!( (&+[(-1)^(k+1)*k^2*x^k/(1 + x^k) : k in [1..2*m]]) )); // G. C. Greubel, Nov 28 2018
(Sage) s=(sum((-1)^(k+1)*k^2*x^k/(1 + x^k) for k in (1..50))).series(x, 30); a = s.coefficients(x, sparse=False); a[1:] # G. C. Greubel, Nov 28 2018
CROSSREFS
Column k=2 of A322083.
Cf. A321543 - A321557, A321810 - A321836 for similar sequences.
KEYWORD
sign,mult,look
AUTHOR
N. J. A. Sloane, Nov 23 2018
STATUS
approved
a(n) = Sum_{d|n, d < sqrt(n)} (-1)^(n/d).
+10
5
0, 1, -1, 1, -1, 0, -1, 2, -1, 0, -1, 3, -1, 0, -2, 2, -1, 1, -1, 1, -2, 0, -1, 4, -1, 0, -2, 1, -1, 2, -1, 3, -2, 0, -2, 2, -1, 0, -2, 4, -1, 0, -1, 1, -3, 0, -1, 5, -1, 1, -2, 1, -1, 0, -2, 4, -2, 0, -1, 4, -1, 0, -3, 3, -2, 0, -1, 1, -2, 2, -1, 4, -1, 0, -3, 1, -2, 0, -1, 5
OFFSET
1,8
LINKS
FORMULA
G.f.: Sum_{k>=1} (-1)^(k + 1) * x^(k*(k + 1)) / (1 + x^k).
MATHEMATICA
Table[DivisorSum[n, (-1)^(n/#) &, # < Sqrt[n] &], {n, 1, 80}]
nmax = 80; CoefficientList[Series[Sum[(-1)^(k + 1) x^(k (k + 1))/(1 + x^k), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
PROG
(PARI) A348951(n) = sumdiv(n, d, if((d*d)<n, (-1)^(n/d), 0)); \\ Antti Karttunen, Nov 05 2021
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, Nov 04 2021
STATUS
approved
a(n) = -Sum_{d|n, d < sqrt(n)} (-1)^(d + n/d).
+10
5
0, 1, -1, 1, -1, 2, -1, 0, -1, 2, -1, 1, -1, 2, -2, 0, -1, 3, -1, 1, -2, 2, -1, 0, -1, 2, -2, 1, -1, 4, -1, -1, -2, 2, -2, 2, -1, 2, -2, 0, -1, 4, -1, 1, -3, 2, -1, -1, -1, 3, -2, 1, -1, 4, -2, 0, -2, 2, -1, 2, -1, 2, -3, -1, -2, 4, -1, 1, -2, 4, -1, 0, -1, 2, -3, 1, -2, 4, -1, -1
OFFSET
1,6
LINKS
FORMULA
G.f.: Sum_{k>=1} x^(k*(k + 1)) / (1 + x^k).
For p odd prime, a(p) = a(p^2) = -1. - Bernard Schott, Nov 22 2021
MATHEMATICA
Table[-DivisorSum[n, (-1)^(# + n/#) &, # < Sqrt[n] &], {n, 1, 80}]
nmax = 80; CoefficientList[Series[Sum[x^(k (k + 1))/(1 + x^k), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
PROG
(PARI) A348952(n) = -sumdiv(n, d, if((d*d)<n, (-1)^(d + (n/d)), 0)); \\ Antti Karttunen, Nov 05 2021
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, Nov 04 2021
STATUS
approved
a(n) = Sum_{d|n, d <= sqrt(n)} (-1)^(n/d + 1).
+10
3
1, -1, 1, -2, 1, 0, 1, -2, 2, 0, 1, -3, 1, 0, 2, -3, 1, -1, 1, -1, 2, 0, 1, -4, 2, 0, 2, -1, 1, -2, 1, -3, 2, 0, 2, -3, 1, 0, 2, -4, 1, 0, 1, -1, 3, 0, 1, -5, 2, -1, 2, -1, 1, 0, 2, -4, 2, 0, 1, -4, 1, 0, 3, -4, 2, 0, 1, -1, 2, -2, 1, -4, 1, 0, 3, -1, 2, 0, 1, -5
OFFSET
1,4
LINKS
FORMULA
G.f.: Sum_{k>=1} (-1)^(k + 1) * x^(k^2) / (1 + x^k).
a(n) = 1 iff n = 1 or n is an odd prime (A006005). - Bernard Schott, Nov 22 2021
MATHEMATICA
Table[DivisorSum[n, (-1)^(n/# + 1) &, # <= Sqrt[n] &], {n, 1, 80}]
nmax = 80; CoefficientList[Series[Sum[(-1)^(k + 1) x^(k^2)/(1 + x^k), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
PROG
(PARI) A348515(n) = sumdiv(n, d, if((d*d)<=n, (-1)^(1 + (n/d)), 0)); \\ Antti Karttunen, Nov 05 2021
(Python)
from sympy import divisors
def a(n): return sum((-1)**(n//d + 1) for d in divisors(n) if d*d <= n)
print([a(n) for n in range(1, 81)]) # Michael S. Branicky, Nov 22 2021
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, Nov 04 2021
STATUS
approved

Search completed in 0.006 seconds