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-2 of 2 results.

A368677 Number of numbers k less than n and not dividing n such that n-k is squarefree.

Original entry on oeis.org

0, 0, 1, 1, 3, 2, 4, 4, 5, 5, 6, 5, 8, 7, 8, 9, 11, 10, 12, 10, 12, 12, 14, 13, 16, 15, 16, 14, 17, 16, 18, 18, 18, 19, 20, 19, 23, 22, 23, 22, 26, 23, 27, 25, 27, 28, 29, 28, 30, 31, 30, 29, 32, 31, 33, 32, 33, 33, 35, 32, 37, 36, 37, 38, 39, 37, 40, 38, 40, 40
Offset: 1

Views

Author

Wesley Ivan Hurt, Jan 02 2024

Keywords

Examples

			a(12) = 5. The numbers less than 12 that do not divide 12 are: {5,7,8,9,10,11} with values of n-k: {7,5,4,3,2,1} (exactly 5 of which are squarefree).
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[MoebiusMu[n - k]^2 (Ceiling[n/k] - Floor[n/k]), {k, n}], {n, 100}]
  • PARI
    a(n) = sum(k=1, n-1, (n % k) && issquarefree(n-k)); \\ Michel Marcus, Jan 03 2024

Formula

a(n) = Sum_{k=1..n} mu(n-k)^2 * (ceiling(n/k) - floor(n/k)).

A368674 Sum of the squarefree numbers less than n that do not divide n.

Original entry on oeis.org

0, 0, 2, 3, 5, 5, 16, 21, 20, 16, 33, 33, 44, 48, 63, 84, 86, 92, 103, 105, 112, 130, 165, 177, 183, 173, 211, 191, 214, 202, 273, 302, 290, 318, 359, 395, 406, 422, 465, 503, 520, 508, 603, 611, 623, 621, 692, 728, 732, 722, 719, 749, 790, 832, 827, 875, 876, 924, 1013, 1001
Offset: 1

Views

Author

Wesley Ivan Hurt, Jan 02 2024

Keywords

Examples

			a(12) = 33. There are 4 squarefree numbers less than 12 that do not divide 12, namely: 5, 7, 10, and 11. Their sum is 5 + 7 + 10 + 11 = 33.
		

Crossrefs

Cf. A008683 (mu), A368673.

Programs

  • Mathematica
    Table[Sum[k*MoebiusMu[k]^2 (Ceiling[n/k] - Floor[n/k]), {k, n}], {n, 100}]
  • PARI
    a(n) = sum(k=1, n-1, if ((n % k) && issquarefree(k), k)); \\ Michel Marcus, Jan 03 2024

Formula

a(n) = Sum_{k=1..n} k * mu(k)^2 * (ceiling(n/k) - floor(n/k)).
Showing 1-2 of 2 results.