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.

A070238 Sign of core(n)-phi(n) where core(n) is the squarefree part of n and phi the Euler totient function.

Original entry on oeis.org

0, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1
Offset: 1

Views

Author

Benoit Cloitre, May 08 2002

Keywords

Comments

Sum_{k=1..n} a(k) > 0 for n > 1. That is, the partial sums stay positive forever.
For almost all n, a(n) = 2*mu(n)^2 - 1 = 2*A008966(n) - 1. Below 1000, there are only 5 exceptions: n=1, 420, 660, 780, 840. The exceptions are given by A070237.

Crossrefs

Programs

  • Mathematica
    Array[Sign[Sqrt[#] /. (c_: 1) a_^(b_: 0) :> (c a^b)^2 - EulerPhi@ #] &, 100] (* Michael De Vlieger, Nov 18 2017, after Bill Gosper at A007913 *)
  • PARI
    for(n=1,100,print1(sign(core(n)-eulerphi(n)),","))

Formula

a(n) = sign(A007913(n) - A000010(n)).

Extensions

Comment section edited by Antti Karttunen, Nov 18 2017