login
a(1) = 0, a(2) = 1, after which, a(n) = a(n/2) if n is of the form 4k+2, and otherwise a(n) = 1+a(A252463(n)).
27

%I #30 Apr 07 2019 00:03:04

%S 0,1,2,2,3,2,4,3,3,3,5,3,6,4,3,4,7,3,8,4,4,5,9,4,4,6,4,5,10,3,11,5,5,

%T 7,4,4,12,8,6,5,13,4,14,6,4,9,15,5,5,4,7,7,16,4,5,6,8,10,17,4,18,11,5,

%U 6,6,5,19,8,9,4,20,5,21,12,4,9,5,6,22,6,5,13,23,5,7,14,10,7,24,4,6,10,11,15,8,6,25

%N a(1) = 0, a(2) = 1, after which, a(n) = a(n/2) if n is of the form 4k+2, and otherwise a(n) = 1+a(A252463(n)).

%C From _Gus Wiseman_, Apr 06 2019: (Start)

%C Also the number of squares in the Young diagram of the integer partition with Heinz number n that are graph-distance 1 from the lower-right boundary, where the Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). For example, the partition (6,5,5,3) with Heinz number 7865 has diagram

%C o o o o o o

%C o o o o o

%C o o o o o

%C o o o

%C with inner rim

%C o

%C o

%C o o

%C o o o

%C of size 7, so a(7867) = 7.

%C (End)

%H Antti Karttunen, <a href="/A297113/b297113.txt">Table of n, a(n) for n = 1..12721</a>

%H <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>

%F a(1) = 0, a(2) = 1, after which, a(n) = a(n/2) if n is of the form 4k+2, and otherwise a(n) = 1+a(A252463(n)) .

%F For n > 1, a(n) = A001511(A297112(n)), where A297112(n) = Sum_{d|n} moebius(n/d)*A156552(d).

%F a(n) = A252464(n) - A297155(n).

%F For n > 1, a(n) = 1+A033265(A156552(n)) = 1+A297167(n) = A046660(n) + A061395(n). - Last two sums added by _Antti Karttunen_, Sep 02 2018

%F Other identities. For all n >= 1:

%F a(A000040(n)) = n. [Each n occurs for the first time at the n-th prime.]

%t Table[If[n==1,0,PrimePi[FactorInteger[n][[-1,1]]]+PrimeOmega[n]-PrimeNu[n]],{n,100}] (* _Gus Wiseman_, Apr 06 2019 *)

%o (PARI)

%o A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};

%o A297113(n) = if(n<=2,n-1,if(n%2,1+A297113(A064989(n)), !(n%4)+A297113(n/2)));

%o \\ More complex way, after Moebius transform:

%o A156552(n) = if(1==n, 0, if(!(n%2), 1+(2*A156552(n/2)), 2*A156552(A064989(n))));

%o A297112(n) = sumdiv(n,d,moebius(n/d)*A156552(d));

%o A297113(n) = if(1==n,0,1+valuation(A297112(n),2));

%o (Scheme, with memoization-macro definec)

%o (definec (A297113 n) (cond ((<= n 2) (- n 1)) ((= 2 (modulo n 4)) (A297113 (/ n 2))) (else (+ 1 (A297113 (A252463 n))))))

%Y One more than A297167 (after the initial term).

%Y Cf. A001511, A008683, A033265, A064989, A156552, A252463, A252464, A297112, A297155.

%Y Cf. also A297157, A297161, A297162.

%Y Cf. A052126, A065770, A112798, A115994, A174090, A325166, A325167, A325169.

%K nonn

%O 1,3

%A _Antti Karttunen_, Dec 26 2017