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