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.

A378363 Greatest number <= n that is 1 or not a perfect-power.

This page as a plain text file.
%I A378363 #21 Sep 02 2025 15:10:23
%S A378363 1,2,3,3,5,6,7,7,7,10,11,12,13,14,15,15,17,18,19,20,21,22,23,24,24,26,
%T A378363 26,28,29,30,31,31,33,34,35,35,37,38,39,40,41,42,43,44,45,46,47,48,48,
%U A378363 50,51,52,53,54,55,56,57,58,59,60,61,62,63,63,65,66,67
%N A378363 Greatest number <= n that is 1 or not a perfect-power.
%C A378363 Perfect-powers (A001597) are 1 and numbers with a proper integer root, complement A007916.
%e A378363 In the non-perfect-powers ... 5, 6, 7, 10, 11 ... the greatest term <= 8 is 7, so a(8) = 7.
%t A378363 perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
%t A378363 Table[NestWhile[#-1&,n,#>1&&perpowQ[#]&],{n,100}]
%o A378363 (Python)
%o A378363 from sympy import mobius, integer_nthroot
%o A378363 def A378363(n):
%o A378363     def f(x): return int(1-sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
%o A378363     a = n-f(n)
%o A378363     m, k = a, f(a)+a
%o A378363     while m != k: m, k = k, f(k)+a
%o A378363     return m # _Chai Wah Wu_, Nov 26 2024
%Y A378363 The union is A007916, complement A001597.
%Y A378363 The version for prime numbers is A007917 or A151799, opposite A159477.
%Y A378363 The version for prime-powers is A031218, opposite A000015.
%Y A378363 The version for squarefree numbers is A067535, opposite A070321.
%Y A378363 The version for perfect-powers is A081676, opposite A377468.
%Y A378363 The version for composite numbers is A179278, opposite A113646.
%Y A378363 Terms appearing multiple times are A375704, opposite A375703.
%Y A378363 The run-lengths are A375706.
%Y A378363 Terms appearing only once are A375739, opposite A375738.
%Y A378363 The version for nonsquarefree numbers is A378033, opposite A120327.
%Y A378363 The opposite version is A378358.
%Y A378363 Subtracting n gives A378364, opposite A378357.
%Y A378363 The version for non-prime-powers is A378367 (subtracted A378371), opposite A378372.
%Y A378363 A000040 lists the primes, differences A001223.
%Y A378363 A000961 lists the powers of primes, differences A057820.
%Y A378363 A001597 lists the perfect-powers, differences A053289.
%Y A378363 A007916 lists the non-perfect-powers, differences A375706.
%Y A378363 A069623 counts perfect-powers <= n.
%Y A378363 A076411 counts perfect-powers < n.
%Y A378363 A131605 lists perfect-powers that are not prime-powers.
%Y A378363 A377432 counts perfect-powers between primes, zeros A377436.
%Y A378363 Cf. A007918, A014210, A014234, A045542, A052410, A065514, A076412, A162966, A188951, A345531.
%K A378363 nonn,changed
%O A378363 1,2
%A A378363 _Gus Wiseman_, Nov 24 2024