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.

A161975 Sum_{x=sum of prime factors of n-th composite..n-th composite} x.

Original entry on oeis.org

4, 11, 21, 30, 34, 57, 69, 92, 108, 143, 174, 186, 175, 264, 280, 246, 342, 351, 420, 483, 470, 424, 564, 621, 531, 660, 765, 837, 885, 980, 781, 1121, 1134, 1209, 1136, 1242, 1430, 1420, 1518, 1422, 1246, 1764, 1425, 1938, 2014, 1992, 2091, 2136, 2090, 2394
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 23 2009

Keywords

Examples

			4(=4), 11(=(2+3)+6), 22(=(2+2+2)+7+8), 30(=(3+3)+7+9), 34(=(2+5)+8+9+10), etc.
		

Crossrefs

Cf. A002808.

Programs

  • Maple
    A002808 := proc(n) option remember ; if n = 1 then 4; else for a from procname(n-1)+1 do if not isprime(a) then RETURN(a) ; fi; od: fi; end: A001414 := proc(n) pfs :=ifactors(n)[2] ; add(op(1,p)*op(2,p) ,p=pfs) ; end: A046343 := proc(n) A001414(A002808(n)); end: A000217 := proc(n) n*(n+1)/2 ; end: A161975 := proc(n) A000217( A002808(n)) - A000217(A046343(n)-1) ; end: seq(A161975(n),n=1..90) ; # R. J. Mathar, Aug 03 2009
  • PARI
    a(n)=my(c=n+n\log(n+1),f);for(i=0,n-c+primepi(c),if(isprime(c++),i--));f=factor(c);binomial(c+1,2)-binomial(sum(i=1,#f[,1],f[i,1]*f[i,2]),2)

Extensions

a(3), a(12) and others corrected by R. J. Mathar, Aug 03 2009
Program by Charles R Greathouse IV, Oct 12 2009