login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A269165 If A269162(n) = 0, then a(n) = n, otherwise a(n) = a(A269162(n)). 4
0, 1, 2, 3, 4, 5, 6, 1, 8, 9, 10, 11, 12, 3, 2, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 1, 6, 5, 4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 15, 2, 3, 12, 11, 10, 55, 8, 57, 58, 59, 60, 61, 62, 9, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
a(n) is the earliest finite ancestor pattern n in Rule-30 or n itself if n has no finite predecessors.
Starting from k = a(n) with any n and iterating map k -> A269160(k) exactly A269166(n) times yields n back.
Apart from zero no terms of A269163 occur so all terms after zero are in A269164. Each term of A269164 occurs an infinitely many times.
LINKS
Eric Weisstein's World of Mathematics, Rule 30
FORMULA
If A269162(n) = 0, then a(n) = n, otherwise a(n) = a(A269162(n)).
PROG
(Scheme)
;; This implementation is based on given recurrence and utilitizes the memoization-macro definec:
(definec (A269165 n) (let ((p (A269162 n))) (if (zero? p) n (A269165 p))))
;; This one computes the same with tail-recursive iteration:
(define (A269165 n) (let loop ((n n) (p (A269162 n))) (if (zero? p) n (loop p (A269162 p)))))
CROSSREFS
Cf. A269160, A269163, A269164, A269166 (for a distance in A269162-steps to the ancestor pattern).
Cf. A110240 (indices of ones in this sequence).
Cf. also A268669.
Sequence in context: A064830 A355582 A160377 * A319655 A328018 A242603
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 21 2016
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 02:41 EDT 2024. Contains 371906 sequences. (Running on oeis4.)