A260439 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.
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, 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, 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
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..10003
Crossrefs
Programs
-
Scheme
(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.
Comments