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.

A292771 If sigma(n)-phi(n) is even then (sigma(n)-phi(n))/2 otherwise -1.

Original entry on oeis.org

0, 1, 1, -1, 1, 5, 1, -1, -1, 7, 1, 12, 1, 9, 8, -1, 1, -1, 1, 17, 10, 13, 1, 26, -1, 15, 11, 22, 1, 32, 1, -1, 14, 19, 12, -1, 1, 21, 16, 37, 1, 42, 1, 32, 27, 25, 1, 54, -1, -1, 20, 37, 1, 51, 16, 48, 22, 31, 1, 76, 1, 33, 34, -1, 18, 62, 1, 47, 26, 60, 1, -1, 1, 39, 42, 52, 18, 72, 1, 77, -1, 43, 1
Offset: 1

Views

Author

N. J. A. Sloane, Sep 28 2017

Keywords

Comments

a(n) = 1 if and only if n is prime. - Robert Israel, Sep 28 2017

Crossrefs

Programs

  • Maple
    f:= proc(n) local v;
       v:= numtheory:-sigma(n)-numtheory:-phi(n);
       if v::even then v/2 else -1 fi
    end proc:
    map(f, [$1..100]); # Robert Israel, Sep 28 2017