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: Max Barrentine

Max Barrentine's wiki page.

Max Barrentine has authored 57 sequences. Here are the ten most recent ones:

A276675 A repetition-resistant sequence.

Original entry on oeis.org

0, 1, 0, 0, 2, 0, 0, 0, 1, 1, 0, 1, 2, 0, 1, 3, 0, 0, 0, 0, 2, 1, 0, 0, 0, 3, 0, 0, 1, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 1, 2, 0, 0, 0, 0, 4, 0, 0, 1, 0, 2, 1, 0, 1, 0, 0, 1, 0, 3, 1, 0, 1, 0, 1, 1, 0, 0, 0, 2, 0
Offset: 1

Author

Max Barrentine, Sep 13 2016

Keywords

Comments

a(n) is the smallest term such that the subsequence a(n-k), a(n+1-k), ... a(n) does not occur earlier in the sequence, where k is the largest term in the sequence before a(n).
Does every finite permutation of the natural numbers occur in this sequence?

Crossrefs

Cf. A079101.

A274648 A variation on Recamán's sequence (A005132): a(n) is the first positive number of the form a(n-1)-n*k, k>0 not already in the sequence; and if no such number exists, then a(n) is the first number of the form a(n-1)+n*k, k>0 not already in the sequence.

Original entry on oeis.org

0, 1, 3, 6, 2, 7, 13, 20, 12, 21, 11, 22, 10, 23, 9, 24, 8, 25, 43, 5, 45, 66, 44, 67, 19, 69, 17, 71, 15, 73, 103, 72, 40, 106, 38, 108, 36, 110, 34, 112, 32, 114, 30, 116, 28, 118, 26, 120, 168, 119, 169, 16, 68, 121, 175, 65, 177, 63, 179, 61, 181, 59, 183
Offset: 0

Author

Max Barrentine, Aug 12 2016

Keywords

Comments

Is this a permutation of the natural numbers?
The inverse is: 0, 1, 4, 2, 164, 19, 3, 5, 16, 14, 12, 10, 8, 6, 8228, 28, 51, 26, 158, 24, 7, 9, 11, 13, 15, 17, 46, 90, ..., . Robert G. Wilson v, Sep 07 2016
After 3.2*10^11 terms, the smallest number which has not appeared is 154. - Benjamin Chaffin, Oct 05 2016

Crossrefs

Cf. A273148 (inverse), A005132, A274647 (another variant).

Programs

  • Mathematica
    f[s_List] := Block[{k = 1, l = s[[-1]], n = Length@ s}, While[ MemberQ[s, l - k*n] && l > k*n, k++]; If[l > k*n, Append[s, l - k*n], k = 1; While[ MemberQ[s, l + k*n], k++]; Append[s, l + k*n]]]; Nest[f, {0}, 60] (* Robert G. Wilson v, Sep 07 2016 *)

A275992 Number of times n occurs in A022290.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 2, 2, 2, 2, 1, 3, 3, 2, 2, 3, 3, 2, 2, 3, 3, 1, 3, 3, 3, 3, 2, 4, 4, 2, 3, 3, 3, 3, 2, 4, 4, 2, 3, 3, 3, 3, 1, 4, 4, 3, 3, 5, 4, 3, 3, 5, 5, 2, 4, 4, 4, 4, 2, 5, 5, 3, 3, 4, 4, 3, 3, 5, 5, 2, 4, 4, 4, 4, 2, 5, 5, 3, 3, 4, 5, 3, 3, 4, 4, 1, 4
Offset: 0

Author

Max Barrentine, Aug 15 2016

Keywords

Comments

A000119 counts the ways n can be represented as a sum of distinct Fibonacci numbers. A022290 maps binary ordering onto these Fibonacci representations.
A274515 is an analogous sequence applied to A002487.

Crossrefs

Formula

a(n) = A000119(A022290(n)).

A274647 A variation on Recamán's sequence (A005132): to get a(n), we first try to subtract n from a(n-1): a(n) = a(n-1)-n if positive and not already in the sequence; if not then we try to add n: a(n) = a(n-1)+n if not already in the sequence; if this fails we try to subtract 2n from a(n-1), or to add 2n to a(n-1), or to subtract 3n, or to add 3n, etc., until one of these produces a positive number not already in the sequence.

Original entry on oeis.org

0, 1, 3, 6, 2, 7, 13, 20, 12, 21, 11, 22, 10, 23, 9, 24, 8, 25, 43, 62, 42, 63, 41, 18, 66, 91, 65, 38, 94, 123, 93, 124, 92, 59, 127, 162, 126, 89, 51, 90, 50, 132, 174, 131, 87, 177, 223, 176, 128, 79, 29, 80, 28, 81, 27, 82, 26, 83, 141, 200, 140, 201, 139
Offset: 0

Author

Max Barrentine, Aug 12 2016

Keywords

Comments

Is this a permutation of the natural numbers?
After 5.4*10^11 terms, the smallest number which has not appeared is 212. There are 177 numbers under 10000 which have not appeared. - Benjamin Chaffin, Sep 29 2016

Crossrefs

Left inverse: A276342 (also right inverse, if this sequence is a permutation of nonnegative integers).
Cf. A276438 (gives k that was used when computing a(n), with sign).
Cf. A274648 (another variant).

Programs

  • Mathematica
    f[s_List] := Block[{a = b = 0, k = 1, l = s[[-1]], n = Length@ s}, While[ If[l > k*n && !MemberQ[s, l - k*n], a = l - k*n]; If[ !MemberQ[s, l + k*n], b = l + k*n; Break[]]; a == b == 0, k++]; Append[s, If[a > 0, a, b]]]; Nest[f, {0}, 70]
    (* Robert G. Wilson v, Sep 09 2016 *)
  • Python
    l=[0]
    for n in range(1, 101):
        i=1
        while True:
            a=l[n - 1]
            x=a - i*n
            if x>0 and x not in l:
                l.append(x)
                break
            y=a + i*n
            if y>0 and not y in l:
                l.append(y)
                break
            else : i+=1
    print(l) # Indranil Ghosh, Jun 03 2017

Formula

A276342(a(n)) = n for all n.

A275705 A variation of the Zorach additive triangle, read by rows.

Original entry on oeis.org

1, -2, -1, -3, -5, -6, -4, -7, -12, -18, -9, -13, -20, -32, -50, 11, 2, -11, -31, -63, -113, 3, 14, 16, 5, -26, -89, -202, 6, 9, 23, 39, 44, 18, -71, -273, 4, 10, 19, 42, 81, 125, 143, 72, -201, 8, 12, 22, 41, 83, 164, 289, 432, 504, 303, 7, 15, 27, 49, 90
Offset: 1

Author

Max Barrentine, Aug 06 2016

Keywords

Comments

This is a variation of the Zorach additive triangle (A035312), with negative numbers included. Each term is the sum of the terms to its immediate west and northwest, and each member of the first column is chosen such that its absolute value is minimal and no term following it in its own row occurs earlier in the triangle. In the case where m and -m both satisfy these criteria for T(n,1) = |m|, choose the term that minimizes the absolute value of T(n,2).
Is this a permutation of the nonzero integers?

Crossrefs

Cf. A035312.

A275318 A self-dissimilar sequence: each string that occurs earlier is appended with a different term than what follows the previous occurrence.

Original entry on oeis.org

0, 1, 0, 0, 2, 1, 3, 2, 0, 1, 4, 3, 1, 3, 1, 2, 5, 4, 2, 4, 1, 1, 0, 6, 5, 3, 0, 5, 2, 3, 7, 6, 4, 0, 4, 8, 7, 5, 1, 9, 8, 6, 3, 6, 2, 2, 1, 2, 4, 0, 3, 5, 0, 2, 0, 0, 1, 3, 0, 4, 7, 4, 6, 1, 2, 3, 6, 1, 1, 10, 9, 7, 3, 5, 11, 10, 8, 5, 10, 7, 2, 2, 0, 12, 11
Offset: 1

Author

Max Barrentine, Jul 23 2016

Keywords

Comments

Each successive term of this sequence is chosen by finding the longest suffix of the sequence that occurs earlier in the sequence, and subtracting 1 from the term that follows the most recent occurrence (the empty set is a suffix and a prefix of every string). If the following term is 0, then the new term is the smallest number that has not yet occurred in the sequence.
Unlike the related Ehrenfeucht-Mycielski sequence (A038219), the present sequence has some predictable structure. The first occurrence of a term a(n)=k is always followed by a(n+1)=k-1, and it appears that for large values of k, it tends to be the case that a(n+2)=k-3, a(n+3)=k-6... a(n+m)=k-T(m).
Does every finite permutation of the nonnegative integers occur in this sequence?

Examples

			The initial term is 0. The largest suffix that occurs earlier is the empty set followed by 0, so the next term is 1, the smallest number that has not yet occurred. The largest suffix that occurs earlier is the empty set, followed by 1, so the next term is 1-1=0. The largest suffix that occurs earlier is 0, followed by 1, so the next term is 1-1=0.
		

Crossrefs

Cf. A038219.

A274690 First differences of A274689.

Original entry on oeis.org

-2, 3, 4, 5, -3, 7, -5, 9, -6, 12, -4, -7, 16, -8, 17, -10, -9, 18, -11, 23, -13, 24, -12, -14, 28, -15, -16, 26, -17, 31, -18, -20, 33, -21, 36, -22, 40, -19, -24, 42, -23, -25, 43, -26, 44, -27, -29, 45, -28, 47, -30, -31, 52, -32, 53, -34, -33, 62, -35, -37
Offset: 1

Author

Max Barrentine, Jul 02 2016

Keywords

Comments

It appears that this sequence and its partial sums plus one list every integer except zero.

Crossrefs

A274688 First differences of A274687.

Original entry on oeis.org

-2, 3, -5, 7, -8, 9, -11, 12, -13, 15, -17, 19, -20, 21, -23, 25, -27, 28, -29, 31, -32, 33, -35, 36, -37, 39, -41, 43, -44, 45, -47, 48, -49, 51, -52, 53, -55, 57, -59, 60, -61, 63, -65, 67, -68, 69, -71, 73, -75, 76, -77, 79, -80, 81, -83, 84, -85, 87, -89
Offset: 1

Author

Max Barrentine, Jul 02 2016

Keywords

Comments

This sequence and its partial sums plus one list every integer except zero.

Crossrefs

Formula

If n is even, a(n) = A053661(n+1); if n is odd, a(n) = -A053661(n+1)

A274689 A variation of A005228.

Original entry on oeis.org

1, -1, 2, 6, 11, 8, 15, 10, 19, 13, 25, 21, 14, 30, 22, 39, 29, 20, 38, 27, 50, 37, 61, 49, 35, 63, 48, 32, 58, 41, 72, 54, 34, 67, 46, 82, 60, 100, 81, 57, 99, 76, 51, 94, 68, 112, 85, 56, 101, 73, 120, 90, 59, 111, 79, 132, 98, 65, 127, 92, 55, 119, 83, 149
Offset: 1

Author

Max Barrentine, Jul 02 2016

Keywords

Comments

This is the lexicographically earliest sequence such that the absolute value of its first differences (A274690) is minimal, and together with its first differences, contains every integer except zero at most once.
Each term is chosen so that |a(n+1) - a(n)| is minimal such that neither a(n+1) nor (a(n+1) - a(n)) has occurred previously in either this sequence or this sequence's first differences. If for a minimal term |k| k and -k are both available, choose the term that will minimize |a(n+1)|.
It appears that this sequence together with its first differences list every integer except zero.
Is -1 the only negative term?

Examples

			a(1) = 1; the next number with the lowest possible absolute value that has not occurred yet is -1, but since 1 + (-1) = 0 (which is not available because if a(n) = 0, then a(n+1) = a(n+1) - a(n)), -1 is not available. The next available terms are 2 and (-2). (-2) is chosen because |1 + 2| > |1 + (-2)|, so a(2) = 1 + (-2) = -1.
		

Crossrefs

A274687 Sequence and first differences (A274688) together list every integer except zero exactly once.

Original entry on oeis.org

1, -1, 2, -3, 4, -4, 5, -6, 6, -7, 8, -9, 10, -10, 11, -12, 13, -14, 14, -15, 16, -16, 17, -18, 18, -19, 20, -21, 22, -22, 23, -24, 24, -25, 26, -26, 27, -28, 29, -30, 30, -31, 32, -33, 34, -34, 35, -36, 37, -38, 38, -39, 40, -40, 41, -42, 42, -43, 44, -45, 46
Offset: 1

Author

Max Barrentine, Jul 02 2016

Keywords

Comments

This is the lexicographically earliest sequence that together with its first differences (A274688) contains every integer except 0 exactly once.
Each term is chosen so that |a(n)| is minimal such that neither a(n) nor (a(n) - a(n-1)) has occurred previously in either this sequence or this sequence's first differences.

Examples

			a(1) = 1; the next number with the lowest possible absolute value that has not occurred yet is -1. -1 - (1) = -2, which also has not yet occurred, so a(2) = -1. The next available term is 2. 2 - (-1) = 3, which is also available, so a(3) = 2.
		

Crossrefs