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.

A382770 Number of powerful k < n such that k and n are coprime.

This page as a plain text file.
%I A382770 #7 Apr 12 2025 12:46:18
%S A382770 0,1,1,1,2,1,2,1,3,2,4,1,4,2,3,2,5,1,5,2,4,2,5,1,5,3,5,4,7,1,7,4,6,4,
%T A382770 7,2,9,4,6,3,9,2,9,4,5,4,9,2,9,4,7,5,10,3,9,4,7,5,10,2,10,5,6,5,10,3,
%U A382770 11,5,8,3,11,3,12,5,7,5,11,3,12,4,8,6,13,2
%N A382770 Number of powerful k < n such that k and n are coprime.
%C A382770 First differs from A304574 at n = 73: a(73) = 12, A304574(n) = 11, because 72 = 2^3 * 3^2 is powerful but not a perfect power (i.e., an Achilles number in A052486).
%H A382770 Michael De Vlieger, <a href="/A382770/b382770.txt">Table of n, a(n) for n = 1..10000</a>
%H A382770 Michael De Vlieger, <a href="/A382770/a382770.png">Log log scatterplot of a(n)</a>, n = 1..2^16, where red represents prime n, gold represents proper prime power n, green represents squarefree composite n, and blue and purple represent n that is neither squarefree nor a prime power, where purple represents a powerful n that is not a prime power. Large green dots represent composite primorials n.
%F A382770 a(n) > 0 for n > 1, since 1 is powerful, smaller than n > 1, and coprime to n >= 1.
%e A382770 Let s = A001694, the sequence of powerful numbers.
%e A382770 a(1) = 0 since the smallest powerful number is 1 itself.
%e A382770 a(2) = 1 since s(1) = 1 is smaller than and coprime to 2.
%e A382770 a(3) = 1 since s(1) = 1 is smaller than and coprime to 3.
%e A382770 a(4) = 1 since s(1..2) = {1, 4}; 1 is smaller than and coprime to 4, but 4 = 4.
%e A382770 a(5) = 2 since s(1..2) = {1, 4}, both smaller than and coprime to 5.
%e A382770 a(6) = 1 since s(1..2) = {1, 4}; 1 is smaller than and coprime to 6, but gcd(4,6) > 1.
%e A382770 a(8) = 1 since s(1..3) = {1, 4, 8}; 1 and 4 are both smaller than and coprime to 8, but 8 = 8.
%e A382770 a(9) = 3 since s(1..3) = {1, 4, 8} are all smaller than and coprime to 9.
%e A382770 a(73) = 12 since s(1..12) = {1, 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 72}, all coprime to prime 73. All except 72 are perfect powers, thus A304574(73) = 11, etc.
%t A382770 nn = 120; q = 1; rad[x_] := Times @@ FactorInteger[x][[All, 1]]; {0}~Join~Rest@ Table[Set[{c, i}, {0, 1}]; If[Divisible[n, rad[n]^2], t[q] = n; q++]; While[i < q, If[CoprimeQ[t[i], n], c++]; i++]; c, {n, nn}]
%o A382770 (PARI) a(n) = #select(x->(ispowerful(x) && gcd(x,n)==1), [1..n-1]); \\ _Michel Marcus_, Apr 11 2025
%Y A382770 Cf. A001694, A304574.
%K A382770 nonn,easy
%O A382770 1,5
%A A382770 _Michael De Vlieger_, Apr 05 2025