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

A329277 a(n) is the fixed point reached by iterating Euler's gradus function A275314 starting at n.

Original entry on oeis.org

1, 2, 3, 3, 5, 3, 7, 3, 5, 3, 11, 5, 13, 3, 7, 5, 17, 3, 19, 7, 5, 5, 23, 3, 5, 3, 7, 5, 29, 3, 31, 3, 13, 3, 11, 7, 37, 7, 7, 3, 41, 3, 43, 13, 5, 3, 47, 7, 13, 3, 19, 7, 53, 3, 7, 3, 5, 3, 59, 5, 61, 3, 11, 7, 17, 3, 67, 19, 5, 5, 71, 3, 73, 7, 11, 5, 17, 5, 79
Offset: 1

Views

Author

Daniel Hoyt, Nov 11 2019

Keywords

Crossrefs

Programs

  • Mathematica
    gradus[n_] := 1 + Plus @@ ((First[#] - 1) * Last[#] & /@ FactorInteger[n]); a[n_] := FixedPoint[gradus, n]; Array[a, 100] (* Amiram Eldar, Nov 11 2019 *)
  • PARI
    g(n) = my (f=factor(n)); 1+sum(k=1, #f~, f[k,2]*(f[k,1]-1))
    a(n) = while (n!=n=g(n),); n \\ Rémy Sigrist, Dec 03 2019
  • Python
    from gmpy2 import is_prime
    from sympy import factorint
    def gradus(n):
        sum  = 0
        factors = factorint(n)
        for p,a in factors.items():
            sum += (p - 1)*a
        return sum + 1
    if _name_ == "_main_":
        glist = []
        for x in range(1, 80):
            glist.append(gradus(x))
        while True:
            for p in glist:
                a = 0
                if not is_prime(p):
                    glist = [gradus(x) for x in glist]
                    a = 1
            if a == 0:
                break
        print(', '.join([str(x) for x in glist]))
    
Showing 1-1 of 1 results.