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.
%I A131233 #22 Jun 21 2025 11:50:03 %S A131233 1,2,3,4,5,5,7,8,9,9,11,10,13,13,14,16,17,15,19,18,20,21,23,20,25,25, %T A131233 27,26,29,22,31,32,32,33,34,30,37,37,38,36,41,32,43,42,42,45,47,40,49, %U A131233 45,50,50,53,45,54,52,56,57,59,44,61,61,60,64,64,52,67,66,68,58,71,60,73 %N A131233 a(n) is the number of positive integers <= n that do not have 2 or more distinct prime divisors in common with n. %C A131233 Equivalently, a(n) is the number of integers m, 1 <= m <= n such that gcd(m,n) is 1 or a prime or a prime power, i.e. gcd(m,n) = p^k for some prime p and some k >= 0. Cf. A117494. - _Geoffrey Critzer_, Feb 22 2015 %H A131233 Alois P. Heinz, <a href="/A131233/b131233.txt">Table of n, a(n) for n = 1..10000</a> %F A131233 Dirichlet g.f.: A(s)*zeta(s-1)/zeta(s) where A(s) = Sum_{n>=1} A010055(n)/n^s - _Geoffrey Critzer_, Feb 22 2015 %F A131233 From _Amiram Eldar_, Jun 21 2025: (Start) %F A131233 a(n) = A116512(n) + A000010(n). %F A131233 Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = (1 + Sum_{p prime} (1/(p^2-1))) / zeta(2) = (1 + A154945)/A013661 = 0.94331640941093700227... . (End) %e A131233 The distinct primes which divide 20 are 2 and 5. So a(20) is the number of positive integers <= 20 which are not divisible by at least 2 distinct primes dividing 20; i.e. are not divisible by both 2 and 5. Among the first 20 positive integers only 10 and 20 are divisible by both 2 and 5. There are 18 other positive integers <= 20, so a(20)=18. %p A131233 with(numtheory): %p A131233 a:= n-> add(`if`(nops(factorset(igcd(n,k)))<2, 1, 0), k=1..n): %p A131233 seq(a(n), n=1..100); # _Alois P. Heinz_, Feb 22 2015 %t A131233 nn = 73; f[list_, i_] := list[[i]]; a =Table[If[Length[FactorInteger[n]] == 1, 1, 0], {n, 1, nn}]; b =Table[EulerPhi[n], {n, 1, nn}]; Table[ %t A131233 DirichletConvolve[f[a, n], f[b, n], n, m], {m, 1, nn}] (* _Geoffrey Critzer_, Feb 22 2015 *) %t A131233 a[n_] := Module[{p = FactorInteger[n][[;; , 1]]}, n * Times @@ (1-1/p) * (1 + Total[1/(p-1)])]; a[1] = 1; Array[a, 100] (* _Amiram Eldar_, Jun 21 2025 *) %o A131233 (PARI) a(n) = {my(p = factor(n)[,1]); n * vecprod(apply(x -> 1-1/x, p)) * (1 + vecsum(apply(x -> 1/(x-1), p)));} \\ _Amiram Eldar_, Jun 21 2025 %Y A131233 Cf. A000010, A010055, A013661, A131232, A116512, A117494, A154945. %K A131233 nonn %O A131233 1,2 %A A131233 _Leroy Quet_, Jun 20 2007 %E A131233 More terms from _Joshua Zucker_, Jul 18 2007