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.

Showing 1-3 of 3 results.

A087088 Positive ruler-type fractal sequence with 1's in every third position.

Original entry on oeis.org

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

Views

Author

Enrico T. Federighi (rico125162(AT)aol.com), Aug 08 2003

Keywords

Comments

If all the terms in the sequence are reduced by one and then all zeros are removed, the result is the same as the original sequence.
From Benoit Cloitre, Mar 07 2009: (Start)
To construct the sequence:
Step 1: start from a sequence of 1's and leave two undefined places between every pair of 1's giving: 1,(),(),1,(),(),1,(),(),1,(),(),1,(),(),1,...
Step 2: replace the first undefined place with a 2 and henceforth leave two undefined places between two 2's giving: 1,2,(),1,(),2,1,(),(),1,2,(),1,(),2,1,...
Step 3: replace the first undefined place with a 3 and henceforth leave two undefined places between two 3's giving: 1,2,3,1,(),2,1,(),3,1,2,(),1,(),2,1,...
Step 4: replace the first undefined place with a 4 and leave 2 undefined places between two 4's giving: 1,2,3,1,4,2,1,(),3,1,2,(),1,4,2,1,... Iterating the process indefinitely yields the sequence: 1,2,3,1,4,2,1,5,3,1,2,6,1,4,2,1,... (End)
From Peter Munn, Jul 10 2020: (Start)
For k >= 1, the number k occurs in a pattern with fundamental period 3^k, and with points of mirror symmetry at intervals of (3^k)/2. Those points have an extrapolated common origin (for k >= 1) at an offset 1.5 to the left of the sequence's initial "1". The snake format illustration in the example section may be useful for visualizing this.
(End)
For k >= 1, k first occurs at position A061419(k) and its k-th occurrence is at position A083045(k-1). - Peter Munn, Aug 23 2020
(a(n)) is the unique fixed point of the two-block substitution a,b -> 1,a+1,b+1, where a,b are natural numbers. - Michel Dekking, Sep 26 2022

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)
		

Crossrefs

Sequences with equivalent symmetries: A051064, A254046.
Records are given by A061419: a(A061419(n))=n.
Essentially the odd bisection of A335933.
Sequence with similar definition: A087165.
Ordinal transform of A163491, with which this sequence has a joint relationship to A083044, A083045.
See also the comment in A024629.

Programs

Formula

a(n) = 1 when n == 1 (mod 3), otherwise a(n) = a(n-ceiling(n/3)) + 1.
a(n) = 3 + A244040(3*(n-1)) - A244040(3*n). - Tom Edgar and James Van Alstine, Aug 04 2014
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).
A083044(A163491(n) - 1, a(n) - 1) = n.
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

A087192 a(n) = ceiling(a(n-1)*4/3), with a(1) = 1.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 11, 15, 20, 27, 36, 48, 64, 86, 115, 154, 206, 275, 367, 490, 654, 872, 1163, 1551, 2068, 2758, 3678, 4904, 6539, 8719, 11626, 15502, 20670, 27560, 36747, 48996, 65328, 87104, 116139, 154852, 206470, 275294, 367059, 489412, 652550
Offset: 1

Views

Author

Paul D. Hanna, Aug 24 2003

Keywords

Comments

If you repeatedly base 64 encode a string, starting with a single character, the length of the string at step n is 4*a(n). - Christian Perfect, Jan 06 2016

Crossrefs

Programs

  • Magma
    [n eq 1 select 1 else Ceiling(Self(n-1)*4/3): n in [1..50]]; // Vincenzo Librandi, Aug 17 2017
    
  • Maple
    A[1]:= 1:
    for n from 2 to 100 do A[n]:= ceil(4/3*A[n-1]) od:
    seq(A[i],i=1..100); # Robert Israel, Aug 17 2017
  • Mathematica
    a[1] = 1; a[n_] := a[n] = Ceiling[4 a[n - 1]/3]; Table[a@ n, {n, 45}] (* Michael De Vlieger, Jan 06 2016 *)
  • PARI
    a(n) = if (n==1, 1, ceil(a(n-1)*4/3)) \\ Michel Marcus, Aug 01 2013
    
  • Python
    from fractions import Fraction
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A087192(n): return int(Fraction(4*A087192(n-1),3)._ceil_()) if n>1 else 1 # Chai Wah Wu, Sep 07 2023

Formula

Partial sums of A072493. Also indices of records in A087165: A087165(a(n))=n.

A357081 Leader at step n of the THROWBACK procedure (see definition in comments).

Original entry on oeis.org

3, 4, 5, 6, 3, 7, 4, 8, 3, 5, 9, 4, 3, 6, 10, 5, 3, 4, 7, 11, 3, 6, 4, 5, 3, 8, 12, 4, 3, 7, 5, 6, 3, 4, 9, 13, 3, 5, 4, 8, 3, 6, 7, 4, 3, 5, 10, 14, 3, 4, 6, 5, 3, 9, 4, 7, 3, 8, 5, 4, 3, 6, 11, 15, 3, 4, 5, 7, 3, 6, 4, 10, 3, 5, 8, 4, 3, 9, 6, 5, 3, 4, 7, 12, 3, 16, 4, 5, 3, 6, 8, 4, 3, 7, 5, 11, 3, 4, 6, 9
Offset: 0

Views

Author

Anthony M. Kozar Jr., Sep 08 2022

Keywords

Comments

The THROWBACK procedure: Start with the infinite sequence of natural numbers beginning with 3, that is 3, 4, 5, 6, 7, 8, ... The first number in the sequence at any step of the procedure is called the "leader". At each step, the leader is moved back in the sequence the number of places equal to its value.
It is conjectured that every number (n >= 3) appears an infinite number of times in this sequence.
The indices of records, ignoring the initial 3, appear to match A155167.
Every fourth term is 3. Values k > 3 occur at nonconstant intervals and the sequence of intervals for each k appears to be cyclic with a period of 3^(k-3). Ignoring the last value, the first 3^(k-3)-1 values of any of these cycles of intervals appear to be a palindrome. E.g., a(n)=5 for n=2,9,15,23,30,37,45,51,58,66,... The intervals between the 5's appear to repeat the pattern 7,6,8,7,7,8,6,7,8 and 7,6,8,7,7,8,6,7 is a palindrome.
Appears to be A087165 with every term incremented by 2. If so, then the recurrence a(n)=3 when n == 0 (mod 4), otherwise a(n) = a(n - ceiling(n/4)) + 1 holds. Also appears to be A087165 with every 1 and every 2 removed. See the comment by Benoit Cloitre on A087165 for another possible way to construct this sequence.
If every 3 is removed then the result appears to be the original sequence with every term incremented by 1.
If the THROWBACK procedure is performed on all natural numbers including 1 and 2, then the sequence of leaders appears to be A001511. Other initial values appear to produce similar patterns to this sequence.

Examples

			Before the first step, 3 is the leader, so a(0) = 3. In the first step, 3 is moved back 3 places giving the new sequence 4, 5, 6, 3, 7, 8, ..., so a(1) = 4.
		

Crossrefs

Cf. A354223, A355080. (Other variants of the THROWBACK procedure).

Programs

  • Python
    from collections import deque
    from itertools import count, islice
    def tgen(): yield from count(3) # generator of sequence to throwback
    def agen(): # generator of terms
        g = tgen()
        a = deque([next(g)])
        while True:
            leader = a.popleft()
            yield leader
            while leader > len(a): a.append(next(g))
            a.insert(leader, leader)
    print(list(islice(agen(), 100))) # Michael S. Branicky, Sep 11 2022

Formula

a(n) = A087165(n+1) + 2 (conjectured).
Showing 1-3 of 3 results.