login
A161754
a(n) = sum of all nonprimes from nonprime(p) to nonprime(q) where p is nonprime(n+1) and q is nonprime(n+2).
0
11, 23, 31, 26, 29, 49, 59, 43, 46, 75, 81, 58, 62, 99, 69, 71, 74, 77, 121, 131, 91, 94, 97, 99, 153, 106, 109, 168, 175, 122, 125, 192, 131, 134, 137, 139, 216, 149, 151, 153, 155, 239, 247, 169, 171, 173, 175, 269, 183, 185, 282, 289, 197, 199, 202, 206, 315, 214, 218
OFFSET
1,1
COMMENTS
For convenience "nonprime(n)" is used for "n-th nonprime". Here the nonprimes start at 0 (see A141468), so nonprime(1) to nonprime(20) are 0, 1, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28.
EXAMPLE
n = 1: nonprime(1+1) = 1, nonprime(1+2) = 4. Sum of all nonprimes from nonprime(1) = 0 to nonprime(4) = 6 is 0+1+4+6, hence a(1) = 11.
n = 4: nonprime(4+1) = 8, nonprime(4+2) = 9. Sum of all nonprimes from nonprime(8) = 12 to nonprime(9) = 14 is 12+14, hence a(4) = 26.
n = 11: nonprime(11+1) = 18, nonprime(11+2) = 20. Sum of all nonprimes from nonprime(18) = 26 to nonprime(20) = 28 is 26+27+28, hence a(11) = 81.
PROG
(Magma) Nonprimes:=[0] cat [ n: n in [1..120] | not IsPrime(n) ];
NthNonprime:= func< n | Nonprimes[n] >;
[ &+[ k: k in [NthNonprime(p)..NthNonprime(q)] | not IsPrime(k) ] where p is NthNonprime(n+1) where q is NthNonprime(n+2): n in [1..60] ];
CROSSREFS
Sequence in context: A259560 A136001 A158203 * A038904 A179630 A060399
KEYWORD
nonn
AUTHOR
EXTENSIONS
Edited and corrected (a(47)=175 inserted) by Klaus Brockhaus, Jun 22 2009
STATUS
approved