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.

A118258 Numbers of carefree couples (a,b) with a,b<=n.

Original entry on oeis.org

1, 3, 7, 9, 16, 20, 31, 35, 39, 46, 63, 67, 87, 98, 112, 119, 146, 152, 182, 189, 209, 228, 265, 273, 286, 308, 321, 330, 375, 391, 440, 453, 486, 515, 554, 565, 624, 657, 698, 712, 778, 801, 871, 888, 906, 946, 1022, 1037, 1063, 1080, 1133, 1152, 1236, 1252
Offset: 1

Views

Author

Eric W. Weisstein, Apr 20 2006

Keywords

Comments

(a, b) is a carefree couple if gcd(a, b) = 1 and a is squarefree (A005117). - Amiram Eldar, Mar 03 2021

Examples

			a(4) = 9 because there are 9 ordered pairs (i,j) of positive integers such that 1<=i,j<=4, gcd(i,j)=1 and i is squarefree: (1,1), (2,1), (3,1), (1,2), (3,2), (1,3), (2,3), (1,4), (3,4). - _Geoffrey Critzer_, Jan 12 2015
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge University Press, 2003, Section 2.5.1 Carefree Couples, p. 110.

Crossrefs

Programs

  • Maple
    F:= proc(n) local A,a;
      A:= select(numtheory:-issqrfree, [$1..n]);
      add(nops(select(y->igcd(a,y)=1, [$1..n])),a=A);
    end proc:
    seq(F(n),n=1..100); # Robert Israel, Jan 12 2015
  • Mathematica
    Table[nn = n;Select[Level[Table[Table[{i, j}, {i, 1, nn}], {j, 1, nn}], {2}], Apply[GCD, #] == 1 && SquareFreeQ[#[[1]]] &] // Length, {n, 1, 54}] (* Geoffrey Critzer, Jan 12 2015 *)
  • PARI
    a(n)=my(s); forsquarefree(m=1,n, s+=sumdiv(m, d, n\d*moebius(d))); s \\ Charles R Greathouse IV, Jan 25 2018

Formula

From Amiram Eldar, Mar 03 2021: (Start)
a(n) = (A118259(n) + A118260(n))/2.
a(n) ~ A065464 * n^2 + O(n*log(n)). (End)