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.

A050252 Number of digits in the prime factorization of n (counting terms of the form p^1 as p).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 2, 3, 3, 2, 4, 2, 3, 3, 3, 2, 3, 2, 4, 3, 3, 2, 3, 2, 3, 3, 4, 2, 3, 3, 3, 3, 3, 2, 4, 2, 3, 3, 2, 3, 4, 2, 4, 3, 3, 2, 4, 2, 3, 3, 4, 3, 4, 2, 3, 2, 3, 2, 4, 3, 3, 3, 4, 2, 4, 3, 4, 3, 3, 3, 3, 2, 3, 4, 4, 3, 4
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. also A377369 (analog for base 2).

Programs

  • Haskell
    a050252 1 = 1
    a050252 n = sum $ map a055642 $
                (a027748_row n) ++ (filter (> 1) $ a124010_row n)
    -- Reinhard Zumkeller, Aug 03 2013, Jun 21 2011
    
  • Mathematica
    nd[n_]:=Total@IntegerLength@Select[Flatten@FactorInteger[n],#>1&];Table[If[n==1,1,nd[n]],{n,102}] (* Vladimir Joseph Stephan Orlovsky, Jan 30 2012 *)
  • Python
    from sympy import factorint
    def a(n): return 1 if n == 1 else sum(len(str(p))+(len(str(e)) if e>1 else 0) for p, e in factorint(n).items())
    print([a(n) for n in range(1, 103)]) # Michael S. Branicky, Dec 27 2024

Formula

a(A192010(n)) = n and a(m) != n for m < A192010(n);
a(A046759(n)) < A055642(A046759(n)); a(A046758(n)) = A055642(A046758(n)); a(A046760(n)) > A055642(A046760(n)). [Reinhard Zumkeller, Jun 21 2011]