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 A375708 #13 Sep 10 2024 00:25:54 %S A375708 5,4,2,2,1,3,2,1,1,2,2,2,2,3,1,1,1,2,1,1,2,2,1,1,2,2,1,1,2,1,1,1,1,2, %T A375708 2,1,2,1,2,1,1,2,2,1,1,1,1,2,2,2,1,1,1,1,2,1,1,1,1,1,1,2,1,1,2,2,1,1, %U A375708 2,2,1,1,2,1,1,1,1,1,1,2,1,1,2,3,1,2,1 %N A375708 First differences of non-prime-powers (exclusive, so 1 is not a prime-power). %C A375708 Non-prime-powers (exclusive) are listed by A361102. %C A375708 Warning: For this sequence, 1 is not a prime-power but is a non-prime-power. %e A375708 The 6th non-prime-power (exclusive) is 15, and the 7th is 18, so a(6) = 3. %t A375708 Differences[Select[Range[100],!PrimePowerQ[#]&]] %o A375708 (Python) %o A375708 from itertools import count %o A375708 from sympy import primepi, integer_nthroot, primefactors %o A375708 def A375708(n): %o A375708 def f(x): return int(n+sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length()))) %o A375708 m, k = n, f(n) %o A375708 while m != k: m, k = k, f(k) %o A375708 return next(i for i in count(m+1) if len(primefactors(i))>1)-m # _Chai Wah Wu_, Sep 09 2024 %Y A375708 For prime-powers (A000961, A246655) we have A057820, gaps A093555. %Y A375708 For perfect powers (A001597) we have A053289. %Y A375708 For nonprime numbers (A002808) we have A073783. %Y A375708 For squarefree numbers (A005117) we have A076259. %Y A375708 First differences of A361102, inclusive A024619. %Y A375708 Positions of 1's are A375713. %Y A375708 If 1 is considered a prime power we have A375735. %Y A375708 Runs of non-prime-powers: %Y A375708 - length: A110969 %Y A375708 - first: A373676 %Y A375708 - last: A373677 %Y A375708 - sum: A373678 %Y A375708 A000040 lists all of the primes, differences A001223. %Y A375708 A007916 lists non-perfect-powers, differences A375706. %Y A375708 A013929 lists the nonsquarefree numbers, differences A078147. %Y A375708 Prime-power runs: A373675, min A373673, max A373674, length A174965. %Y A375708 Prime-power antiruns: A373576, min A120430, max A006549, length A373671. %Y A375708 Non-prime-power antiruns: A373679, min A373575, max A255346, length A373672. %Y A375708 Cf. A046933, A061399, A176246, A251092, A375709. %K A375708 nonn %O A375708 1,1 %A A375708 _Gus Wiseman_, Aug 31 2024