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.

A126864 a(n) = gcd(n, Product_{p|n} (p-1)), where the product is over the distinct primes, p, that divide n.

This page as a plain text file.
%I A126864 #20 Aug 02 2019 20:11:22
%S A126864 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,
%T A126864 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,
%U A126864 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
%N A126864 a(n) = gcd(n, Product_{p|n} (p-1)), where the product is over the distinct primes, p, that divide n.
%C A126864 Product_{p|n} (p-1) is the absolute value of A023900(n) (that is, A173557(n)).
%C A126864 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_
%H A126864 Antti Karttunen, <a href="/A126864/b126864.txt">Table of n, a(n) for n = 1..65537</a>
%F A126864 a(n) = gcd(n, A173557(n)) = gcd(n, A318841(n)). - _Antti Karttunen_, Sep 17 2018
%e A126864 The distinct primes that divide 20 are 2 and 5. So a(20) = gcd(20, (2-1)(5-1)) = gcd(20,4) = 4.
%p A126864 with(numtheory): a:=n->gcd(n,product(factorset(n)[i]-1,i=1..nops(factorset(n)))); # _Emeric Deutsch_, Apr 11 2007
%t A126864 f[n_] := GCD[n, Times @@ (First /@ FactorInteger[n] - 1)]; Array[f, 105] (* _Robert G. Wilson v_, Sep 08 2007 *)
%o A126864 (PARI)
%o A126864 A173557(n) = factorback(apply(p -> p-1, factor(n)[, 1]));
%o A126864 A126864(n) = gcd(n, A173557(n)); \\ _Antti Karttunen_, Sep 17 2018
%Y A126864 Cf. A000010, A023900, A173557, A318841, A319341.
%K A126864 nonn
%O A126864 1,6
%A A126864 _Leroy Quet_, Mar 15 2007
%E A126864 More terms from _Emeric Deutsch_, Apr 11 2007