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.

A163515 If n-th composite is the product of k1-th prime, k2-th prime, ..., kr-th prime then set a(n) = k1 + k2 + ... + kr.

This page as a plain text file.
%I A163515 #18 Nov 03 2022 18:33:36
%S A163515 2,3,3,4,4,4,5,5,4,5,5,6,6,5,6,7,6,6,6,5,7,8,7,6,9,8,6,7,7,7,10,6,8,7,
%T A163515 9,8,7,8,7,10,11,7,12,8,6,9,8,9,11,8,7,13,8,10,9,9,7,8,14,8,10,15,12,
%U A163515 8,8,10,11,13,16,11,7,9,9,8,10,9,9,17,8,9,14,8,11,12,12,10,18,11,8,10,19,15
%N A163515 If n-th composite is the product of k1-th prime, k2-th prime, ..., kr-th prime then set a(n) = k1 + k2 + ... + kr.
%H A163515 Harvey P. Dale, <a href="/A163515/b163515.txt">Table of n, a(n) for n = 1..1000</a>
%e A163515 The 1st composite is 4 = 2*2 = prime(1)*prime(1), so a(1) = 1 + 1 = 2;
%e A163515 the 2nd composite is 6 = 2*3 = prime(1)*prime(2), so a(2) = 1 + 2 = 3;
%e A163515 the 3rd composite is 8 = 2*2*2 = prime(1)*prime(1)*prime(1), so a(3) = 1 + 1 + 1 = 3;
%e A163515 the 4th composite is 9 = 3*3 = prime(2)*prime(2), so a(4) = 2 + 2 = 4.
%p A163515 A002808 := proc(n) local a; if n = 1 then 4; else for a from procname(n-1)+1 do if not isprime(a) then RETURN(a) ; end if; end do; end if; end proc: A163515 := proc(n) local c; c := A002808(n) ; pfs := ifactors(c)[2] ; add( op(2,p)*numtheory[pi](op(1,p)), p=pfs) ; end: seq(A163515(n),n=1..100) ; # _R. J. Mathar_, Aug 05 2009
%t A163515 kp[c_]:=Total[Times@@@({PrimePi[#[[1]]],#[[2]]}&/@FactorInteger[c])]; kp/@Select[ Range[200],CompositeQ] (* _Harvey P. Dale_, Nov 03 2022 *)
%Y A163515 Cf. A000040, A002808, A061395.
%K A163515 nonn
%O A163515 1,1
%A A163515 _Juri-Stepan Gerasimov_, Jul 30 2009
%E A163515 Corrected by _R. J. Mathar_, Aug 05 2009
%E A163515 Example edited by _Harvey P. Dale_, Nov 27 2013
%E A163515 Further edits by _Jon E. Schoenfield_, Mar 07 2019