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.

A225821 a(n) = Product_{p | p is prime and p, p-1 both divide n}.

Original entry on oeis.org

1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 6, 1, 10, 1, 2, 1, 6, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 6, 1, 2, 1, 10, 1, 42, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 30, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 6, 1, 10, 1, 2, 1, 42
Offset: 1

Views

Author

Keywords

Comments

a(n) = 2 iff n is even and is a term of A226872. - Daniel Suteu, Jul 28 2019
From Bernard Schott, Jul 30 2019: (Start)
a(n) = n if n = 1, 2, 6, 42, 1806.
a(n) = 6 if n is of the form 2^i*3^j, i and j >= 1, so if n is a term of A033845.
a(n) = 10 if n is of the form 2^i*5^j, i >= 2 and j >= 1.
a(n) = 30 if n is of the form 2^i*3^j*5^k, i >=2, j >= 1 and k >= 1. (End)

Crossrefs

Programs

  • Mathematica
    fa=FactorInteger; d[m_]:= Product[If[IntegerQ[m/(fa[m][[i, 1]]-1)],fa[m][[i, 1]], 1], {i, Length@fa@m}]; Table[d[n], {n, 1, 333}]
  • PARI
    a(n)=my(f=factor(n)[,1]); prod(i=1,#f,if(n%(f[i]-1)==0,f[i],1)) \\ Charles R Greathouse IV, Nov 13 2013
  • Sage
    def A225821(n) : return prod(p for (p,m) in factor(n) if n%(p-1)==0) # Eric M. Schmidt, Jul 31 2013
    

Formula

a(n) = denominator(A031971(n)/n) = gcd(n, A027642(n)). - Daniel Suteu, Jul 28 2019