login
The sum of the first n primes, minus n.
5

%I #41 Apr 07 2021 03:41:00

%S 1,3,7,13,23,35,51,69,91,119,149,185,225,267,313,365,423,483,549,619,

%T 691,769,851,939,1035,1135,1237,1343,1451,1563,1689,1819,1955,2093,

%U 2241,2391,2547,2709,2875,3047,3225,3405,3595,3787,3983,4181,4391,4613,4839

%N The sum of the first n primes, minus n.

%C Also: a(n) = sum_{k=1..n} phi(prime(k)).

%C Partial sums of A006093. - _Omar E. Pol_, Oct 31 2013

%C Difference minus n, between the constant term prime(n) for a polynomial P(x) built from the first n primes took as coefficients and the value that such term should have in order to make P(x) divisible by (x-1). See links. - _R. J. Cano_, Jan 14 2014

%C Sum of all deficiencies of the first n primes. - _Omar E. Pol_, Feb 21 2014

%H Enrique Pérez Herrero, <a href="/A101301/b101301.txt">Table of n, a(n) for n = 1..5000</a>

%H R. J. Cano, <a href="http://oeis.org/w/images/2/26/DaysYearsPermute.pdf">Additional information</a>

%H R. J. Cano, <a href="http://oeis.org/w/images/9/98/A101301.gp.txt">PARI/GP code: alternative sequencer</a>

%F a(n)=sum_{k=1..n} (prime(k)-1)

%F a(n)=A007504(n)-n. - _Juri-Stepan Gerasimov_, Nov 23 2009

%F A027424(A000040(n)) < a(n). - _Charles R Greathouse IV_, Apr 07 2021

%p seq((sum(phi(ithprime(x)),k=1..n)),n=1..100);

%t f[n_]:=Plus@@Prime[Range[n]]-n; Table[f[n],{n,1,50}] (* _Enrique Pérez Herrero_, Jun 10 2012 *)

%o (Haskell)

%o a101301 n = a101301_list !! (n-1)

%o a101301_list = scanl1 (+) a006093_list

%o -- _Reinhard Zumkeller_, May 01 2013

%o (PARI) a(n)=my(s);forprime(p=2,prime(n),s+=p); s-n \\ _Charles R Greathouse IV_, Oct 31 2013

%o (PARI) See links.

%Y Cf. A000010, A000040, A006093, A005867.

%K nonn

%O 1,2

%A _Jorge Coveiro_, Dec 22 2004

%E Name simplified by _Juri-Stepan Gerasimov_, Nov 23 2009