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.

A342724 a(n) = Sum_{primes p <= 2n} of g(frac(n/p)), where g(t) = [0 if t = 0, -1 if 0 < t < 1/2, 1 if t >= 1/2], and where frac(x) denotes the fractional part.

This page as a plain text file.
%I A342724 #30 Apr 10 2021 22:48:08
%S A342724 1,1,2,1,3,1,1,3,4,2,5,3,4,3,2,0,4,5,5,6,5,2,5,3,4,5,5,6,9,6,5,7,10,7,
%T A342724 9,6,6,7,9,6,7,4,6,7,6,6,9,10,10,11,10,7,12,10,9,9,8,8,11,11,11,12,12,
%U A342724 10,13,9,11,12,11,7,9,10,13,14,13,10,12,11,10
%N A342724 a(n) = Sum_{primes p <= 2n} of g(frac(n/p)), where g(t) = [0 if t = 0, -1 if 0 < t < 1/2, 1 if t >= 1/2], and where frac(x) denotes the fractional part.
%C A342724 The function a(n) is a measure of how many times n rounds up (assigned value +1), down (assigned value -1), or not at all (assigned value +0) when divided by incremental prime numbers (see below example.)
%e A342724 For n = 4, a(4) = 0 + (-1) + 1 + 1 = 2.
%o A342724 (PARI)
%o A342724 g(t) = {if(t==0, 0, if(t<1/2, -1, 1))}
%o A342724 a(n) = {sum(i=1, primepi(2*n), g(frac(n/prime(i))))} \\ _Andrew Howroyd_, Mar 20 2021
%Y A342724 Cf. A337319.
%K A342724 nonn
%O A342724 1,3
%A A342724 _Christoph B. Kassir_, Mar 19 2021