[go: up one dir, main page]

login
a(n) = p(1)p(n) + p(2)p(n-1) + ... + p(k)p(n-k+1), where k = [ n/2 ], p = A000040, the primes.
16

%I #37 Feb 01 2021 22:15:30

%S 0,6,10,29,43,94,128,231,279,484,584,903,1051,1552,1796,2489,2823,

%T 3784,4172,5515,6091,7758,8404,10575,11395,14076,15174,18339,19667,

%U 23414,24906,29437,31089,36500,38614,44731,47071,54198,56914,65051,68371,77402,81052,91341

%N a(n) = p(1)p(n) + p(2)p(n-1) + ... + p(k)p(n-k+1), where k = [ n/2 ], p = A000040, the primes.

%C This is the sum of distinct squarefree semiprimes with prime indices summing to n + 1. A squarefree semiprime is a product of any two distinct prime numbers. A prime index of n is a number m such that the m-th prime number divides n. The multiset of prime indices of n is row n of A112798. - _Gus Wiseman_, Dec 05 2020

%H Reinhard Zumkeller, <a href="/A025129/b025129.txt">Table of n, a(n) for n = 1..10000</a>

%H Gus Wiseman, <a href="/A025129/a025129.txt">Sum of prime(i) * prime(j) for i + j = n, i != j.</a>

%F a(n) = A024697(n) for even n. - _M. F. Hasler_, Apr 06 2014

%e From _Gus Wiseman_, Dec 05 2020: (Start)

%e The sequence of sums begins (n > 1):

%e 6 = 6

%e 10 = 10

%e 29 = 14 + 15

%e 43 = 22 + 21

%e 94 = 26 + 33 + 35

%e 128 = 34 + 39 + 55

%e 231 = 38 + 51 + 65 + 77

%e 279 = 46 + 57 + 85 + 91

%e (End)

%t f[n_] := Block[{primeList = Prime@ Range@ n}, Total[ Take[ primeList, Floor[n/2]]*Reverse@ Take[ primeList, {Floor[(n + 3)/2], n}]]]; Array[f, 44] (* _Robert G. Wilson v_, Apr 07 2014 *)

%o (PARI) A025129=n->sum(k=1,n\2,prime(k)*prime(n-k+1)) \\ _M. F. Hasler_, Apr 06 2014

%o (Haskell)

%o a025129 n = a025129_list !! (n-1)

%o a025129_list= f (tail a000040_list) [head a000040_list] 1 where

%o f (p:ps) qs k = sum (take (div k 2) $ zipWith (*) qs $ reverse qs) :

%o f ps (p : qs) (k + 1)

%o -- _Reinhard Zumkeller_, Apr 07 2014

%Y Cf. A000040, A258323.

%Y The nonsquarefree version is A024697 (shifted right).

%Y Row sums of A338905 (shifted right).

%Y A332765 is the greatest among these squarefree semiprimes.

%Y A001358 lists semiprimes.

%Y A006881 lists squarefree semiprimes.

%Y A014342 is the self-convolution of the primes.

%Y A056239 is the sum of prime indices of n.

%Y A338899/A270650/A270652 give the prime indices of squarefree semiprimes.

%Y A339194 sums squarefree semiprimes grouped by greater prime factor.

%Y Cf. A001221, A005117, A062198, A098350, A168472, A320656, A338900, A338901, A338904, A339114, A339116.

%K nonn

%O 1,2

%A _Clark Kimberling_

%E Following suggestions by _Robert Israel_ and _N. J. A. Sloane_, initial 0=a(1) added by _M. F. Hasler_, Apr 06 2014