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.

A335567 Number of distinct positive integer pairs (s,t) such that s <= t < n where neither s nor t divides n.

This page as a plain text file.
%I A335567 #48 Feb 03 2025 02:12:13
%S A335567 0,0,1,1,6,3,15,10,21,21,45,21,66,55,66,66,120,78,153,105,153,171,231,
%T A335567 136,253,253,276,253,378,253,435,351,435,465,496,378,630,595,630,528,
%U A335567 780,595,861,741,780,903,1035,741,1081,990,1128,1081,1326,1081,1326,1176,1431
%N A335567 Number of distinct positive integer pairs (s,t) such that s <= t < n where neither s nor t divides n.
%H A335567 Amiram Eldar, <a href="/A335567/b335567.txt">Table of n, a(n) for n = 1..10000</a>
%F A335567 a(n) = Sum_{k=1..n} Sum_{i=1..k} (ceiling(n/k) - floor(n/k)) * (ceiling(n/i) - floor(n/i)).
%F A335567 a(n) = (n-A000005(n))*(n-A000005(n)+1)/2. - _Chai Wah Wu_, Nov 19 2021
%F A335567 a(n) = A000217(A049820(n)). - _Alois P. Heinz_, Nov 19 2021
%F A335567 a(p) = (p-1)*(p-2)/2 for primes p. - _Wesley Ivan Hurt_, Nov 28 2021
%e A335567 a(7) = 15; There are 5 positive integers less than 7 that do not divide 7, {2,3,4,5,6}. From this list, there are 15 ordered pairs, (s,t), such that s <= t < 7. They are (2,2), (2,3), (2,4), (2,5), (2,6), (3,3), (3,4), (3,5), (3,6), (4,4), (4,5), (4,6), (5,5), (5,6) and (6,6). So a(7) = 15.
%p A335567 a:= n-> (t-> t*(t+1)/2)(n-numtheory[tau](n)):
%p A335567 seq(a(n), n=1..60);  # _Alois P. Heinz_, Nov 19 2021
%t A335567 Table[Sum[Sum[(Ceiling[n/k] - Floor[n/k]) (Ceiling[n/i] - Floor[n/i]), {i, k}], {k, n}], {n, 100}]
%t A335567 a[n_] := Module[{m = n - DivisorSigma[0, n]}, m*(m+1)/2]; Array[a, 100] (* _Amiram Eldar_, Feb 03 2025 *)
%o A335567 (Python)
%o A335567 from sympy import divisor_count
%o A335567 def A335567(n):
%o A335567     m = divisor_count(n)
%o A335567     return (n-m)*(n-m+1)//2 # _Chai Wah Wu_, Nov 19 2021
%o A335567 (PARI) a(n) = {my(m = n - numdiv(n)); m*(m+1)/2;} \\ _Amiram Eldar_, Feb 03 2025
%Y A335567 Cf. A000005, A000217, A049820, A337273, A337588, A337679, A337680, A337681, A337682, A337683, A337684.
%K A335567 nonn,easy
%O A335567 1,5
%A A335567 _Wesley Ivan Hurt_, Sep 14 2020