A087088 Positive ruler-type fractal sequence with 1's in every third position.
1, 2, 3, 1, 4, 2, 1, 5, 3, 1, 2, 6, 1, 4, 2, 1, 3, 7, 1, 2, 5, 1, 3, 2, 1, 4, 8, 1, 2, 3, 1, 6, 2, 1, 4, 3, 1, 2, 5, 1, 9, 2, 1, 3, 4, 1, 2, 7, 1, 3, 2, 1, 5, 4, 1, 2, 3, 1, 6, 2, 1, 10, 3, 1, 2, 4, 1, 5, 2, 1, 3, 8, 1, 2, 4, 1, 3, 2, 1, 6, 5, 1, 2, 3, 1, 4, 2, 1, 7, 3, 1, 2, 11, 1, 4, 2, 1, 3, 5, 1, 2, 6, 1, 3, 2
Offset: 1
Examples
From _Peter Munn_, Jul 03 2020: (Start) Listing the terms in a snake format (with period 27) illustrates periodic and mirror symmetries. Horizontal lines mark points of mirror symmetry for 3's. Vertical lines mark further points of mirror symmetry for 2's. 79 terms are shown. (Referred to the extrapolated common origin of periodic mirror symmetry, the initial term is at offset 1.5 and the last shown is at offset 79.5 = 3^4 - 1.5.) Observe also mirror symmetry of 4's (seen vertically). 1 2 3 1 4 2 1 5 3 1 2 6 | | 1 -- 1 2 3 1 5 2 1 7 3 1 2 4 _ 4 8 1 2 3 1 6 2 1 4 3 1 2 5 | | 1 -- 1 2 3 1 7 2 1 4 3 1 2 9 _ 5 4 1 2 3 1 6 2 1 10 3 1 2 4 | | 1 -- 1 2 3 1 4 2 1 8 3 1 2 5 (End) From _Peter Munn_, Aug 22 2020: (Start) The start of the sequence is shown below in conjunction with related sequences, aligning their points of mirror symmetry. The longer, and shorter, vertical lines indicate points of mirror symmetry for terms valued less than 4, and less than 3, respectively. Note each term of A051064 is the minimum of two terms displayed nearest below it, and each term of A254046 is the minimum of the two terms displayed diagonally above it. | | | A051064:| 1 1 2 1 1 2 1 1 3 1 1 2 1 1 2 1 1 3 1 1 2 1 1 2 1 1 4 1 1 2 | | | | | | | [a(n)]: | 1 2 3 1 4 2 1 5 3 1 2 6 1 4 2 1 3 7 1 2 5 1 3 2 1 4 8 1 2 3 | | | | | | | A254046:|1 2 1 1 3 1 1 2 1 1 2 1 1 4 1 1 2 1 1 2 1 1 3 1 1 2 1 1 2 1 1 | | | (End)
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..20000
Crossrefs
Programs
-
Mathematica
A163491[n_] := A163491[n] = If[Mod[n, 3]==1, (n+2)/3, A163491[Floor[2n/3]]]; Module[{b}, b[_] = 0; a[n_] := With[{t = A163491[n]}, b[t] = b[t] + 1]]; Array[a, 105] (* Jean-François Alcover, Jan 10 2022 *)
Formula
a(n) = 1 when n == 1 (mod 3), otherwise a(n) = a(n-ceiling(n/3)) + 1.
From Peter Munn, Aug 22 2020: (Start)
For m >= 0, a(3*m+1) = 1; a(3*m+2) = a(2*m+1) + 1; a(3*m+3) = a(2*m+2) + 1.
For n >= 1, the following identities hold.
a(n) = A335933(2*n+1).
A051064(n+1) = min(a(n), a(n+1)).
A254046(n+2) = min(a(n), a(n+2)). (End)
Extensions
More terms from Paul D. Hanna, Aug 21 2003
Offset changed by M. F. Hasler (following remarks by Peter Munn), Jul 13 2020
Thanks to Allan C. Wechsler for suggesting the new name. - N. J. A. Sloane, Jul 14 2020
Comments