login
Column index to A255551: a(1) = 0; for n > 1: if n is Lucky number then a(n) = 1, otherwise for a(2k) = k, and for odd unlucky numbers, a(n) = 1 + the position at the stage where n is removed in the Lucky sieve.
9

%I #16 Aug 02 2015 17:53:45

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

%T 16,1,17,7,18,1,19,3,20,8,21,1,22,2,23,9,24,1,25,1,26,10,27,2,28,3,29,

%U 11,30,4,31,1,32,12,33,1,34,1,35,13,36,1,37,1,38,14,39,1,40,5,41,15,42,2,43,1,44,16,45,4,46,1,47,17,48,3,49,1,50,18,51,6,52,1

%N Column index to A255551: a(1) = 0; for n > 1: if n is Lucky number then a(n) = 1, otherwise for a(2k) = k, and for odd unlucky numbers, a(n) = 1 + the position at the stage where n is removed in the Lucky sieve.

%C a(1) = 0, because 1 is outside of A255551 array proper.

%H Antti Karttunen, <a href="/A260439/b260439.txt">Table of n, a(n) for n = 1..10003</a>

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

%F a(2n) = n.

%F Also, for all n >= 2:

%F A255551(A260438(n), a(n)) = n.

%F a(A219178(n)) = 2.

%o (Scheme)

%o (define (A260439 n) (cond ((= 1 n) 0) ((not (zero? (A145649 n))) 1) ((even? n) (/ n 2)) (else (let searchrow ((row 2)) (let searchcol ((col 1)) (cond ((>= (A255543bi row col) n) (if (= (A255543bi row col) n) (+ 1 col) (searchrow (+ 1 row)))) (else (searchcol (+ 1 col))))))))) ;; Code for A255543bi given in A255543.

%Y Cf. A000959, A050505, A145649, A255543, A255551.

%Y Cf. also A260438 (corresponding row index).

%Y Cf. A078898, A246277, A260429, A260437, A260739 for column indices to other arrays similar to A255551.

%K nonn

%O 1,4

%A _Antti Karttunen_, Jul 29 2015