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.

A275812 Sum of exponents larger than one in the prime factorization of n: A001222(n) - A056169(n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 11 2016

Keywords

Crossrefs

Differs from A212172 for the first time at n=36, where a(36)=4, while A212172(36)=2.

Programs

  • Mathematica
    Table[Total@ Map[Last, Select[FactorInteger@ n, Last@ # > 1 &] /. {} -> {{0, 0}}], {n, 120}] (* Michael De Vlieger, Aug 11 2016 *)
  • PARI
    a(n) = my(f = factor(n)); sum(k=1, #f~, if (f[k,2] > 1, f[k,2])); \\ Michel Marcus, Jul 19 2017
  • Perl
    sub a275812 { vecsum( grep {$> 1} map {$->[1]} factor_exp(shift) ); } # Dana Jacobsen, Aug 15 2016
    
  • Python
    from sympy import factorint, primefactors
    def a001222(n):
        return 0 if n==1 else a001222(n//primefactors(n)[0]) + 1
    def a056169(n):
        f=factorint(n)
        return 0 if n==1 else sum(1 for i in f if f[i]==1)
    def a(n):
        return a001222(n) - a056169(n)
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jun 19 2017
    

Formula

a(1) = 0, and for n > 1, if A067029(n)=1 [when n is one of the terms of A247180], a(n) = a(A028234(n)), otherwise a(n) = A067029(n)+a(A028234(n)).
a(n) = A001222(n) - A056169(n).
a(n) = A001222(A057521(n)). - Antti Karttunen, Jul 19 2017
From Amiram Eldar, Sep 28 2023: (Start)
Additive with a(p) = 0, and a(p^e) = e for e >= 2.
a(n) >= 0, with equality if and only if n is squarefree (A005117).
a(n) <= A001222(n), with equality if and only if n is powerful (A001694).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{p prime} (1/p^2 + 1/(p*(p-1))) = A085548 + A136141 = 1.22540408909086062637... . (End)
a(n) = A046660(n) + A056170(n). - Amiram Eldar, Jan 09 2024