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.

A284059 The absolute values of A275966.

Original entry on oeis.org

1, 1, 2, 0, 0, 2, 2, 0, 2, 0, 2, 0, 0, 2, 0, 0, 0, 2, 2, 0, 4, 2, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 4, 0, 0, 0, 0, 2, 0, 0, 0, 4, 2, 0, 0, 2, 2, 0, 2, 0, 0, 0, 0, 2, 0, 0, 4, 0, 2, 0, 0, 2, 4, 0, 0, 4, 2, 0, 4, 0, 2, 0, 0, 0, 0, 0, 4, 0, 2, 0, 2, 0, 2, 0, 0, 2, 0
Offset: 1

Views

Author

Gevorg Hmayakyan, Mar 19 2017

Keywords

Comments

This is multiplicative function with a(p^n) = |Re(I^(p^n+1) - I^(p^(n-1)+1))|.

Examples

			a(9) = |Re(I*(mobius(1)*I^9 + mobius(3)*I^3 + mobius(9)*I))| = |Re((I^10 - I^4))| = |-2| = 2.
		

Crossrefs

Programs

  • Maple
    a(n):=abs(Re(I*add(numtheory:-mobius(d)*I^(n/d), d = numtheory:-divisors(n)))).
  • Mathematica
    Table[Abs@ Re[I* Sum[MoebiusMu[d] * I^(n/d), {d, Divisors[n]}]], {n, 87}] (* Indranil Ghosh, Mar 19 2017 *)
    f[p_, e_] := If[Mod[p, 4] == 1, 0, 2]; f[2, e_] := If[e == 1, 1, 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jan 27 2024 *)
  • PARI
    a(n)=my(f=factor(n)); prod(i=1,#f~, if(f[i,1]==2, if(f[i,2]==1,1,0), if(f[i,1]%4==3, 2, 0))) \\ Charles R Greathouse IV, Mar 22 2017

Formula

a(n) = |Re(I*Sum_{d|n}(mobius(d)*I^(n/d)))|.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 3/Pi = 0.954929... (A089491). - Amiram Eldar, Jan 27 2024