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!)
A272464 Fractal sequence related to Stern's diatomic sequence (A002487). 3
1, 1, 2, 1, 3, 2, 1, 4, 3, 5, 2, 1, 4, 7, 3, 8, 5, 2, 1, 4, 11, 7, 10, 3, 8, 13, 5, 2, 1, 4, 15, 11, 18, 7, 17, 10, 3, 8, 21, 13, 5, 2, 1, 4, 19, 15, 26, 11, 29, 18, 25, 7, 24, 17, 27, 10, 3, 8, 21, 34, 13, 5, 2, 1, 4, 23, 19, 15, 41, 26, 37, 11, 40, 29, 47 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
To extend the sequence after a(n): suppose the most recent previous occurrence of a(n) was at a(k) (take the largest such k), if a(k)+a(k+1) does not occur earlier in the sequence, then we extend the sequence with two new terms, setting a(n+1)=a(k)+a(k+1) and a(n+2)=a(k+1); otherwise we get one new term by setting a(n+1)=a(k+1).
As a result of this construction, the last term added (except for the initial term) is always a term that has appeared before, and so k always exists.
The "fractal" property is that if the first occurrence of each term that appears in this sequence is removed, the sequence remains unchanged.
From Max Barrentine, Jul 29 2016: (Start)
For the above definition for n and k, does n/k converge to 3/2?
A different way to view this sequence is as Stern's Diatomic sequence (A002487) with repeating odd-indexed terms removed. For instance, A002487(6)=2, A002487(7)=3, and A002487(8)=1 but since 3 has already occurred in the present sequence at a(5), a(6)=2, and a(7)=1. This removes from the present sequence all terms that occur in A002487 between A002487(p)=2 and A002487(q)=1 for the largest p<q, or equivalently A002487(3*2^k) and A002487(2^k+1). (End)
LINKS
FORMULA
For a(n)=a(k) for largest k<n, m<n:
If a(k)+a(k+1)≠a(m), then a(n+1)=a(k)+a(k+1), a(n+2)=a(k+1);
If a(k)+a(k+1)=a(m), then a(n+1)=a(k+1).
a(1)=a(2)=1.
EXAMPLE
a(2)=1; the previous occurrence of a(n)=1 is a(1). Therefore a(3)=a(1)+a(2)=2, because 2 did not occur earlier in the sequence, and a(4)=a(2)=1.
The terms may be displayed as a triangle, starting a new row when a 1 appears:
1;
1, 2;
1, 3, 2;
1, 4, 3, 5, 2;
1, 4, 7, 3, 8, 5, 2...
PROG
(PARI) findprec(v) = {lastn = #v; forstep(k=lastn-1, 1, -1, if (v[k] == v[lastn], return (k)); ); }
lista(nn) = {v = [1, 1]; for (n= 1, nn, k = findprec(v); if (! vecsearch(vecsort(v, , 8), v[k]+v[k+1]), v = concat(v, v[k]+v[k+1]); v = concat(v, v[k+1]), v = concat(v, v[k+1])); ); print(v); } \\ Michel Marcus, May 02 2016
CROSSREFS
Cf. A002487.
Van Eck's sequence A181391 has a somewhat similar flavor. - N. J. A. Sloane, May 03 2016
Sequence in context: A118851 A364603 A112383 * A133404 A134627 A064881
KEYWORD
nonn,tabf
AUTHOR
Max Barrentine, Apr 30 2016
EXTENSIONS
Definition revised by N. J. A. Sloane, May 03 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 19 17:39 EDT 2024. Contains 371797 sequences. (Running on oeis4.)