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.

A318833 a(n) = n + A023900(n).

Original entry on oeis.org

2, 1, 1, 3, 1, 8, 1, 7, 7, 14, 1, 14, 1, 20, 23, 15, 1, 20, 1, 24, 33, 32, 1, 26, 21, 38, 25, 34, 1, 22, 1, 31, 53, 50, 59, 38, 1, 56, 63, 44, 1, 30, 1, 54, 53, 68, 1, 50, 43, 54, 83, 64, 1, 56, 95, 62, 93, 86, 1, 52, 1, 92, 75, 63, 113, 46, 1, 84, 113, 46, 1, 74, 1, 110, 83, 94, 137, 54, 1, 84, 79, 122, 1, 72, 149, 128, 143, 98, 1, 82
Offset: 1

Views

Author

Antti Karttunen, Sep 16 2018

Keywords

Crossrefs

Programs

Formula

a(n) = n + A023900(n).

A126864 a(n) = gcd(n, Product_{p|n} (p-1)), where the product is over the distinct primes, p, that divide 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, 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

Leroy Quet, Mar 15 2007

Keywords

Comments

Product_{p|n} (p-1) is the absolute value of A023900(n) (that is, A173557(n)).
First occurrence of k: 1, 6, 21, 20, 55, 42, 203, 120, 171, 110, 253, 84, 689, 406, 465, 272, 1751, 342, 3629, 220, ..., . - Robert G. Wilson v

Examples

			The distinct primes that divide 20 are 2 and 5. So a(20) = gcd(20, (2-1)(5-1)) = gcd(20,4) = 4.
		

Crossrefs

Programs

  • Maple
    with(numtheory): a:=n->gcd(n,product(factorset(n)[i]-1,i=1..nops(factorset(n)))); # Emeric Deutsch, Apr 11 2007
  • Mathematica
    f[n_] := GCD[n, Times @@ (First /@ FactorInteger[n] - 1)]; Array[f, 105] (* Robert G. Wilson v, Sep 08 2007 *)
  • PARI
    A173557(n) = factorback(apply(p -> p-1, factor(n)[, 1]));
    A126864(n) = gcd(n, A173557(n)); \\ Antti Karttunen, Sep 17 2018

Formula

a(n) = gcd(n, A173557(n)) = gcd(n, A318841(n)). - Antti Karttunen, Sep 17 2018

Extensions

More terms from Emeric Deutsch, Apr 11 2007

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