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.

A280385 a(n) = Sum_{k=1..n} prime(k)^2*floor(n/prime(k)) .

Original entry on oeis.org

0, 4, 13, 17, 42, 55, 104, 108, 117, 146, 267, 280, 449, 502, 536, 540, 829, 842, 1203, 1232, 1290, 1415, 1944, 1957, 1982, 2155, 2164, 2217, 3058, 3096, 4057, 4061, 4191, 4484, 4558, 4571, 5940, 6305, 6483, 6512, 8193, 8255, 10104, 10229, 10263, 10796, 13005, 13018, 13067, 13096, 13394, 13567, 16376, 16389, 16535
Offset: 1

Views

Author

Ilya Gutkovskiy, Jan 01 2017

Keywords

Comments

Sum of all squares of prime divisors of all positive integers <= n.
Partial sums of A005063.

Examples

			For n = 6 the prime divisors of the first six positive integers are {0}, {2}, {3}, {2}, {5}, {2, 3} so a(6) = 0^2 + 2^2 + 3^2 + 2^2 + 5^2 + 2^2 + 3^2 = 55.
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[Prime[k]^2 Floor[n/Prime[k]], {k, 1, n}], {n, 55}]
    Table[Sum[DivisorSum[k, #1^2 &, PrimeQ[#1] &], {k, 1, n}], {n, 55}]
    nmax = 55; Rest[CoefficientList[Series[(1/(1 - x)) Sum[Prime[k]^2 x^Prime[k]/(1 - x^Prime[k]), {k, 1, nmax}], {x, 0, nmax}], x]]
  • PARI
    a(n) = sum(k=1, n, prime(k)^2 * (n\prime(k))); \\ Indranil Ghosh, Apr 03 2017
    
  • Python
    from sympy import prime
    print([sum([prime(k)**2 * (n//prime(k)) for k in range(1, n + 1)]) for n in range(1, 21)]) # Indranil Ghosh, Apr 03 2017

Formula

G.f.: (1/(1 - x))*Sum_{k>=1} prime(k)^2*x^prime(k)/(1 - x^prime(k)).