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.

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

Original entry on oeis.org

4, 6, 19, 29, 68, 94, 177, 231, 400, 484, 753, 903, 1340, 1552, 2157, 2489, 3352, 3784, 5013, 5515, 7052, 7758, 9773, 10575, 13076, 14076, 17023, 18339, 21876, 23414, 27715, 29437, 34570, 36500, 42335, 44731, 51560, 54198, 61955, 65051, 73700, 77402, 87293
Offset: 1

Views

Author

Keywords

Comments

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

Crossrefs

Programs

  • Haskell
    a024697 n = a024697_list !! (n-1)
    a024697_list = f (tail a000040_list) [head a000040_list] 2 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
  • Maple
    A024697:=n->sum( ithprime(k)*ithprime(n-k+1), k=1..(n+1)/2 ); seq(A024697(n), n=1..50); # Wesley Ivan Hurt, Apr 06 2014
  • Mathematica
    Table[Sum[Prime[k] Prime[n - k + 1], {k, (n + 1)/2}], {n, 50}] (* Wesley Ivan Hurt, Apr 06 2014 *)
  • PARI
    A024697(n)=sum(k=1, (n+1)\2, prime(k)*prime(n-k+1)) \\ M. F. Hasler, Apr 06 2014
    

Extensions

Name edited and values double-checked by M. F. Hasler, Apr 06 2014