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.

A358272 Multiplicative sequence with a(p^e) = (-1)^e * p^(2*floor(e/2)) for prime p and e >= 0.

Original entry on oeis.org

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
Offset: 1

Views

Author

Werner Schulte, Nov 07 2022

Keywords

Comments

Signed version of A008833.

Crossrefs

Programs

  • Maple
    A358272 := proc(n)
        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:
    seq(A358272(n),n=1..80) ; # R. J. Mathar, Jan 17 2023
  • 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 *)
  • 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

Formula

a(n) = lambda(n) * A008833(n) for n > 0 where lambda(n) = A008836(n).
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.
Dirichlet convolution with A034444 equals A008833.
Equals Dirichlet convolution of A000010 and A061019.
Conjecture: a(n) = Sum_{k=1..n} gcd(k, n) * lambda(gcd(k, n)) for n > 0.
a(n) = Sum_{d|n} lambda(d)*d*phi(n/d), where lambda(n) = A008836(n). - Ridouane Oudra, May 11 2025