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.
%I A162385 #17 May 27 2017 22:18:25 %S A162385 2,11,233,4001,16771073,4294868993,68719083521,1152921502996234241, %T A162385 1329227995784915871174424803370074113, %U A162385 95780971304118053647396688732666809244153592049303553 %N A162385 Alternating sum from the n-th Mersenne prime up to the n-th perfect number. %C A162385 Define the alternating sum S(k) = sum_{x=0..k} x*(-1)^x = (-1)^k*(k/2+1/4)-1/4 = A130472(k). %C A162385 a(n) is this sum evaluated with a lower limit of A000668(n) and an upper limit of A000396(n). %F A162385 a(n) = A130472(A000396(n)) - A130472( A000668(n)-1). %F A162385 a(n) = (A000396(n) - A000668(n) + 1)/2. - _César Aguilera_, May 13 2017 %F A162385 a(n) = (1 + A139224(n))/2. - _Omar E. Pol_, May 22 2017 %e A162385 a(1) = -3+4-5+6 = 2. a(2) = -7+8-9+10-11+12-13+14-15+16-17+...-27+28 = 11. %Y A162385 Cf. A000396, A000668. %K A162385 nonn,less %O A162385 1,1 %A A162385 _Juri-Stepan Gerasimov_, Jul 21 2009 %E A162385 Edited and extended by _R. J. Mathar_, Sep 16 2009