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 A259362 #54 Jul 07 2025 15:40:35 %S A259362 1,0,0,1,0,0,0,1,1,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,1,0,0, %T A259362 0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0, %U A259362 0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0 %N A259362 a(1) = 1, for n > 1: a(n) is the number of ways to write n as a nontrivial perfect power. %C A259362 a(n) = number of integer pairs (i,j) for distinct values of i where i > 0, j > 1 and n = i^j. Since 1 = 1^r for all real values of r, the requirement for a distinct i causes a(1) = 1 instead of a(1) = infinity. %C A259362 Alternatively, the sequence can be defined as: a(1) = 1, for n > 1: a(n) = number of pairs (i,j) such that i > 0, j > 1 and n = i^j. %C A259362 A007916 = n, where a(n) = 0. %C A259362 A001597 = n, where a(n) > 0. %C A259362 A175082 = n, where n = 1 or a(n) = 0. %C A259362 A117453 = n, where n = 1 or a(n) > 1. %C A259362 A175065 = n, where n > 1 and a(n) > 0 and this is the first occurrence in this sequence of a(n). %C A259362 A072103 = n repeated a(n) times where n > 1. %C A259362 A075802 = min(1, a(n)). %C A259362 A175066 = a(n), where n = 1 or a(n) > 1. This sequence is an expansion of A175066. %C A259362 A253642 = 0 followed by a(n), where n > 1 and a(n) > 0. %C A259362 A175064 = a(1) followed by a(n) + 1, where n > 1 and a(n) > 0. %C A259362 Where n > 1, A001597(x) = n (which implies a(n) > 0), i = A025478(x) and j = A253641(n), then a(n) = A000005(j) - 1, which is the number of factors of j greater than 1. The integer pair (i,j) comprises the smallest value i and the largest value j where i > 0, j > 1 and n = i^j. The a(n) pairs of (a,b) where a > 0, b > 1 and n = a^b are formed with b = each of the a(n) factors of j greater than 1. Examples for n = {8,4096}: %C A259362 a(8) = 1, A001597(3) = 8, A025478(3) = 2, A253641(8) = 3, 8 = 2^3 and A000005(3) - 1 = 1 because there is one factor of 3 greater than 1 [3]. The set of pairs (a,b) is {(2,3)}. %C A259362 a(4096) = 5, A001597(82) = 4096, A025478(82) = 2, A253641(4096) = 12, 4096 = 2^12 and A000005(12) - 1 = 5 because there are five factors of 12 greater than 1 [2,3,4,6,12]. The set of pairs (a,b) is {(64,2),(16,3),(8,4),(4,6),(2,12)}. %C A259362 A023055 = the ordered list of x+1 with duplicates removed, where x is the number of consecutive zeros appearing in this sequence between any two nonzero terms. %C A259362 A070428(x) = number of terms a(n) > 0 where n <= 10^x. %C A259362 a(n) <= A188585(n). %H A259362 Doug Bell, <a href="/A259362/b259362.txt">Table of n, a(n) for n = 1..5000</a> %F A259362 a(1) = 1, for n > 1: a(n) = A000005(A253641(n)) - 1. %F A259362 If n not in A001597, then a(n) = 0, otherwise a(n) = A175064(x) - 1 where A001597(x) = n. %F A259362 From _Friedjof Tellkamp_, Jun 14 2025: (Start) %F A259362 a(n) = A089723(n) - 1, for n > 1. %F A259362 a(n) = A010052(n) + A010057(n) + A374016(n) + (...), for n > 1. %F A259362 Sum_{k>=2..n} a(k) = A089361(n), for n > 1. %F A259362 G.f.: x + Sum_{j>=2, k>=2} x^(j^k). %F A259362 Dirichlet g.f.: 1 + Sum_{k>=2} zeta(k*s)-1. (End) %e A259362 a(6) = 0 because there is no way to write 6 as a nontrivial perfect power. %e A259362 a(9) = 1 because there is one way to write 9 as a nontrivial perfect power: 3^2. %e A259362 a(16) = 2 because there are two ways to write 16 as a nontrivial perfect power: 2^4, 4^2. %e A259362 From _Friedjof Tellkamp_, Jun 14 2025: (Start) %e A259362 n: 1, 2, 3, 4, 5, 6, 7, 8, 9, ... %e A259362 Squares: 1, 0, 0, 1, 0, 0, 0, 0, 1, ... (A010052) %e A259362 Cubes: 1, 0, 0, 0, 0, 0, 0, 1, 0, ... (A010057) %e A259362 ... %e A259362 Sum: oo, 0, 0, 1, 0, 0, 0, 1, 1, ... %e A259362 a(1)=1: 1, 0, 0, 1, 0, 0, 0, 1, 1, ... (= this sequence). (End) %t A259362 a[n_] := If[n == 1, 1, Sum[Boole[IntegerQ[n^(1/k)]], {k, 2, Floor[Log[2, n]]}]]; Array[a, 100] (* _Friedjof Tellkamp_, Jun 14 2025 *) %t A259362 a[n_] := If[n == 1, 1, DivisorSigma[0, Apply[GCD, Transpose[FactorInteger[n]][[2]]]] - 1]; Array[a, 100] (* _Michael Shamos_, Jul 06 2025 *) %o A259362 (PARI) a(n) = if (n==1, 1, sum(i=2, logint(n, 2), ispower(n, i))); \\ _Michel Marcus_, Apr 11 2025 %Y A259362 Cf. A001597, A007916, A023055, A025478, A070428, A072103, A075090, A075109, A075802, A117453, A175064, A175066, A175082, A188585, A253641, A253642. %Y A259362 Cf. A010052, A010057, A374016, A089361, A089723, A382691 (alternating). %K A259362 nonn %O A259362 1,16 %A A259362 _Doug Bell_, Jun 24 2015