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.

A340087 a(n) = gcd(n-1, A091732(n)), where A091732 is an infinitary analog of Euler's phi function.

Original entry on oeis.org

1, 1, 2, 3, 4, 1, 6, 1, 8, 1, 10, 1, 12, 1, 2, 15, 16, 1, 18, 1, 4, 1, 22, 1, 24, 1, 2, 9, 28, 1, 30, 1, 4, 1, 2, 1, 36, 1, 2, 3, 40, 1, 42, 1, 4, 1, 46, 1, 48, 1, 2, 3, 52, 1, 2, 1, 4, 1, 58, 1, 60, 1, 2, 9, 16, 5, 66, 1, 4, 3, 70, 1, 72, 1, 2, 3, 4, 1, 78, 1, 80, 1, 82, 1, 4, 1, 2, 3, 88, 1, 18, 1, 4, 1, 2, 5, 96
Offset: 1

Views

Author

Antti Karttunen, Dec 31 2020

Keywords

Crossrefs

Cf. also A049559.

Programs

  • PARI
    ispow2(n) = (n && !bitand(n,n-1));
    A302777(n) = ispow2(isprimepower(n));
    A091732(n) = { my(m=1); while(n > 1, fordiv(n, d, if((dA302777(n/d), m *= ((n/d)-1); n = d; break))); (m); };
    A340087(n) = gcd(n-1, A091732(n));

Formula

a(n) = gcd(n-1, A091732(n)).
a(n) = A091732(n) / A340088(n).
For n > 1, a(n) = (n-1) / A340089(n).