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.

A025129 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.

Original entry on oeis.org

0, 6, 10, 29, 43, 94, 128, 231, 279, 484, 584, 903, 1051, 1552, 1796, 2489, 2823, 3784, 4172, 5515, 6091, 7758, 8404, 10575, 11395, 14076, 15174, 18339, 19667, 23414, 24906, 29437, 31089, 36500, 38614, 44731, 47071, 54198, 56914, 65051, 68371, 77402, 81052, 91341
Offset: 1

Views

Author

Keywords

Comments

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

Examples

			From _Gus Wiseman_, Dec 05 2020: (Start)
The sequence of sums begins (n > 1):
    6 =  6
   10 = 10
   29 = 14 + 15
   43 = 22 + 21
   94 = 26 + 33 + 35
  128 = 34 + 39 + 55
  231 = 38 + 51 + 65 + 77
  279 = 46 + 57 + 85 + 91
(End)
		

Crossrefs

The nonsquarefree version is A024697 (shifted right).
Row sums of A338905 (shifted right).
A332765 is the greatest among these squarefree semiprimes.
A001358 lists semiprimes.
A006881 lists squarefree semiprimes.
A014342 is the self-convolution of the primes.
A056239 is the sum of prime indices of n.
A338899/A270650/A270652 give the prime indices of squarefree semiprimes.
A339194 sums squarefree semiprimes grouped by greater prime factor.

Programs

  • Haskell
    a025129 n = a025129_list !! (n-1)
    a025129_list= f (tail a000040_list) [head a000040_list] 1 where
       f (p:ps) qs k = sum (take (div k 2) $ zipWith (*) qs $ reverse qs) :
                       f ps (p : qs) (k + 1)
    -- Reinhard Zumkeller, Apr 07 2014
  • Mathematica
    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 *)
  • PARI
    A025129=n->sum(k=1,n\2,prime(k)*prime(n-k+1)) \\ M. F. Hasler, Apr 06 2014
    

Formula

a(n) = A024697(n) for even n. - M. F. Hasler, Apr 06 2014

Extensions

Following suggestions by Robert Israel and N. J. A. Sloane, initial 0=a(1) added by M. F. Hasler, Apr 06 2014