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 A256750 #20 Jan 05 2023 16:13:05 %S A256750 0,1,2,2,0,2,3,2,0,4,3,2,0,2,5,-1,0,2,5,2,0,4,3,2,0,4,-2,0,0,2,3,2,0, %T A256750 6,3,-1,0,2,5,-1,0,2,3,2,0,-2,5,2,0,6,-3,-1,0,2,0,-1,0,4,3,2,0,2,7,-2, %U A256750 0,6,3,2,0,-3,3,2,0,2,-2,-2,0,6,3,2,0,0,3,2,0,4,-3,-1,0,2,-2,-1,0,4,7,-1,0,2,7,-3 %N A256750 Start with n, and repeatedly apply the arithmetic derivative A003415. |a(n)| = the number of iterations to reach 0 (then a(n) is taken nonnegative) or a number having a factor of the form p^p with prime p, in which case a(n) = -|a(n)|. %C A256750 Under iterations of the arithmetic derivative, the orbit of some numbers ends in zero, and the orbit of all others (I conjecture) reaches a number of the form m*p^p with prime p, from where on it keeps this form and grows to infinity iff m>1, or remains at this fixed point if m=1. %C A256750 This is an extension of the sequence A099307 which counts the steps to reach 0 or yields 0 if this never happens. %H A256750 Antti Karttunen, <a href="/A256750/b256750.txt">Table of n, a(n) for n = 0..65537</a> %F A256750 a(n) = 0 <=> n = 0 or n = m*p^p for some prime p and some m >= 1 (which is a fixed point iff m = 1). %F A256750 a(n) = 1 <=> n = 1. %F A256750 a(n) = 2 <=> n is prime. %F A256750 a(n) <= 0 <=> n is in A099309 U {0}. If n > 0, the iterations of A003415 applied to n end in a nonzero fixed point or grow to infinity. %F A256750 a(n) > 0 <=> n is in A099308 \ {0}. %F A256750 A099307(n) = min { 0, a(n) }. %t A256750 w = {}; nn = 2^16; k = 1; While[Set[m, #^#] <= nn &[Prime[k]], AppendTo[w, m]; k++]; a3415[n_] := a3415[n] = Which[n < 2, 0, PrimeQ[n], 1, True, n Total[#2/#1 & @@@ FactorInteger[n]]]{0, 1}~Join~Reap[Do[Which[PrimeQ[n], Sow[2], MemberQ[w, n], Sow[0], True, Sow@ If[#[[-1]] == 0, Length[#] - 1, -Length[#] + 1] &[NestWhileList[a3415, n, And[! Divisible[#, 4], FreeQ[w, #]] &, 1]]], {n, 2, nn}] ][[-1, -1]] (* _Michael De Vlieger_, Jan 04 2023 *) %o A256750 (PARI) a(n,c=0)={n&&until(!n=factorback(n~)*sum(i=1,#n,n[2,i]/n[1,i]),for(i=1,#n=factor(n)~,n[1,i]>n[2,i]||return(-c));c++);c} %Y A256750 Cf. A003415 (arithmetic derivative of n), A099307 (least k such that the k-th arithmetic derivative of n is zero), A099308 (numbers whose k-th arithmetic derivative is zero for some k, positions of terms > 0 after the initial 0), A099309 (numbers whose k-th arithmetic derivative is nonzero for all k, positions of terms <= 0 after the initial 0), A359547 (positions of negative terms), A327934 (positions of -1's). %Y A256750 Cf. also A327966, A327969 (A328324). %K A256750 sign %O A256750 0,3 %A A256750 _M. F. Hasler_, Apr 09 2015