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.

A151960 Sum_{x = A141468(n) to A000040(n)} 1-(-1)^x*x.

This page as a plain text file.
%I A151960 #6 May 01 2013 21:10:56
%S A151960 2,5,3,3,6,16,12,12,15,37,24,30,33,55,39,45,77,54,88,66,66,72,109,84,
%T A151960 129,99,99,142,105,108,126,175,138,138,200,153,211,168,171,233,186,
%U A151960 244,201,201,204,268,222,303,243,243,316,255,255,267,349,282
%N A151960 Sum_{x = A141468(n) to A000040(n)} 1-(-1)^x*x.
%e A151960 a(1)=1-0+1+1+1-2=2, a(2)=1+1+1-2+1+3=5, a(3)=1-4+1+5=3, a(4)=1-6+1+7=3, a(5)=1-8+1+9+1-10+1+11=6, a(6)=1+9+1-10+1+11+1-12+1+13=16, a(7)=1-10+1+11+1-12+1+13+1-14+1+15+1-16+1+17=12, a(8)=1-12+1+13+1-14+1+15+1-16+1+17+1-18+1+19=12, a(9)=1-14+1+15+1-16+1+17+1-18+1+19+1-20+1+21+1-22+1+23=15, a(10)=1+15+1-16+1+17+1-18+1+19+1-20+1+21+1-22+1+23+1-24+1+25+1-26+1+27+1-28+1+29=37, ...
%t A151960 ZeroAndNonPrime[n_Integer] := FixedPoint[n - 1 + PrimePi@# &, n - 1 + PrimePi@n]; ZeroAndNonPrime[2] = 1; f[n_] := Sum[1-(-1)^x*x, {x, ZeroAndNonPrime@n, Prime@n}]; Array[f, 56]
%Y A151960 Cf. A000040, A141468, A161669.
%K A151960 nonn
%O A151960 1,1
%A A151960 _Juri-Stepan Gerasimov_, Jul 14 2009
%E A151960 Edited, corrected and extended by _Robert G. Wilson v_, Jul 24 2009
%E A151960 Definition clarified by _N. J. A. Sloane_, Jul 25 2009
%E A151960 Definition corrected by _Charles R Greathouse IV_, Jul 22 2010