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.

A295294 Sum of the divisors of the powerful part of n: a(n) = A000203(A057521(n)).

Original entry on oeis.org

1, 1, 1, 7, 1, 1, 1, 15, 13, 1, 1, 7, 1, 1, 1, 31, 1, 13, 1, 7, 1, 1, 1, 15, 31, 1, 40, 7, 1, 1, 1, 63, 1, 1, 1, 91, 1, 1, 1, 15, 1, 1, 1, 7, 13, 1, 1, 31, 57, 31, 1, 7, 1, 40, 1, 15, 1, 1, 1, 7, 1, 1, 13, 127, 1, 1, 1, 7, 1, 1, 1, 195, 1, 1, 31, 7, 1, 1, 1, 31, 121, 1, 1, 7, 1, 1, 1, 15, 1, 13, 1, 7, 1, 1, 1, 63
Offset: 1

Views

Author

Antti Karttunen, Nov 25 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Array[DivisorSigma[1, #/Denominator[#/Apply[Times, FactorInteger[#][[All, 1]]]^2] ] &, 96] (* Michael De Vlieger, Nov 26 2017, after Jean-François Alcover at A057521 *)
    f[p_, e_] := If[e == 1, 1, (p^(e+1)-1)/(p-1)]; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Oct 08 2022 *)
  • PARI
    a(n) = {my(f = factor(n), p = f[,1], e = f[,2]); prod(i=1, #p, if(e[i] == 1, 1, (p[i]^(e[i]+1)-1)/(p[i]-1)))}; \\ Amiram Eldar, Oct 08 2022
    
  • Python
    from math import prod
    from sympy import factorint
    def A295294(n): return prod((p**(e+1)-1)//(p-1) for p, e in factorint(n).items() if e > 1) # Chai Wah Wu, Nov 14 2022
  • Scheme
    (define (A295294 n) (A000203 (A057521 n)))
    ;; With memoization-macro definec:
    (definec (A295294 n) (if (= 1 n) n (let ((p (A020639 n)) (e (A067029 n))) (* (if (= e 1) 1 (/ (- (expt p (+ 1 e)) 1) (- p 1))) (A295294 (A028234 n))))))
    

Formula

Multiplicative with a(p) = 1 and a(p^e) = (p^(e+1)-1)/(p-1) for e > 1.
a(n) = A000203(n) / A092261(n).
From Amiram Eldar, Oct 08 2022: (Start)
a(n) = 1 iff n is squarefree (A005117).
a(n) = A000203(n) iff n is powerful (A001694). (End)
Dirichlet g.f.: zeta(s) * zeta(s-1) * Product_{p prime} (1 - 1/p^(s-1) + 1/p^(2*s-2) + 1/p^(2*s-1) - 1/p^(3*s-2)). - Amiram Eldar, Sep 09 2023