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.

A054754 Totient(n) and cototient(n) are squares.

Original entry on oeis.org

1, 2, 5, 8, 17, 32, 37, 101, 125, 128, 197, 257, 401, 468, 512, 577, 677, 1297, 1417, 1601, 1872, 2048, 2340, 2917, 3125, 3137, 3145, 4100, 4212, 4357, 4913, 5477, 7057, 7488, 8101, 8192, 8837, 9360, 12101, 13457, 14401, 14841, 15377, 15588, 15877
Offset: 1

Views

Author

Labos Elemer, Apr 25 2000

Keywords

Comments

Subsequence of A039770, supersequence of A002496.
a(n) is an odd power of a prime q = w^2+1, like 4913 = 17^3, where A000010(a(31)) = phi(4913) = 4624 = 68^2 and A051953(4913) = 4913-4624 = 289 = 17^2.
a(n) is not an odd power of a prime of A002496, like a(14) = 468, where phi(468) = 144 and 468-phi(468) = 324 = 18^2.
Intersection of A039770 and A063752. - Altug Alkan, Aug 16 2017

Crossrefs

Programs

  • Mathematica
    Select[Range@ 16000, Function[n, AllTrue[{#, n - #} &@ EulerPhi@ n, IntegerQ@ Sqrt@ # &]]] (* Michael De Vlieger, Aug 16 2017 *)
  • PARI
    isok(n) = issquare(eulerphi(n)) && issquare(n-eulerphi(n)); \\ Michel Marcus, Sep 09 2013

Formula

A000010(a(n))=x^2 and a(n)-A000010(a(n))=y^2.