login
One-based row index of n in array A256995.
7

%I #12 Apr 19 2015 00:53:45

%S 0,1,1,1,2,3,1,2,4,3,1,5,6,7,2,4,8,3,1,9,10,5,6,11,7,2,12,13,14,15,4,

%T 8,16,3,1,17,18,9,10,19,5,6,20,21,22,11,7,23,2,12,24,25,13,14,26,15,4,

%U 27,28,29,30,31,8,16,32,3,1,33,34,17,18,35,9,10,36,37,38,19,5,39,6,20,40,41,21,22,42,11,7

%N One-based row index of n in array A256995.

%C Also one-based column index for array A256997.

%C a(1) = 0 by convention, as 1 is outside of the actual arrays A256995 & A256997.

%H Antti Karttunen, <a href="/A256990/b256990.txt">Table of n, a(n) for n = 1..8192</a>

%F a(1) = 0; for n > 1, if A213714(n) = 0 [i.e., if n is one of the terms of A055938], then a(n) = A234017(n), otherwise a(n) = a(A213714(n)).

%F In other words, a(1) = 0, and for n > 1, if n = A055938(k) for some k, then a(n) = k, otherwise it must be that n = A005187(h) for some h, in which case a(n) = a(h).

%o (Scheme, with memoization-macro definec)

%o (definec (A256990 n) (cond ((= 1 n) 0) ((zero? (A213714 n)) (A234017 n)) (else (A256990 (A213714 n)))))

%Y Cf. A005187, A055938, A213714, A234017, A256995, A256997.

%Y Cf. A256989 (corresponding column index), A255560.

%K nonn

%O 1,5

%A _Antti Karttunen_, Apr 14 2015