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.

A304818 If n = Product_i p(y_i) where p(i) is the i-th prime number and y_i <= y_j for i < j, then a(n) = Sum_i y_i*i.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, May 18 2018

Keywords

Comments

If n > 1 is not a prime number, we have a(n) >= A056239(n) >= Omega(n) >= omega(n) >= A071625(n) >= ... >= Omicron(n) >= omicron(n) > 1, where Omega = A001222, omega = A001221, Omicron = A304687 and omicron = A304465.

Examples

			The multiset of prime indices (see A112798) of 216 is {1,1,1,2,2,2}, which becomes {1,2,3,4,4,5,5,6,6} under A304660, so a(216) = 1+2+3+4+4+5+5+6+6 = 36.
		

Crossrefs

Programs

  • Maple
    a:= n-> (l-> add(i*numtheory[pi](l[i]), i=1..nops(l)))(
                 sort(map(i-> i[1]$i[2], ifactors(n)[2]))):
    seq(a(n), n=1..100);  # Alois P. Heinz, May 20 2018
  • Mathematica
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[With[{y=primeMS[n]},Sum[y[[i]]*i,{i,Length[y]}]],{n,20}]
  • PARI
    a(n) = {my(f = factor(n), s = 0, i = 0); for (k=1, #f~, for (kk = 1, f[k, 2], i++; s += i*primepi(f[k,1]););); s;} \\ Michel Marcus, May 19 2018
    
  • PARI
    vf(n) = {my(f=factor(n), nb = bigomega(n), g = vector(nb), i = 0); for (k=1, #f~, for (kk = 1, f[k, 2], i++; g[i] = primepi(f[k,1]););); return(g);} \\ A112798
    a(n) = {my(g = vf(n)); sum(k=1, #g, k*g[k]);} \\ Michel Marcus, May 19 2018

Formula

a(n) = A056239(A304660(n)).