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.

A333450 a(n) = Sum_{k=1..n} mu(k) * prime(floor(n/k)).

This page as a plain text file.
%I A333450 #12 Mar 31 2021 17:25:48
%S A333450 2,1,1,2,4,5,7,7,9,12,12,15,17,16,16,20,24,22,26,23,21,26,28,28,32,33,
%T A333450 31,32,32,29,41,39,43,40,44,40,44,45,45,47,51,52,60,55,53,52,62,64,64,
%U A333450 56,54,55,55,65,67,69,69,70,74,73,73,70,80,80,76,69,81,84,90,81,83,87,93,94
%N A333450 a(n) = Sum_{k=1..n} mu(k) * prime(floor(n/k)).
%F A333450 Sum_{k=1..n} a(floor(n/k)) = prime(n).
%t A333450 Table[Sum[MoebiusMu[k] Prime[Floor[n/k]], {k, 1, n}], {n, 1, 74}]
%t A333450 g[1] = 2; g[n_] := Prime[n] - Prime[n - 1]; a[n_] := Sum[Sum[MoebiusMu[k/d] g[d], {d, Divisors[k]}], {k, 1, n}]; Table[a[n], {n, 1, 74}]
%o A333450 (PARI) a(n) = sum(k=1, n, moebius(k)*prime(n\k)); \\ _Michel Marcus_, Mar 22 2020
%o A333450 (Python)
%o A333450 from functools import lru_cache
%o A333450 from sympy import prime
%o A333450 @lru_cache(maxsize=None)
%o A333450 def A333450(n):
%o A333450     c, j = 2*(n+1)-prime(n), 2
%o A333450     k1 = n//j
%o A333450     while k1 > 1:
%o A333450         j2 = n//k1 + 1
%o A333450         c += (j2-j)*A333450(k1)
%o A333450         j, k1 = j2, n//j2
%o A333450     return 2*j-c # _Chai Wah Wu_, Mar 31 2021
%Y A333450 Cf. A000040, A001223, A007444, A007504, A008683, A333449.
%K A333450 nonn
%O A333450 1,1
%A A333450 _Ilya Gutkovskiy_, Mar 21 2020