Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #69 Sep 08 2022 08:46:19
%S 1,2,4,5,8,8,12,12,15,16,20,18,24,24,26,27,32,30,36,34,38,40,44,40,47,
%T 48,50,50,56,52,60,58,62,64,66,63,72,72,74,72,80,76,84,82,84,88,92,86,
%U 95,94,98,98,104,100,106,104,110,112,116
%N a(n) = 2n - d(n), where d(n) is the number of divisors of n (A000005).
%C Let H_n denote the y=n/x (1<=x<=n) piece of the hyperbola. a(n) is the number of intersections between H_n and the Cartesian grid (Z X R union R X Z) and a(n)-1 is the number of (a,a+1) X (b,b+1) open unit squares, with a and b integers, crossed by H_n.
%F a(n) = 2n - A000005(n).
%F a(n) = n + A049820(n).
%F a(n) = A005843(n) - A000005(n). - _Felix Fröhlich_, Jun 11 2017
%p A286002:=n->2*n-numtheory[tau](n): seq(A286002(n), n=1..100); # _Wesley Ivan Hurt_, Jun 19 2017
%t Table[2 n - DivisorSigma[0, n], {n, 100}]; (* _Vincenzo Librandi_, Jun 12 2017 *)
%o (PARI) a(n) = 2*n - numdiv(n)
%o (Magma) [2*n - NumberOfDivisors(n): n in [1..100]]; // _Vincenzo Librandi_, Jun 12 2017
%Y Cf. A000005, A005843, A049820.
%K nonn
%O 1,2
%A _Luc Rousseau_, Jun 11 2017