A240860 a(n) = Sum_{i=1..n} (-1)^{i+1} prime(i)^2, where prime(k) denotes the k-th prime: alternating sum of the squares of the first n primes.
4, -5, 20, -29, 92, -77, 212, -149, 380, -461, 500, -869, 812, -1037, 1172, -1637, 1844, -1877, 2612, -2429, 2900, -3341, 3548, -4373, 5036, -5165, 5444, -6005, 5876, -6893, 9236, -7925, 10844, -8477, 13724, -9077, 15572, -10997, 16892, -13037, 19004, -13757
Offset: 1
Keywords
Links
- Seiichi Manyama, Table of n, a(n) for n = 1..10000
- Timothy Varghese, Alternating sums, MathOverflow, May 2014.
Programs
-
PARI
a(n) = sum(i=1, n, (-1)^(i+1)*prime(i)^2); \\ Michel Marcus, May 09 2014
Comments