cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Feb 20 2016

Keywords

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.

Crossrefs

Cf. A110240, A269160, A269163, A269164 (indices of zeros), A269165, A269166.

Programs

  • 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 *)
  • 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.

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).