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.

User: Chuck Seggelin

Chuck Seggelin's wiki page.

Chuck Seggelin has authored 128 sequences. Here are the ten most recent ones:

A384991 Order of the permutation of [n] formed by a Josephus elimination variation: take p, skip 1, with p starting at 2 and advancing to the next prime after each skip.

Original entry on oeis.org

1, 1, 2, 3, 3, 5, 4, 7, 8, 15, 10, 11, 12, 13, 45, 15, 105, 17, 77, 19, 24, 21, 117, 23, 504, 255, 26, 165, 28, 440, 60, 31, 442, 33, 1386, 805, 154, 37, 105, 39, 1020, 216, 208, 43, 40, 45, 2860, 1953, 90, 49, 45, 51, 1092, 120, 184, 55, 56, 150, 58, 6045
Offset: 1

Author

Chuck Seggelin, Jun 14 2025

Keywords

Comments

The Josephus elimination begins with a circular list [n] from which successively take p elements and skip 1 where p begins at 2 and increases to the next prime (3,5,7,11,13,...) after each skip, and the permutation is the elements taken in the order they're taken.
Let p(k) be the k-th prime number, and let k increment with each move. In this variation, "take p(k), skip 1" means: move the p(k)-th element to the end of the list. After each move, counting begins from the element that replaced the moved one, and the next move targets the subsequent p(k+1)-th element. Thus, the positions of the elements being moved are p(k+1)-1 apart.
That is, the moved positions follow this progression:
Position Moved Differences Between Positions
=================== =============================
2 - 1 = 1 1 - 0 = 1 (= 2 - 1)
(1) + 3 - 1 = 3 3 - 1 = 2 (= 3 - 1)
(3) + 5 - 1 = 7 7 - 3 = 4 (= 5 - 1)
(7) + 7 - 1 = 13 13 - 7 = 6 (= 7 - 1)
(13) + 11 - 1 = 23 23 - 13 = 10 (= 11 - 1)
^^ . ^^ .
p(k) . p(k)-1 .
. .
A given element can be moved multiple times before reaching its final position.

Examples

			For n=15, the rotations to construct the permutation are
    1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
       \----------------------------------------------/  1st rotation (p=2)
    1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 2
             \----------------------------------------/  2nd rotation (p=3)
    1, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 2, 5
                          \---------------------------/  3rd rotation (p=5)
    1, 3, 4, 6, 7, 8, 9, 11, 12, 13, 14, 15, 2, 5, 10
                                                \-----/  4th rotation (p=7)
    1, 3, 4, 6, 7, 8, 9, 11, 12, 13, 14, 15, 2, 10, 5
The 4th rotate is an example of an element (5) which was previously rotated to the end, being rotated to the end again.
This final permutation has order a(15) = 45 (applying it 45 times reaches the identity permutation again).
		

Crossrefs

Cf. A000040, A051732 (Josephus elimination permutation order), A384753 (take 2 skip 1 Josephus variation), A384989 (take 3 skip 1 Josephus variation), A384990 (take k skip 1 Josephus variation).

Programs

  • Python
    from sympy.combinatorics import Permutation
    from sympy import isprime, prime
    def apply_transformation(seq):
        k = 1
        p = prime(k)
        i = p - 1
        while i < len(seq):
            seq.append(seq.pop(i))
            k += 1
            p = prime(k)
            i += (p-1)
        return seq
    def a(n):
        seq = list(range(n))
        p = apply_transformation(seq.copy())
        return Permutation(p).order()

A384990 Order of the permutation of [n] formed by a Josephus elimination variation: take k, skip 1, with k starting at 1 and increasing by 1 after each skip.

Original entry on oeis.org

1, 1, 2, 2, 4, 5, 6, 7, 15, 9, 12, 11, 12, 13, 14, 60, 16, 70, 24, 88, 20, 60, 22, 23, 24, 25, 26, 27, 420, 29, 221, 31, 3465, 33, 285, 35, 840, 37, 38, 1040, 40, 41, 2618, 43, 44, 2520, 46, 546, 48, 594, 840, 644, 52, 696, 54, 2520, 56, 57, 58, 59, 60, 61, 62
Offset: 1

Author

Chuck Seggelin, Jun 14 2025

Keywords

Comments

The Josephus elimination begins with a circular list [n] from which successively take k elements and skip 1 where k begins at 1 and monotonically increases after each skip, and the permutation is the elements taken in the order they're taken.
Take k and move 1 is a move every k-th element, but with the next k+1 elements reckoned inclusive of the element which replaced the moved 1, and hence positions k apart.
A given element can be skipped or moved multiple times before reaching its final position.
This sequence enters relatively lengthy stretches of linearity where a(n) = n-1 before entering stretches where it oscillates between n-1 and much larger values. This behavior is observed multiple times between a(1) and a(1000). It is unknown if this behavior continues to happen further into the sequence. For example: a(n)=n-1 for n=905 to 946, and the terms that follow are 9419588158802421600, 947, 224555, 949, 1582305192, 951, 226455, 953, etc.

Examples

			For n=10, the rotations to construct the permutation are
    1, 2, 3, 4, 5, 6, 7, 8, 9, 10
       \--------------------------/  1st rotation (k=1)
    1, 3, 4, 5, 6, 7, 8, 9, 10, 2
          \-----------------------/  2nd rotation (k=2)
    1, 3, 5, 6, 7, 8, 9, 10, 2, 4
                \-----------------/  3rd rotation (k=3)
    1, 3, 5, 6, 8, 9, 10, 2, 4, 7
                          \-------/  4th rotation (k=4)
    1, 3, 5, 6, 8, 9, 10, 4, 7, 2
The 4th rotate is an example of an element (2) which was previously rotated to the end, being rotated to the end again.
This final permutation has order a(10) = 9 (applying it 9 times reaches the identity permutation again).
		

Crossrefs

Cf. A051732 (Josephus elimination permutation order), A384753 (take 2 skip 1 Josephus variation), A384989 (take 3 skip 1 Josephus variation).

Programs

  • Python
    from sympy.combinatorics import Permutation
    def apply_transformation(seq):
        step = 1
        i = step
        while i < len(seq):
            seq.append(seq.pop(i))
            step += 1
            i += step - 1
        return seq
    def a(n):
        seq = list(range(n))
        p = apply_transformation(seq.copy())
        return Permutation(p).order()

A384989 Order of the permutation of [n] formed by a Josephus elimination variation: take 3, skip 1.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 4, 4, 6, 10, 6, 8, 12, 11, 9, 10, 42, 15, 16, 52, 60, 120, 18, 30, 140, 99, 95, 28, 90, 660, 30, 28, 30, 30, 546, 336, 48, 420, 24, 765, 1680, 60, 308, 400, 66, 462, 418, 4830, 252, 1430, 468, 49, 42, 180, 1020, 52, 2310, 264, 1680, 340, 380
Offset: 1

Author

Chuck Seggelin, Jun 14 2025

Keywords

Comments

The Josephus elimination begins with a circular list [n] from which successively take 3 elements and skip 1, and the permutation is the elements taken in the order they're taken.
The same effect can be had by leaving remaining elements at the end of a flat list of [n] and applying the "skip" as a move (rotate) of the element at position 3*i+4 to the end of the list, for successive i >= 0.
Take 3 and move 1 is a move every 4th element, but with the next 4 elements reckoned inclusive of the element which replaced the moved 1, and hence positions 3 apart.
A given element can be skipped or moved multiple times before reaching its final position.

Examples

			For n=11, the rotations to construct the permutation are
    1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
             \------------------------/  1st rotation
    1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 4
                      \---------------/  2nd rotation
    1, 2, 3, 5, 6, 7, 9, 10, 11, 4, 8
                                 \----/  3rd rotation
    1, 2, 3, 5, 6, 7, 9, 10, 11, 8, 4
The 3rd rotate is an example of an element (4) which was previously rotated to the end, being rotated to the end again.
This final permutation has order a(11) = 6 (applying it 6 times reaches the identity permutation again).
		

Crossrefs

Cf. A051732 (Josephus elimination permutation order), A384753 (take 2 skip 1 Josephus variation).

Programs

  • Python
    from sympy.combinatorics import Permutation
    def move_fourth(seq):
        for i in range(3,len(seq),3):
            seq.append(seq.pop(i))
        return seq
    def a(n):
        seq = list(range(n))
        p = move_fourth(seq.copy())
        return Permutation(p).order()

A384753 Order of the permutation of {1,...,n} formed by a Josephus elimination variation: take 2, skip 1.

Original entry on oeis.org

1, 1, 1, 2, 3, 3, 5, 6, 4, 7, 9, 10, 5, 9, 13, 70, 12, 15, 84, 70, 52, 42, 21, 30, 15, 16, 38, 84, 168, 24, 90, 360, 120, 27, 24, 72, 30, 108, 286, 276, 105, 4680, 198, 36, 630, 234, 120, 2856, 54, 1056, 532, 660, 51, 310, 406, 54, 420, 120, 55, 264, 150
Offset: 1

Author

Chuck Seggelin, Jun 09 2025

Keywords

Comments

The Josephus elimination begins with a circular list {1,...,n} from which successively take 2 elements and skip 1, and the permutation is the elements taken in the order they're taken.
The same effect can be had by leaving remaining elements at the end of a flat list of {1,...,n} and applying the "skip" as a move (rotate) of the element at position 2*i+3 to the end of the list, for successive i >= 0.
Take 2 and move 1 is a move every 3rd element, but with the next 3 elements reckoned inclusive of the element which replaced the moved 1, and hence positions 2 apart.
A given element can be skipped or moved multiple times before reaching its final position.
The value of a(n) can vary sharply; for example, a(62) = 280, a(63) = 15939, a(64) = 210.

Examples

			For n=10, the rotations to construct the permutation are
    1, 2, 3, 4, 5, 6, 7, 8, 9, 10
          \-----------------------/  1st rotation
    1, 2, 4, 5, 6, 7, 8, 9, 10, 3
                \-----------------/  2nd rotation
    1, 2, 4, 5, 7, 8, 9, 10, 3, 6
                      \-----------/  3rd rotation
    1, 2, 4, 5, 7, 8, 10, 3, 6, 9
                             \----/  4th rotation
    1, 2, 4, 5, 7, 8, 10, 3, 9, 6
The 4th rotate is an example of an element (6) which was previously rotated to the end, being rotated to the end again.
This final permutation has order a(10) = 7 (applying it 7 times reaches the identity permutation again).
		

Crossrefs

Cf. A051732 (Josephus elimination permutation order).

Programs

  • Python
    from sympy.combinatorics import Permutation
    def move_third(seq):
        for i in range(2,len(seq),2):
            seq.append(seq.pop(i))
        return seq
    def a(n):
        seq = list(range(n))
        p = move_third(seq.copy())
        return Permutation(p).order()

A141839 a(n) = first term that can be reduced in n steps via repeated interpretation of a(n) as a base b+1 number where b is the largest digit of a(n), such that b is always 5 so that each interpretation is base 6. Terms already fully reduced (i.e., single digits) are excluded.

Original entry on oeis.org

15, 55, 325, 32501, 410245, 145055113, 305344340421
Offset: 1

Author

Chuck Seggelin (seqfan(AT)plastereddragon.com), Jul 10 2008

Keywords

Comments

It is sometimes possible to compute additional terms by taking the last term, treating it as base 10 and converting to base 6. This may create a term minimally interpretable as base 6 which can converted back to base 10 yielding the previous term in the sequence which will itself yield N further terms. But there is no guarantee (except in base 2) that the term so derived will be the first term to produce a sequence of N+1 terms. There could be another, smaller, term which satisfies that requirement but which uses different terms. Pushing the last term of this sequence does not produce a value minimally interpretable as base 6.

Examples

			a(3) = 325 because 325 is the first number that can produce a sequence of three terms by repeated interpretation as a base 6 number: [325] (base-6) --> [125] (base-6) --> [53] (base-6) --> [33]. Since 33 cannot be interpreted as a base 6 number, the sequence terminates with 53. a(1) = 15 because 15 is the first number that can be reduced once, yielding no further terms minimally interpretable as base 6.
		

Extensions

a(7) from Giovanni Resta, Feb 23 2013

A141840 a(n) = first term that can be reduced in n steps via repeated interpretation of a(n) as a base b+1 number where b is the largest digit of a(n), such that b is always 6 so that each interpretation is base 7. Terms already fully reduced (i.e., single digits) are excluded.

Original entry on oeis.org

16, 64, 631, 1561, 4360, 15466, 63043, 34406005, 565306024, 23001126626004, 4562530234315632
Offset: 1

Author

Chuck Seggelin (seqfan(AT)plastereddragon.com), Jul 10 2008

Keywords

Comments

It is sometimes possible to compute additional terms by taking the last term, treating it as base 10 and converting to base 7. This may create a term minimally interpretable as base 7 which can converted back to base 10 yielding the previous term in the sequence which will itself yield N further terms. But there is no guarantee (except in base 2) that the term so derived will be the first term to produce a sequence of N+1 terms. There could be another, smaller, term which satisfies that requirement but which uses different terms. Pushing the last term of this sequence does not produce a value minimally interpretable as base 7.

Examples

			a(3) = 631 because 631 is the first number that can produce a sequence of three terms by repeated interpretation as a base 7 number: [631] (base-7) --> [316] (base-7) --> [160] (base-7) --> [91]. Since 91 cannot be minimally interpreted as a base 7 number, the sequence terminates with 160. a(1) = 16 because 16 is the first number that can be reduced once, yielding no further terms minimally interpretable as base 7.
		

Extensions

a(10)-a(11) from Giovanni Resta, Feb 23 2013

A141842 a(n) = first term that can be reduced in n steps via repeated interpretation of a(n) as a base b+1 number where b is the largest digit of a(n), such that b is always 8 so that each interpretation is base 9. Terms already fully reduced (i.e., single digits) are excluded.

Original entry on oeis.org

18, 86, 680, 835, 7087, 12788, 18478, 128117, 385732, 2206280, 13176873, 33185141, 68388408, 335213686, 1365888758, 4771043885, 24740884085
Offset: 1

Author

Chuck Seggelin (seqfan(AT)plastereddragon.com), Jul 10 2008

Keywords

Comments

It is sometimes possible to compute additional terms by taking the last term, treating it as base 10 and converting to base 9. This may create a term minimally interpretable as base 9 which can converted back to base 10 yielding the previous term in the sequence which will itself yield N further terms. But there is no guarantee (except in base 2) that the term so derived will be the first term to produce a sequence of N+1 terms. There could be another, smaller, term which satisfies that requirement but which uses different terms. Pushing a(15) does not produce a value minimally interpretable as base 9.

Examples

			a(3) = 680 because 680 is the first number that can produce a sequence of three terms by repeated interpretation as a base 9 number: [680] (base-9) --> [558] (base-9) --> [458] (base-9) --> [377]. Since 377 cannot be minimally interpreted as a base 9 number, the sequence terminates with 458. a(1) = 18 because 18 is the first number that can be reduced once, yielding no further terms minimally interpretable as base 9.
		

Extensions

a(16)-a(17) from Giovanni Resta, Feb 23 2013

A141841 a(n) is the first term that can be reduced in n steps via repeated interpretation of a(n) as a base b+1 number where b is the largest digit of a(n), such that b is always 7 so that each interpretation is base 8. Terms already fully reduced (i.e., single digits) are excluded.

Original entry on oeis.org

17, 57, 71, 107, 4647, 11047, 25447, 61547, 170153, 115751335, 671434647, 5001243627, 45206165753
Offset: 1

Author

Chuck Seggelin (seqfan(AT)plastereddragon.com), Jul 10 2008

Keywords

Comments

It is sometimes possible to compute additional terms by taking the last term, treating it as base 10 and converting to base 8. This may create a term minimally interpretable as base 8 which can converted back to base 10 yielding the previous term in the sequence which will itself yield N further terms. But there is no guarantee (except in base 2) that the term so derived will be the first term to produce a sequence of N+1 terms. There could be another, smaller, term which satisfies that requirement but which uses different terms. Pushing the last term of this sequence produces the value 5001243627 which is minimally interpretable as base 8.

Examples

			a(3) = 71 because 71 is the first number that can produce a sequence of three terms by repeated interpretation as a base 8 number: [71] (base-8) --> [57] (base-8) --> [47] (base-8) --> [39]. Since 39 cannot be minimally interpreted as a base 8 number, the sequence terminates with 47. a(1) = 17 because 17 is the first number that can be reduced once, yielding no further terms minimally interpretable as base 8.
		

Extensions

a(12)-a(13) from Giovanni Resta, Feb 23 2013

A141838 a(n) = first term that can be reduced in n steps via repeated interpretation of a(n) as a base b+1 number where b is the largest digit of a(n), such that b is always 4 so that each interpretation is base 5. Terms already fully reduced (i.e., single digits) are excluded.

Original entry on oeis.org

14, 24, 44, 134, 1014, 13024, 404044, 100412134, 201201142014
Offset: 1

Author

Chuck Seggelin (seqfan(AT)plastereddragon.com), Jul 10 2008

Keywords

Comments

It is possible to compute additional terms by taking the last term, treating it as base-10 and converting to base-5. This will necessarily create a term which can converted back to base 10 yielding the previous term in the sequence which will itself yield N further terms. But there is no guarantee (except in base 2) that the term so derived will be the first term to produce a sequence of N+1 terms. There could be another, smaller, term which satisfies that requirement but which uses different terms. Pushing the last term of this sequence yields 201201142014 as a possible next term.

Examples

			a(3) = 44 because 44 is the first number that can produce a sequence of three terms by repeated interpretation as a base 5 number: [44] (base-5) --> [24] (base-5) --> [14] (base-5) --> [9]. Since 9 cannot be interpreted as a base 5 number, the sequence terminates with 14. a(1) = 14 because 14 is the first number that can be reduced once, yielding no further terms interpretable as base 5.
		

Extensions

a(9) from Giovanni Resta, Feb 23 2013

A141837 a(n) = first term that can be reduced in n steps via repeated interpretation of a(n) as a base b+1 number where b is the largest digit of a(n), such that b is always 3 so that each interpretation is base 4. Terms already fully reduced (i.e., single digits) are excluded.

Original entry on oeis.org

13, 31, 133, 120332323, 13023002000203
Offset: 1

Author

Chuck Seggelin (seqfan(AT)plastereddragon.com), Jul 10 2008

Keywords

Comments

It is possible to compute additional terms by taking the last term, treating it as base-10 and converting to base-4. This will necessarily create a term which can converted back to base 10 yielding the previous term in the sequence which will itself yield N further terms. But there is no guarantee (except in base 2) that the term so derived will be the first term to produce a sequence of N+1 terms. There could be another, smaller, term which satisfies that requirement but which uses different terms. Pushing the last term of this sequence yields 13023002000203 as a possible next term.

Examples

			a(3) = 133 because 133 is the first number that can produce a sequence of three terms by repeated interpretation as a base 4 number: [133] (base-4) --> [31] (base-4) --> [13] (base-4) --> [7]. Since 7 cannot be interpreted as a base 4 number, the sequence terminates with 13. a(1) = 13 because 13 is the first number that can be reduced once, yielding no further terms interpretable as base 4.
		

Extensions

a(5) from Giovanni Resta, Feb 23 2013