OFFSET
1,1
EXAMPLE
4(=4), 11(=(2+3)+6), 22(=(2+2+2)+7+8), 30(=(3+3)+7+9), 34(=(2+5)+8+9+10), etc.
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
PROG
(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)
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Jun 23 2009
EXTENSIONS
a(3), a(12) and others corrected by R. J. Mathar, Aug 03 2009
Program by Charles R Greathouse IV, Oct 12 2009
STATUS
approved