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.

A348841 Number of primes with even exponents >= 2 in the prime power factorization of n!, for n >= 1.

Original entry on oeis.org

0, 0, 0, 0, 0, 2, 2, 1, 1, 3, 3, 2, 2, 2, 2, 2, 2, 3, 3, 4, 2, 2, 2, 4, 4, 4, 3, 4, 4, 5, 5, 4, 2, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 4, 5, 7, 7, 8, 8, 7, 5, 6, 6, 8, 6, 4, 2, 4, 4, 6, 6, 6, 7, 7, 5, 6, 6, 7, 7, 6, 6, 7, 7, 7, 6, 7, 7, 10, 10, 9
Offset: 1

Views

Author

Wolfdieter Lang, Nov 02 2021

Keywords

Comments

The restriction to positive exponents in the prime factor factorization is used to avoid the ambiguity due to p^0 = 1 for any prime. Then a(n) = A000720(n) - A055460(n), for n >= 1.

Examples

			n = 12: 12! = 479001600 = 2^10 * 5^2  *  3^5 * 7^1 * 11^1, hence a(12) = 2,  A055460(12) = 3 and A000720(12) = 5. This latter equation holds because 2, 3, 5, 7, 11 are the primes not exceeding 12.
		

Crossrefs

Programs

  • Mathematica
    Table[Length@Select[FactorInteger[n!],EvenQ@Last@#&],{n,80}] (* Giorgos Kalogeropoulos, Nov 02 2021 *)
  • PARI
    a(n) = my(f=factor(n!)); #select(x->(! (x%2)), f[,2]); \\ Michel Marcus, Nov 03 2021
    
  • PARI
    a(n) = my(res = 0); forprime(p = 2, n\2, res+=(val(n, p)%2==0)); res
    val(n, p) = my(r=0); while(n, r+=n\=p); r \\ David A. Corneth, Nov 03 2021

Formula

a(n) = A000720(n) - A055460(n), for n >= 1.
a(n) = A162641(A000142(n)). - Michel Marcus, Nov 03 2021