login
Partial sums of the generalized Cuban primes A007645.
2

%I #14 Mar 09 2026 23:08:50

%S 3,10,23,42,73,110,153,214,281,354,433,530,633,742,869,1008,1159,1316,

%T 1479,1660,1853,2052,2263,2486,2715,2956,3227,3504,3787,4094,4407,

%U 4738,5075,5424,5791,6164,6543,6940,7349,7770,8203,8642,9099,9562,10049

%N Partial sums of the generalized Cuban primes A007645.

%C Partial sums of primes of the form 3*m+1/2+-1/2. - _Juri-Stepan Gerasimov_, Jan 29 2010. E.g. a(1)=3*1+1/2-1/2=3, a(2)=3+3*2+1/2+1/2=10.

%C The primes in this sequence begin: a(1) = 3, a(3) = 23, a(5) = 73, a(9) = 281, a(11) = 433. Of these, the subset of generalized cuban primes which are partial sums of generalized cuban primes begins: 3, 73, 433.

%F a(n) = SUM[i=1..n] A007645(i) = SUM[i=1..n] {primes of the form x^2 + xy + y^2} = SUM[i=1..n] {primes of form x^2 + 3*y^2} = SUM[i=1..n] {primes == 0 or 1 mod 3}.

%e a(30) = 3 + 7 + 13 + 19 + 31 + 37 + 43 + 61 + 67 + 73 + 79 + 97 + 103 + 109 + 127 + 139 + 151 + 157 + 163 + 181 + 193 + 199 + 211 + 223 + 229 + 241 + 271 + 277 + 283 + 307 = 4094.

%p A007645 := proc(n) if n <= 2 then op(n,[3,7]) ; ; else for a from procname(n-1)+2 by 2 do if isprime(a) and (a mod 3) <> 2 then return a ; end if; end do: end if; end proc:

%p A172113 := proc(n) add( A007645(i),i=1..n) ; end proc: seq(A172113(n),n=1..80) ; # _R. J. Mathar_, Apr 24 2010

%Y Cf. A000040, A007645, A038349.

%K easy,nonn

%O 1,1

%A _Jonathan Vos Post_, Jan 25 2010

%E a(5) corrected and more terms appended by _R. J. Mathar_, Feb 07 2010

%E Edited by _N. J. A. Sloane_, Sep 26 2010, Jan 29 2013.