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-2 of 2 results.

A260685 Sequence is defined by the condition that Sum_{d|n} a(d)^(n/d) = 1 if n=1, = 0 if n>1.

Original entry on oeis.org

1, -1, -1, -2, -1, -1, -1, -6, 0, -1, -1, 4, -1, -1, 1, -54, -1, 0, -1, 28, 1, -1, -1, 132, 0, -1, 0, 124, -1, -1, -1, -4470, 1, -1, 1, 444, -1, -1, 1, 5964, -1, -1, -1, 2044, 0, -1, -1, 89028, 0, 0, 1, 8188, -1, 0, 1, 248172, 1, -1, -1, 9784, -1, -1, 0, -30229110
Offset: 1

Views

Author

Gevorg Hmayakyan, Nov 15 2015

Keywords

Comments

It is easy to prove that a(1)=1, a(p)=-1, a(p^n)=0 if p>2, a(p1*p2*..*pn)=(-1)^n, a(2*p1*...*pn)=-1.
It appears that abs(a(n)) > 1 for multiples of 4. - Michel Marcus, Nov 19 2015
If p1,...,pn are odd it appears that a(p1^k1*p2^k2*...*pn^kn)=0 if one of k1,...,kn > 1. Similarly, it appears that a(2*p1^k1*p2^k2*...*pn^kn)=0 if one of k1,...,kn > 1.
For odd n a(n) is equal to the Möbius function: A008683(n).
For n == 2 mod 4, it seems that a(n) = -|Möbius(n/2)|. For n == 0 mod 4, see A264609.- N. J. A. Sloane, Nov 24 2015

Examples

			For a prime p, a(p)^1 + a(1)^p = 0 => a(p) = -1.
For n=6, a(1)^6 + a(2)^3 + a(3)^2 + a(6)^1 = 0, so 1 - 1 + 1 + a(6) = 0, so 1 + a(6) = 0, so a(6) = -1.
		

Crossrefs

Cf. A008683, A264609 (a(4n)), A264610 (a(2^n)).

Programs

  • Maple
    a:= proc(n) option remember;
        -add(procname(n/d)^d, d = numtheory:-divisors(n) minus {1});
    end proc:
    a(1):= 1:
    map(a, [$1..100]); # Robert Israel, Nov 19 2015
  • Mathematica
    a[1] = 1; a[n_] := a[n] = -DivisorSum[n, If[# == 1, 0, a[n/#]^#] &]; Array[a, 70] (* Jean-François Alcover, Dec 02 2015, adapted from PARI *)
  • PARI
    a(n) = if (n==1, 1, - sumdiv(n, d, if (d==1, 0, a(n/d)^d))); \\ Michel Marcus, Nov 16 2015

A263774 Sequence is defined by the condition that Sum_{d|n} a(d)^(n/d) = mu(n)^2, where mu(n) is the Möbius function.

Original entry on oeis.org

1, 0, 0, -1, 0, 0, 0, -2, -1, 0, 0, 0, 0, 0, 0, -6, 0, -2, 0, 0, 0, 0, 0, 6, -1, 0, 0, 0, 0, 0, 0, -54, 0, 0, 0, -5, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 114, -1, -2, 0, 0, 0, 6, 0, 126, 0, 0, 0, 0, 0, 0, 0, -4470, 0, 0, 0, 0, 0, 0, 0, 252, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Gevorg Hmayakyan, Nov 28 2015

Keywords

Examples

			For a prime p, a(p)^1 + a(1)^p = mu(p)^2=1 => a(p) = 0.
For n=6, a(1)^6 + a(2)^3 + a(3)^2 + a(6)^1 = mu(6) = 1, so 1 - 0 + 0 + a(6) = 1, so 1 + a(6) = 1, so a(6) = 0.
		

Crossrefs

Programs

  • Haskell
    a263774 1 = 1
    a263774 n = foldl (-) (a008966 n) $ zipWith (^) (map a' $ reverse ds) ds
                where a' x = if x == n then 0 else a263774 x
                      ds = a027750_row n
    -- Reinhard Zumkeller, Dec 06 2015
  • Maple
    a := proc (n) option remember; numtheory:-mobius(n)^2-add(procname(n/d)^d, d = `minus`(numtheory:-divisors(n), {1})) end proc; a(1) := 1; La := seq(a(i), i = 1 .. 100)
  • Mathematica
    a[n_]:=If[n<2, 1, MoebiusMu[n]^2 - Sum[If[d==1, 0, a[n/d]^d], {d, Divisors[n]}]]; Table[a[n], {n, 100}] (* Indranil Ghosh, Mar 26 2017 *)
  • PARI
    a(n) = if (n==1, 1, moebius(n)^2- sumdiv(n, d, if (d==1, 0, a(n/d)^d)));
    

Formula

a(1) = 1.
If p>2, a(p) = 0, a(p^2) = -1, a(p^n) = 0 for n>2.
a(p1*p2*..*pn) = 0, a(2*p1*...*pn) = 0, a(4*p1*...*pn) = 0.
If p1,...,pn are odd it appears that:
a(p1^2*p2^2*...*pn^2) = (-1)^n,
a(p1^k1*p2^k2*...*pn^kn) = 0, if one of k1,...,kn > 2,
a(2*p1^k1*p2^k2*...*pn^kn) > 0 if one of k1,...,kn > 1.
a(2^n) = A264610(n).
Showing 1-2 of 2 results.