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.

A034696 Dirichlet convolution of primes (A000040) with themselves.

Original entry on oeis.org

4, 12, 20, 37, 44, 82, 68, 118, 117, 182, 124, 296, 164, 274, 298, 375, 236, 512, 268, 612, 462, 502, 332, 950, 509, 650, 642, 924, 436, 1310, 508, 1108, 858, 910, 970, 1831, 628, 1054, 1078, 1942, 716, 2034, 764, 1680, 1764, 1294, 844, 2968, 1197, 2136, 1522
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A000040.

Programs

  • Mathematica
    Table[DivisorSum[n, Prime[n/#]*Prime[#] &], {n, 80}] (* Wesley Ivan Hurt, Jun 22 2024 *)
  • PARI
    a(n) = sumdiv(n, d, prime(d)*prime(n/d)); \\ Michel Marcus, Mar 11 2018
    
  • Python
    from sympy import divisors, prime, primerange
    def dirichlet(f, g, n): return sum(f[d] * g[n//d] for d in divisors(n))
    def aupton(terms):
      p = [0] + list(primerange(2, prime(terms)+1))
      return [dirichlet(p, p, k) for k in range(1, terms+1)]
    print(aupton(51)) # Michael S. Branicky, Apr 12 2021

Formula

a(n) = Sum_{d|n} prime(d)*prime(n/d). - Ilya Gutkovskiy, Mar 11 2018