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

A348928 a(n) = gcd(n, A003958(n)), where A003958 is multiplicative with a(p^e) = (p-1)^e.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 4, 3, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 4, 1, 2, 3, 4, 1, 6, 1, 2, 1, 2, 1, 2, 1, 2, 1, 4, 1, 2, 5, 2, 3, 2, 1, 4, 1, 2, 3, 1, 1, 2, 1, 4, 1, 2, 1, 4, 1, 2, 1, 2, 1, 6, 1, 4, 1, 2, 1, 12, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 1, 4, 1, 2, 1, 4, 3
Offset: 1

Views

Author

Antti Karttunen, Nov 07 2021

Keywords

Crossrefs

Differs from similar A126864 for the first time at n=36, where a(36) = 4, while A126864(36) = 2.

Programs

  • Mathematica
    f[p_, e_] := (p - 1)^e; a[n_] := GCD[n, Times @@ f @@@ FactorInteger[n]]; Array[a, 100] (* Amiram Eldar, Nov 07 2021 *)
  • PARI
    A003958(n) = if(1==n,n,my(f=factor(n)); for(i=1,#f~,f[i,1]--); factorback(f));
    A348928(n) = gcd(n, A003958(n));

Formula

a(n) = gcd(n, A003958(n)) = gcd(n, A322582(n)) = gcd(A003958(n), A322582(n)).

A319341 a(n) = A000010(n) - A173557(n).

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 3, 4, 0, 0, 2, 0, 0, 0, 7, 0, 4, 0, 4, 0, 0, 0, 6, 16, 0, 16, 6, 0, 0, 0, 15, 0, 0, 0, 10, 0, 0, 0, 12, 0, 0, 0, 10, 16, 0, 0, 14, 36, 16, 0, 12, 0, 16, 0, 18, 0, 0, 0, 8, 0, 0, 24, 31, 0, 0, 0, 16, 0, 0, 0, 22, 0, 0, 32, 18, 0, 0, 0, 28, 52, 0, 0, 12, 0, 0, 0, 30, 0, 16, 0, 22, 0, 0, 0, 30, 0, 36, 40, 36, 0, 0, 0, 36, 0
Offset: 1

Views

Author

Antti Karttunen, Sep 17 2018

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := EulerPhi[n] - Times @@ (FactorInteger[n][[;;, 1]] - 1); a[1] = 0; Array[a, 100] (* Amiram Eldar, Dec 21 2023 *)
  • PARI
    A173557(n) = factorback(apply(p -> p-1, factor(n)[, 1]));
    A319341(n) = (eulerphi(n)-A173557(n));

Formula

a(n) = A000010(n) - A173557(n).
a(n) = A318841(n) - A051953(n).
a(A005117(n)) = 0. - Ivan N. Ianakiev, Sep 18 2018
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = A059956 - A307868 = 0.136246... . - Amiram Eldar, Dec 21 2023

A173751 a(n) = gcd(n, lcm_{p is a prime divisor of n} (p-1)) = gcd(n, A173614(n)).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 4, 3, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 3, 4, 1, 6, 1, 2, 1, 2, 1, 2, 1, 2, 1, 4, 1, 2, 5, 2, 3, 2, 1, 4, 1, 2, 3, 1, 1, 2, 1, 4, 1, 2, 1, 2, 1, 2, 1, 2, 1, 6, 1, 4, 1, 2, 1, 6, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 1, 4, 1, 2, 1, 4, 3
Offset: 1

Views

Author

Keywords

Comments

a(n) is divisor of A126864(n).

Examples

			84 = 2^2*3*7; lcm{p-1|p is prime and divisor of 84} = lcm{1,2,6} = 6; gcd(84,6) = 6 ==> a(84)=6.
		

Crossrefs

Cf. A173614.

Programs

  • Mathematica
    fa=FactorInteger; lcm[n_] := Module[{aux = 1, lon = Length[fa[n]]}, Do[aux = LCM[aux, (fa[n][[i]][[1]] - 1)], {i, lon}]; aux] a[n_] := GCD[lcm[n], n]; Table[a[n], {n, 1, 300}]
  • PARI
    a(n)=gcd(n, lcm(apply(p->p-1, factor(n)[,1]))) \\ Andrew Howroyd, Aug 06 2018
Showing 1-3 of 3 results.