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

A322083 Square array A(n,k), n >= 1, k >= 0, read by antidiagonals: A(n,k) = Sum_{d|n} (-1)^(n/d+d)*d^k.

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Nov 26 2018

Keywords

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

Examples

			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,  ...
		

Crossrefs

Programs

  • 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 *)
  • 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

Formula

G.f. of column k: Sum_{j>=1} (-1)^(j+1)*j^k*x^j/(1 + x^j).

A308077 G.f. A(x) satisfies: A(x) = x - A(x^2) + A(x^3) - A(x^4) + A(x^5) - A(x^6) + ...

Original entry on oeis.org

1, -1, 1, 0, 1, -3, 1, 0, 2, -3, 1, 2, 1, -3, 3, 0, 1, -8, 1, 2, 3, -3, 1, 0, 2, -3, 4, 2, 1, -13, 1, 0, 3, -3, 3, 10, 1, -3, 3, 0, 1, -13, 1, 2, 8, -3, 1, 0, 2, -8, 3, 2, 1, -20, 3, 0, 3, -3, 1, 18, 1, -3, 8, 0, 3, -13, 1, 2, 3, -13, 1, -4, 1, -3, 8, 2, 3, -13, 1
Offset: 1

Views

Author

Ilya Gutkovskiy, May 11 2019

Keywords

Crossrefs

Cf. A006005 (positions of 1's), A067856, A307776, A347031.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, n, add(a(n/d)*
         (-1)^(d-1), d=numtheory[divisors](n) minus {1}))
        end:
    seq(a(n), n=1..80);  # Alois P. Heinz, Mar 30 2023
  • Mathematica
    terms = 79; A[] = 0; Do[A[x] = x + Sum[(-1)^(k + 1) A[x^k], {k, 2, terms}] + O[x]^(terms + 1) // Normal, terms + 1]; Rest[CoefficientList[A[x], x]]
    a[n_] := If[n == 1, n, Sum[If[d < n, (-1)^(n/d + 1) a[d], 0], {d, Divisors[n]}]]; Table[a[n], {n, 1, 79}]

Formula

a(1) = 1; a(n) = Sum_{d|n, d

A228441 G.f.: Sum_{k>0} -(-x)^k / (1 + x^k).

Original entry on oeis.org

1, -2, 2, -1, 2, -4, 2, 0, 3, -4, 2, -2, 2, -4, 4, 1, 2, -6, 2, -2, 4, -4, 2, 0, 3, -4, 4, -2, 2, -8, 2, 2, 4, -4, 4, -3, 2, -4, 4, 0, 2, -8, 2, -2, 6, -4, 2, 2, 3, -6, 4, -2, 2, -8, 4, 0, 4, -4, 2, -4, 2, -4, 6, 3, 4, -8, 2, -2, 4, -8, 2, 0, 2, -4, 6, -2, 4
Offset: 1

Author

Michael Somos, Nov 02 2013

Keywords

Examples

			G.f. = x - 2*x^2 + 2*x^3 - x^4 + 2*x^5 - 4*x^6 + 2*x^7 + 3*x^9 - 4*x^10 + ...
		

Programs

  • Mathematica
    a[ n_] := SeriesCoefficient[ Sum[ -(-x)^k / (1 + x^k), {k, 1, n}], {x, 0, n}];
    a[ n_] := If[ n < 1, 0, DivisorSum[ n, (-1)^(# + n/#) &]]; (* Michael Somos, Jan 08 2015 *)
    a[n_] := Module[{e = IntegerExponent[n, 2]}, DivisorSigma[0, n] * If[e == 0, 1, (e-3)/(e+1)]]; Array[a, 100] (* Amiram Eldar, Sep 18 2023 *)
  • PARI
    {a(n) = if( n<1, 0, sumdiv(n, k, (-1)^(k + n/k)))};
    
  • PARI
    {a(n) = if( n<1, 0, numdiv(n) - 4 * sumdiv( n, k, k%4 == 2))};
    
  • PARI
    {a(n) = my(e); if( n<1, 0, e = valuation( n, 2); numdiv( n/2^e) * if( e>0, e-3, 1))};
    
  • PARI
    a(n)=direuler(p=1,n,if(p==2,(1-2*X)^2/(1-X)^2,1/(1-X)^2))[n] /* Ralf Stephan, Mar 27 2015 */

Formula

a(n) = number of divisors of n minus 4 times number of divisors of n of the form 4*k+2.
a(n) = Sum_{d|n} (-1)^(d+n/d). - N. J. A. Sloane, Nov 23 2018
Multiplicative with a(2^e) = e-3 if e>0, a(p^e) = e+1 if p>2.
Moebius transform is period 4 sequence [1, -3, 1, 1, ...].
G.f.: Sum_{k>0} x^k / (1 - x^k) - 4 * x^(4*k + 2) / (1 - x^(4*k + 2)).
a(2*n - 1) = A099774(n).
Dirichlet g.f.: zeta(s)^2*(1-2^(-s+1))^2 = eta^2(s) (the Dirichlet eta). - Ralf Stephan, Mar 27 2015
a(16n+8) = a(A051062(n)) = 0. - Michel Marcus, Mar 27 2015
O.g.f.: Sum_{n >= 1} (-1)^(n*(n+1))*x^(n^2)*(1 - x^n)/(1 + x^n). - Peter Bala, Mar 11 2019
Conjecture: a(n) = (7 - 2*(-1)^n)*tau(n) - 4*tau(2*n) = 5*tau(n) - (3 + (-1)^n)*tau(2*n), where tau = A000005. - Velin Yanev, Dec 17 2019
The proof of the above conjecture easily follows from the fact that both a(n) and tau(n) are multiplicative arithmetical functions and tau(p^e) = e + 1 for prime p. - Peter Bala, Jan 28 2022
a(n) = A000005(n) if n is odd, and A000005(n) * (A007814(n)-3)/(A007814(n)+1) if n is even. - Amiram Eldar, Sep 18 2023

A321558 a(n) = Sum_{d divides n} (-1)^(d + n/d) * d^2.

Original entry on oeis.org

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

Author

N. J. A. Sloane, Nov 23 2018

Keywords

Examples

			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
		

Crossrefs

Column k=2 of A322083.
Cf. A321543 - A321557, A321810 - A321836 for similar sequences.

Programs

  • Magma
    m:=50; R:=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
    
  • Mathematica
    a[n_] := DivisorSum[n, (-1)^(# + n/#)*#^2 &]; Array[a, 50] (* Amiram Eldar, Nov 27 2018 *)
  • PARI
    apply( A321558(n)=sumdiv(n, d, (-1)^(n\d-d)*d^2), [1..30]) \\ M. F. Hasler, Nov 26 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

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)

A327278 a(n) = Sum_{d|n, d odd} d * mu(d) * mu(n/d).

Original entry on oeis.org

1, -1, -4, 0, -6, 4, -8, 0, 3, 6, -12, 0, -14, 8, 24, 0, -18, -3, -20, 0, 32, 12, -24, 0, 5, 14, 0, 0, -30, -24, -32, 0, 48, 18, 48, 0, -38, 20, 56, 0, -42, -32, -44, 0, -18, 24, -48, 0, 7, -5, 72, 0, -54, 0, 72, 0, 80, 30, -60, 0, -62, 32, -24, 0, 84, -48, -68, 0, 96
Offset: 1

Author

Ilya Gutkovskiy, Sep 15 2019

Keywords

Comments

Dirichlet inverse of A000593.

Programs

  • Magma
    [&+[d*MoebiusMu(d)*MoebiusMu(n div d): d in [a:a in Divisors(n)| IsOdd(a)]]:n in [1..70]]; // Marius A. Burtea, Sep 15 2019
  • Mathematica
    Table[DivisorSum[n, # MoebiusMu[#] MoebiusMu[n/#] &, OddQ[#] &], {n, 1, 69}]
    a[n_] := If[n == 1, n, -Sum[If[d < n, DivisorSum[n/d, Mod[#, 2] # &] a[d], 0], {d, Divisors[n]}]]; Table[a[n], {n, 1, 69}]
    f[p_, e_] := If[p == 2, -Boole[e == 1], Which[e == 1, -p - 1, e == 2, p, e > 2, 0]]; a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Oct 25 2020 *)

Formula

G.f. A(x) satisfies: A(x) = x - Sum_{k>=2} A000593(k) * A(x^k).
Dirichlet g.f.: 1 / (zeta(s) * zeta(s-1) * (1 - 2^(1-s))).
a(1) = 1; a(n) = -Sum_{d|n, dA000593(n/d) * a(d).
a(n) = Sum_{d|n} A067856(n/d) * A055615(d).
Multiplicative with a(2^e) = -1 if e = 1 and 0 otherwise, and a(p^e) = -(p+1) if e = 1, p if e = 2 and 0 otherwise, for an odd prime p. - Amiram Eldar, Oct 25 2020
Sum_{k=1..n} abs(a(k)) ~ 30*n^2/Pi^4. - Vaclav Kotesovec, May 30 2024

A348956 a(0) = 1; a(n) = Sum_{d|n, d < n} (-1)^(n/d + 1) * a(d - 1).

Original entry on oeis.org

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

Author

Ilya Gutkovskiy, Nov 04 2021

Keywords

Programs

  • Mathematica
    a[0] = 1; a[n_] := a[n] = Sum[If[d < n, (-1)^(n/d + 1) a[d - 1], 0], {d, Divisors[n]}]; Table[a[n], {n, 0, 80}]
    nmax = 80; A[] = 0; Do[A[x] = 1 - Sum[(-x)^k A[x^k], {k, 2, nmax}] + O[x]^(nmax + 1) //Normal, nmax + 1]; CoefficientList[A[x], x]
  • PARI
    A348956(n) = if(!n,1,sumdiv(n,d,if(dA348956(d-1)*(-1)^(1 + (n/d)),0))); \\ Antti Karttunen, Nov 05 2021

Formula

G.f. A(x) satisfies: A(x) = 1 - x^2 * A(x^2) + x^3 * A(x^3) - x^4 * A(x^4) + ...

A354171 Product_{n>=1} (1 + x^n)^(a(n)/n!) = 1 + sin(x).

Original entry on oeis.org

1, 0, -1, 4, -19, 44, -659, 8128, -18775, 67664, -3578279, 7629568, -476298835, 505198784, 25626362581, 4286437900288, -20903398375855, -118410655250176, -6399968826052559, -33100680116191232, 1010700510694925525, 706348515575880704, -1123931378903214542099
Offset: 1

Author

Ilya Gutkovskiy, May 18 2022

Keywords

Programs

  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0, Sum[Binomial[c[i], j] b[n - i j, i - 1], {j, 0, n/i}]]]; c[n_] := c[n] = {1, 0, -1, 0}[[Mod[n, 4, 1]]]/n! - b[n, n - 1]; a[n_] := n! c[n]; Table[a[n], {n, 1, 23}]

Formula

E.g.f.: Sum_{k>=1} A067856(k) * log(1 + sin(x^k)) / k.

A354172 Product_{n>=1} (1 + x^n)^(a(n)/n!) = 1 + sinh(x).

Original entry on oeis.org

1, 0, 1, -4, 21, -76, 1023, -12160, 65145, -602416, 10925883, -120444160, 1994183205, -21404165056, 372390766023, -12580544512000, 158096182329585, -2119447579092736, 64115697136312563, -1412937791690260480, 27389518837925527965, -616988361649163447296, 19391677044464348893503
Offset: 1

Author

Ilya Gutkovskiy, May 18 2022

Keywords

Programs

  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0, Sum[Binomial[c[i], j] b[n - i j, i - 1], {j, 0, n/i}]]]; c[n_] := c[n] = Mod[n, 2]/n! - b[n, n - 1]; a[n_] := n! c[n]; Table[a[n], {n, 1, 23}]

Formula

E.g.f.: Sum_{k>=1} A067856(k) * log(1 + sinh(x^k)) / k.

A354175 Product_{n>=1} (1 + x^n)^(a(n)/n!) = 1 + tan(x).

Original entry on oeis.org

1, 0, 2, -8, 56, -256, 3184, -36224, 273920, -2845696, 48104704, -676312064, 10591523840, -149454094336, 2888557717504, -72214957359104, 1249919350046720, -23620669488234496, 624022403933077504, -15637185047733469184, 372737701735949926400, -9655667879651150135296
Offset: 1

Author

Ilya Gutkovskiy, May 18 2022

Keywords

Programs

  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0, Sum[Binomial[c[i], j] b[n - i j, i - 1], {j, 0, n/i}]]]; c[n_] := c[n] = 2^(n + 1) (2^(n + 1) - 1) Abs[BernoulliB[n + 1]]/((n + 1) n!) - b[n, n - 1]; a[n_] := n! c[n]; Table[a[n], {n, 1, 22}]

Formula

E.g.f.: Sum_{k>=1} A067856(k) * log(1 + tan(x^k)) / k.

A354176 Product_{n>=1} (1 + x^n)^(a(n)/n!) = 1 + tanh(x).

Original entry on oeis.org

1, 0, -2, 8, -24, -16, -720, 12032, 0, -7936, -3628800, -58190848, -479001600, -22368256, 87178291200, 6174957043712, -20922789888000, 47215125069824, -6402373705728000, -164824694455533568, 2432902008176640000, -4951498053124096, -1124000727777607680000
Offset: 1

Author

Ilya Gutkovskiy, May 18 2022

Keywords

Programs

  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0, Sum[Binomial[c[i], j] b[n - i j, i - 1], {j, 0, n/i}]]]; c[n_] := c[n] = 2^(n + 1) (2^(n + 1) - 1) BernoulliB[n + 1]/((n + 1) n!) - b[n, n - 1]; a[n_] := n! c[n]; Table[a[n], {n, 1, 23}]

Formula

E.g.f.: Sum_{k>=1} A067856(k) * log(1 + tanh(x^k)) / k.
Showing 1-10 of 29 results. Next