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.

A098235 Number of ways to write n as a sum of two ordered positive squarefree numbers.

Original entry on oeis.org

0, 1, 2, 3, 2, 3, 4, 6, 4, 3, 4, 7, 6, 5, 6, 10, 8, 8, 6, 11, 8, 9, 8, 14, 10, 9, 10, 13, 10, 9, 10, 16, 12, 13, 12, 22, 14, 13, 14, 22, 16, 15, 18, 25, 20, 15, 16, 26, 20, 16, 14, 27, 20, 20, 14, 26, 20, 21, 18, 29, 22, 21, 22, 30, 22, 21, 22, 35, 24, 25, 22, 42, 26, 27, 26, 39
Offset: 1

Views

Author

Ralf Stephan, Aug 31 2004

Keywords

Comments

a(n) ~ n * Prod[p prime, (1-2/p^2) * Prod[p^2|n, (p^2-1)/(p^2-2)]].

Examples

			a(12)=7 because 12=1+11=2+10=5+7=6+6=7+5=10+2=11+1.
		

Crossrefs

Programs

  • Mathematica
    Join[{0}, Table[Sum[(MoebiusMu[k]*MoebiusMu[n - k + 1])^2, {k, 1, n}], {n, 1, 50}]] (* G. C. Greubel, Dec 28 2016 *)
  • PARI
    a(n) = sum(k=1, n-1, (moebius(k)*moebius(n-k))^2) \\ Indranil Ghosh, Mar 10 2017
    
  • PARI
    a(n)=my(s); forsquarefree(k=1, n-1, s+=issquarefree(n-k)); s \\ Charles R Greathouse IV, Jan 08 2018

Formula

a(n) = Sum_{k=1..n-1} (mu(k)*mu(n-k))^2. - Benoit Cloitre, Sep 24 2006
a(n) = Sum_{k=1..n-1} ( A008966(k)*A008966(n-k) ). - Reinhard Zumkeller, Nov 04 2009
G.f.: ( Sum_{k>=1} mu(k)^2*x^k )^2, where mu(k) is the Moebius function (A008683). - Ilya Gutkovskiy, Dec 28 2016