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

A322361 a(n) = gcd(n, A003961(n)), where A003961 is completely multiplicative with a(prime(k)) = prime(k+1).

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 5, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 15, 1, 1, 1, 1, 7, 9, 1, 1, 1, 1, 1, 3, 1, 1, 5, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 15, 1, 1, 1, 1, 1, 3, 1, 1, 1, 7, 1, 9, 1, 1, 5, 1, 11, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 15, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 35
Offset: 1

Views

Author

Antti Karttunen, Dec 05 2018

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := If[n == 1, 1, GCD[n, Times@@(NextPrime[First[#]]^Last[#] &/@FactorInteger[n])]]; Array[a, 100] (* Amiram Eldar, Dec 05 2018 *)
  • PARI
    A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From A003961
    A322361(n) = gcd(n, A003961(n));
    
  • Python
    from math import gcd, prod
    from sympy import nextprime, factorint
    def A322361(n): return gcd(n,prod(nextprime(p)**e for p, e in factorint(n).items())) # Chai Wah Wu, Dec 26 2022

Formula

a(n) = gcd(n, A003961(n)).
a(n) = A003961(gcd(n, A064989(n))).

A066086 Greatest common divisor of product (p-1) and product (p+1), where p ranges over distinct prime divisors of n; a(n) = gcd(A048250(n), A173557(n)).

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 6, 8, 1, 2, 2, 2, 2, 4, 2, 2, 2, 2, 6, 2, 6, 2, 8, 2, 1, 4, 2, 24, 2, 2, 6, 8, 2, 2, 12, 2, 2, 8, 2, 2, 2, 2, 2, 8, 6, 2, 2, 8, 6, 4, 2, 2, 8, 2, 6, 4, 1, 12, 4, 2, 2, 4, 24, 2, 2, 2, 6, 8, 6, 12, 24, 2, 2, 2, 2, 2, 12, 4, 6, 8, 2, 2, 8, 8, 2, 4, 2, 24, 2, 2, 6, 4
Offset: 1

Views

Author

Labos Elemer, Dec 04 2001

Keywords

Comments

Frequently equal, but not identical, to A009223 (i.e. GCD of sigma and phi of n).

Crossrefs

Programs

  • Mathematica
    ffi[x_] := Flatten[FactorInteger[x]] lf[x_] := Length[FactorInteger[x]] ba[x_] := Table[Part[ffi[x], 2*w-1], {w, 1, lf[x]}] cor[x_] := Apply[Times, ba[x]] g1[x_] := GCD[DivisorSigma[1, x], EulerPhi[x]] g2[x_] := GCD[DivisorSigma[1, cor[x]], EulerPhi[cor[x]]] Table[g2[w], {w, 1, 128}]
    a[n_] := If[n == 1, 1, Module[{f=FactorInteger[n]}, GCD[Times@@((#-1)& @@@ f), Times@@((#+1)& @@@ f)]]]; Array[a, 100] (* Amiram Eldar, Dec 05 2018 *)
  • PARI
    a(n)=my(f=factor(n)[,1]);gcd(prod(i=1,#f,f[i]+1),prod(i=1,#f,f[i]-1)) \\ Charles R Greathouse IV, Feb 14 2013

Formula

a(n) = gcd(A048250(n), A023900(n)) = gcd(A000203(A007947(n)), A000010(A007947(n))).
a(n) = A322360(n) / A322359(n). - Antti Karttunen, Dec 04 2018

Extensions

Name edited, part of the old name transferred to the formula section by Antti Karttunen, Dec 04 2018

A126865 a(n) = gcd(Product_{p|n} (p+1)^b(p,n), Product_{p|n} (p-1)^b(p,n)), where the products are over the distinct primes, p, that divide n and p^b(p,n) is the highest power of p dividing n.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 2, 1, 4, 2, 2, 2, 2, 6, 8, 1, 2, 4, 2, 2, 4, 2, 2, 2, 4, 6, 8, 6, 2, 8, 2, 1, 4, 2, 24, 4, 2, 6, 8, 2, 2, 12, 2, 2, 16, 2, 2, 2, 4, 4, 8, 6, 2, 8, 8, 6, 4, 2, 2, 8, 2, 6, 8, 1, 12, 4, 2, 2, 4, 24, 2, 4, 2, 6, 16, 18, 12, 24, 2, 2, 16, 2, 2, 12, 4, 6, 8, 2, 2, 16, 8, 2, 4, 2, 24, 2, 2, 12, 8
Offset: 1

Views

Author

Leroy Quet, Mar 15 2007

Keywords

Comments

First occurrence of k or 0 if not possible (including all odd primes k): 2, 1, 0, 9, 0, 14, 0, 15, 0, 0, 0, 42, 0, 0, 0, 45, 0, 76, 0, 589, 0, 0, 0, 35, 0, 0, 0, 4381, 0, 0, ..., . - Robert G. Wilson v, Sep 08 2007

Examples

			400 = 2^4 * 5^2. So a(400) = gcd((2+1)^4 * (5+1)^2, (2-1)^4 * (5-1)^2) = gcd(2916, 16) = 4.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{fi = FactorInteger@n}, GCD[Times @@ ((First /@ fi - 1)^Last /@ fi), Times @@ ((First /@ fi + 1)^Last /@ fi)]]; Array[f, 99] (* Robert G. Wilson v, Sep 08 2007 *)
  • PARI
    A003958(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1]--); factorback(f); };
    A003959(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1]++); factorback(f); };
    A126865(n) = gcd(A003958(n),A003959(n)); \\ Antti Karttunen, Dec 17 2018

Formula

From Antti Karttunen, Dec 17 2018: (Start)
a(n) = gcd(A003958(n), A003959(n)).
a(A007947(n)) = A066086(n).
(End)

Extensions

More terms from Robert G. Wilson v, Sep 08 2007

A322354 Greatest common divisor of product p and product (p+2), where p ranges over distinct prime divisors of n; a(n) = gcd(A007947(n), A166590(A007947(n))).

Original entry on oeis.org

1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 5, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 1, 2, 1, 10, 1, 2, 1, 2, 7, 2, 1, 2, 3, 2, 1, 6, 1, 2, 5, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 1, 10, 1, 2, 3, 2, 5, 2, 1, 2, 1, 14, 1, 2, 1, 2, 5, 2, 1, 6, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 10, 1, 2, 3, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 105
Offset: 1

Views

Author

Antti Karttunen, Dec 16 2018

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := If[n == 1, 1, Times @@ Power @@@ ({#[[1]] + 2, #[[2]]} & /@ FactorInteger[n])]; rad[n_] := Times @@ (First@# & /@ FactorInteger@n); a[n_] := GCD[rad[n], f[rad[n]]]; Array[a, 120] (* Amiram Eldar, Dec 16 2018 *)
  • PARI
    A166590(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] += 2); factorback(f); };
    A322362(n) = gcd(n, A166590(n));
    A007947(n) = factorback(factorint(n)[, 1]);
    A322354(n) = A322362(A007947(n));
    \\ Alternatively as:
    A322354(n) = gcd(A007947(n), A166590(A007947(n)));

Formula

a(n) = A322362(A007947(n)) = gcd(A007947(n), A166590(A007947(n))).
a(n) = A322356(n) * A322357(n).

A322357 a(n) = A322354(n) / A322356(n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 16 2018

Keywords

Programs

  • Mathematica
    f[n_] := If[n == 1, 1, Times @@ Power @@@ ({#[[1]] + 2, #[[2]]} & /@ FactorInteger [n])]; rad[n_] := Times @@ (First@# & /@ FactorInteger@n); fun[p_, n_] := If[ PrimeQ[p + 2] && Divisible[n, p + 2], p + 2, 1]; a[n_] := GCD[rad[n], f[rad[n]]]/ Times @@ (fun[#, n] & /@ FactorInteger[n][[;; , 1]]); Array[a, 120] (* Amiram Eldar, Dec 16 2018 *)
  • PARI
    A166590(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] += 2); factorback(f); };
    A322362(n) = gcd(n, A166590(n));
    A007947(n) = factorback(factorint(n)[, 1]);
    A322354(n) = A322362(A007947(n));
    A322356(n) = { my(f = factor(n), m=1); for(i=1, #f~, if(isprime(f[i,1]+2)&&!(n%(f[i,1]+2)), m *= (f[i,1]+2))); (m); };
    A322357(n) = (A322354(n)/A322356(n));

Formula

a(n) = A322354(n) / A322356(n).

A323406 Greatest common divisor of Product (p_i^e_i)-1 and Product (p_i^e_i)+1, when n = Product (p_i^e_i): a(n) = gcd(A047994(n), A034448(n)).

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 6, 8, 1, 2, 2, 2, 6, 4, 2, 2, 2, 2, 6, 2, 2, 2, 8, 2, 1, 4, 2, 24, 2, 2, 6, 8, 2, 2, 12, 2, 30, 4, 2, 2, 2, 2, 6, 8, 2, 2, 2, 8, 6, 4, 2, 2, 24, 2, 6, 16, 1, 12, 4, 2, 6, 4, 24, 2, 2, 2, 6, 8, 2, 12, 24, 2, 6, 2, 2, 2, 4, 4, 6, 8, 2, 2, 4, 8, 6, 4, 2, 24, 2, 2, 6, 40, 2, 2, 8, 2, 42, 48
Offset: 1

Views

Author

Antti Karttunen, Jan 15 2019

Keywords

Crossrefs

Programs

  • PARI
    A047994(n) = { my(f=factor(n)~); prod(i=1, #f, f[1, i]^f[2, i]-1); };
    A034448(n) = { my(f=factor(n)); prod(k=1, #f~, 1+(f[k, 1]^f[k, 2])); }; \\ After code in A034448
    A323406(n) = gcd(A034448(n), A047994(n));

Formula

a(n) = gcd(A034448(n), A047994(n)), where A034448 is unitary sigma, and A047994 is unitary phi.
Showing 1-6 of 6 results.