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.

Showing 1-1 of 1 results.

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.

Original entry on oeis.org

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, 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, 10, 13, 9, 11, 12, 11, 7, 9, 10, 13, 14, 13, 10, 12, 11, 10
Offset: 1

Views

Author

Christoph B. Kassir, Mar 19 2021

Keywords

Comments

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.)

Examples

			For n = 4, a(4) = 0 + (-1) + 1 + 1 = 2.
		

Crossrefs

Cf. A337319.

Programs

  • PARI
    g(t) = {if(t==0, 0, if(t<1/2, -1, 1))}
    a(n) = {sum(i=1, primepi(2*n), g(frac(n/prime(i))))} \\ Andrew Howroyd, Mar 20 2021
Showing 1-1 of 1 results.