login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A269162
a(0) = 0, for n > 0, a(n) = the least (necessarily also unique) k such that A269160(k) = n, or 0 if no such k exists.
8
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 6, 5, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 14, 13, 12, 11, 10, 0, 8, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 30, 29, 28, 27, 26, 0, 24, 23, 22, 21, 20, 0, 0, 25
OFFSET
0,14
COMMENTS
If n > 0 and a(n) > 0 then a(n) is the unique finite predecessor of the configuration encoded in the binary representation of n (A007088) when Wolfram's Rule 30 cellular automaton is applied.
FORMULA
Other identities. For all n >= 0:
a(A269160(n)) = n. [This sequence works as a left inverse of A269160.]
a(A110240(n+1)) = A110240(n).
MATHEMATICA
(* empirical *) a[n_] := Module[{k}, For[k = Floor[n/7], k <= Ceiling[n/3], k++, If[BitXor[k, BitOr[2k, 4k]] == n, Return[k]]]; 0]; Table[a[n], {n, 0, 16387}] (* Jean-François Alcover, Feb 23 2016 *)
PROG
(Scheme)
(define (A269162 n) (let loop ((p 0)) (cond ((= n (A269160 p)) p) ((> p n) 0) (else (loop (+ 1 p)))))) ;; Very slow implementation.
(define (A269162 n) (if (zero? n) n (let ((nwid-2 (- (A000523 n) 2))) (let loop ((p (if (< n 4) 0 (A000079 nwid-2)))) (let ((k (A269160 p))) (cond ((= n k) p) ((> (A000523 p) nwid-2) 0) (else (loop (+ 1 p))))))))) ;; Somewhat optimized.
CROSSREFS
Cf. A110240, A269160, A269163, A269164 (indices of zeros), A269165, A269166.
Sequence in context: A266230 A134884 A229850 * A033909 A292240 A369932
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 20 2016
STATUS
approved