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.

A277892 a(n) = A001222(A048675(n)).

Original entry on oeis.org

0, 1, 1, 2, 1, 3, 1, 2, 1, 4, 2, 5, 2, 2, 2, 6, 1, 7, 2, 2, 1, 8, 1, 3, 2, 2, 2, 9, 1, 10, 1, 3, 2, 3, 2, 11, 2, 2, 1, 12, 1, 13, 3, 3, 1, 14, 2, 4, 2, 3, 2, 15, 1, 3, 1, 3, 4, 16, 3, 17, 3, 3, 2, 4, 1, 18, 3, 3, 1, 19, 1, 20, 2, 2, 3, 4, 2, 21, 3, 3, 2, 22, 3, 3, 2, 2, 1, 23, 2, 4, 3, 5, 3, 4, 1, 24, 1, 3, 2, 25, 1, 26, 2, 2
Offset: 2

Views

Author

Antti Karttunen, Nov 08 2016

Keywords

Comments

For n >= 3, a(n) = index of the row where n is located in array A277898.

Crossrefs

Left inverse of A065091.
Cf. A277319 (positions of ones).
Cf. A000040 (positions of records), A277900.
Cf. A277895 (ordinal transform from a(3) onward).

Programs

  • Mathematica
    A048675[n_] := If[n == 1, 0, Total[#[[2]]*2^(PrimePi[#[[1]]] - 1)& /@ FactorInteger[n]]];
    a[n_] := PrimeOmega[A048675[n]];
    Table[a[n], {n, 2, 105}] (* Jean-François Alcover, Jan 11 2022 *)
  • PARI
    A048675(n) = my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2;
    A277892(n) = if(1==n,0,bigomega(A048675(n)));
    for(n=1, 3465, write("b277892.txt", n, " ", A277892(n)));
    
  • Python
    from sympy import factorint, primepi, primefactors
    def a001222(n): return 0 if n==1 else a001222(n//primefactors(n)[0]) + 1
    def a048675(n):
        if n==1: return 0
        f=factorint(n)
        return sum(f[i]*2**(primepi(i) - 1) for i in f)
    def a(n): return a001222(a048675(n))
    print([a(n) for n in range(2, 101)]) # Indranil Ghosh, Jun 19 2017
  • Scheme
    (define (A277892 n) (if (= 1 n) 0 (A001222 (A048675 n))))
    

Formula

a(A019565(n)) = a(A260443(n)) = A001222(n).
For all n >= 2, a(A065091(n)) = n.