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.

A140101 Start with Y(0)=0, X(1)=1, Y(1)=2. For n > 1, choose least positive integers Y(n) > X(n) such that neither Y(n) nor X(n) appear in {Y(k), 1 <= k < n} or {X(k), 1 <= k < n} and such that Y(n)-X(n) does not appear in {Y(k)-X(k), 1 <= k < n} or {Y(k)+X(k), 1 <= k < n}; sequence gives Y(n) (for X(n) see A140100).

Original entry on oeis.org

0, 2, 5, 8, 11, 13, 16, 19, 22, 25, 28, 31, 33, 36, 39, 42, 45, 48, 50, 53, 56, 59, 62, 65, 68, 70, 73, 76, 79, 81, 84, 87, 90, 93, 96, 99, 101, 104, 107, 110, 113, 116, 118, 121, 124, 127, 130, 133, 136, 138, 141, 144, 147, 150, 153, 156, 158, 161, 164, 167, 170, 173
Offset: 0

Views

Author

Paul D. Hanna, Jun 04 2008

Keywords

Comments

Sequence A140100 = {X(n), n >= 1} is the complement of the current sequence, while the sequence of differences, A140102 = {Y(n)-X(n), n >= 1}, forms the complement of the sequence of sums, A140103 = {Y(n)+X(n), n >= 1}.
Compare with A140099(n) = [n*(1+t)], a Beatty sequence involving the tribonacci constant t = t^3 - t^2 - 1 = 1.83928675521416113255...
Theorem: A140099(n) - A140101(n) is always in {-1,0,1} (see A275926). (See also A276385.)
Comments from N. J. A. Sloane, Aug 30 2016: (Start) This is the same problem as the "Greedy Queens in a spiral" problem described in A273059. In A273059 the queens come in sets of 4, each set of 4 being on the same shell around the central square.
a(n) specifies the shell number for the successive sets of 4 (taking the central square to be shell 0, the 8 squares around the center to be shell 1, etc.).
For example, the queens at squares 9, 13, 17, 21 in the spiral (terms A273059(2)-A273059(5)) are all on shell a(1) = 2. The next four queens, at squares 82, 92, 102, 112, are on shell a(2) = 5.
The four "spokes" in A273059 are given in A275916-A275919. The precise connection with the current sequence is that a(n) = nearest integer to (1 + sqrt(A275917(n-1)+1))/2.
This sequence links together the spokes A275916-A275919 in the sense that A275918(n) = A275917(n)+2*a(n+1), A275919(n) = A275917(n)+4*a(n+1), and A275916(n+1) = A275917(n)+6*a(n+1).
(End)
Conjecture: a(n) = A003144(n) + n. (This is from my notebook Lattices 115 page 20 from Oct 25 2016. It is now a theorem - see the Dekking et al. paper.) - N. J. A. Sloane, Jul 22 2019
The sequence is "tribonacci-synchronized"; this means there is a finite automaton recognizing the tribonacci representation of (n,a(n)) input in parallel, where a shorter input is padded with leading zeros. This finite automaton has 23 states and was verified with Walnut. In particular this finite automaton and a similar one for A140101 was used to verify that (conjecture of J. Cassaigne) either a(b(n)) = a(n)+b(n) or b(a(n)) = a(n)+b(n) for all n>=1, where b(n) = A140100(n). - Jeffrey Shallit, Oct 04 2022

Examples

			Start with Y(0)=0, X(1)=1, Y(1)=2 ; Y(1)-X(1)=1, Y(1)+X(1)=3.
Next choose X(2)=3 and Y(2)=5; Y(2)-X(2)=2, Y(2)+X(2)=8.
Next choose X(3)=4 and Y(3)=8; Y(3)-X(3)=4, Y(3)+X(3)=12.
Next choose X(4)=6 and Y(4)=11; Y(4)-X(4)=5, Y(4)+X(4)=17.
Continue to choose the least positive X and Y > X not appearing earlier
such that Y-X and Y+X do not appear earlier as a difference or sum.
This sequence gives the y-coordinates of the positive quadrant in the construction given in the examples for A140100.
		

References

  • Robbert Fokkink, Gerard Francis Ortega, Dan Rust, Corner the Empress, arXiv:2204.11805. See Table 3.

Crossrefs

Cf. A140100 (complement); A140102, A140103, A275926 (deviation from A140099).
Cf. related Beatty sequences: A140098, A140099; A000201.
Cf. A058265 (tribonacci constant).
Cf. Greedy Queens in a spiral, A273059, A275916, A275917, A275918, A275919, A275925.
See also A276385.
For first differences of A140100, A140101, A140102, A140103 see A305392, A305374, A305393, A305394.
The indicator function of this sequence is A305386.

Programs

  • Maple
    See link.
  • Mathematica
    y[0] = 0; x[1] = 1; y[1] = 2;
    y[n_] := y[n] = For[yn = y[n - 1] + 1, True, yn++, For[xn = x[n - 1] + 1, xn < yn, xn++, xx = Array[x, n - 1]; yy = Array[y, n - 1]; If[FreeQ[xx, xn] && FreeQ[xx, yn] && FreeQ[yy, xn] && FreeQ[yy, yn] && FreeQ[yy - xx, yn - xn] && FreeQ[yy + xx, yn - xn], x[n] = xn; Return[yn]]]];
    Table[y[n], {n, 0, 100}] (* Jean-François Alcover, Jun 17 2018 *)
  • PARI
    /* Print (x,y) coordinates of the positive quadrant */ {X=[1];Y=[2];D=[1];S=[3];print1("["X[1]","Y[1]"],"); for(n=1,100,for(j=2,2*n,if(setsearch(Set(concat(X,Y)),j)==0,Xt=concat(X,j); for(k=j+1,3*n,if(setsearch(Set(concat(Xt,Y)),k)==0, if(setsearch(Set(concat(D,S)),k-j)==0,if(setsearch(Set(concat(D,S)),k+j)==0, X=Xt;Y=concat(Y,k);D=concat(D,k-j);S=concat(S,k+j); print1("["X[ #X]","Y[ #Y]"],");break);break))))))}

Formula

CONJECTURE: the limit of a(n)/n = 1+t and limit of X(n)/n = 1+1/t so that limit of a(n)/X(n) = t = tribonacci constant (A058265), and thus the limit of [a(n) + X(n)]/[a(n) - X(n)] = t^2 and the limit of [a(n)^2 + X(n)^2]/[a(n)^2 - X(n)^2] = t.
Conjectured recursion: Take first differences: 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 2, ... (appears to consist of only 3's and 2's); list the run lengths: 3, 1, 6, 1, 5, 1, 6, 1, 3, 1, 6, 1, 5, 1, 6, 1, ... (it appears that every second term is 1 and the other terms are 3, 5, and 6); and bisect, getting 3, 6, 5, 6, 3, 6, 5, 6, 6, 5, 6, 3, 6, ... This is (although I do not have a proof) the recursively defined A275925. Thanks to Alois P. Heinz for providing enough terms of A273059 to enable a (morally) convincing check of this conjecture. - N. J. A. Sloane, Aug 30 2016
From Michel Dekking, Mar 17 2019: (Start)
This conjecture can be reformulated as follows (cf. A140100).
The first differences of (a(n)) = (Y(n)) as a word are given by
3 delta(x),
where x is the tribonacci word x = A092782, and delta is the morphism
1 -> 3333332,
2 -> 333332,
3 -> 3332.
This conjecture implies the frequency conjecture above: let N(i,n) be the number of letters i in a(1)a(2)...a(n). Then simple counting gives
a(7*N(1,n)+6*N(2,n)+4*N(3,n)) = 20*N(1,n)+17*N(2,n)+11*N(3,n), where we neglected the first symbol of a = Y.
It is well known (see, e.g., A092782) that the frequencies of 1, 2 and 3 in x are respectively 1/t, 1/t^2 and 1/t^3. Dividing all the N(i,n) by n, and letting n tend to infinity, we then have to see that
20/t + 17/t^2 + 11/t^3 = (1+t)*(7/t + 6/t^2 + 4/t^3).
This is a simple verification, using t^3 = t^2 + t + 1.
(End)

Extensions

Terms computed independently by Reinhard Zumkeller and Joshua Zucker
Edited and a(0)=0 added by N. J. A. Sloane, Aug 30 2016

A273059 Positions of 1's in A274640: Greedy Queens on a spiral. Equivalently, positions of 0's in A274641.

Original entry on oeis.org

0, 9, 13, 17, 21, 82, 92, 102, 112, 228, 244, 260, 276, 445, 467, 489, 511, 630, 656, 682, 708, 967, 999, 1031, 1063, 1377, 1415, 1453, 1491, 1858, 1902, 1946, 1990, 2411, 2461, 2511, 2561, 3037, 3093, 3149, 3205, 3734, 3796, 3858, 3920, 4239, 4305, 4371, 4437, 5056, 5128, 5200, 5272, 5946
Offset: 0

Views

Author

Zak Seidov, Jul 14 2016

Keywords

Comments

What is the reason for the three "lines" in the graph of first differences (see link, also A275915)?
Apparently they are related to the fact that "ones" are concentrated along two main diagonals of the spiral A274640, see the graph "Spiral A274640 with ones shown".
This is the Greedy Queens construction on a spiral (cf. A065188). Follow a counterclockwise spiral starting at the origin, and place a queen iff it is not attacked by any existing queen. This same problem is described in a different but equivalent way in A140100 and A140101. See A140101 for a conjectured recurrence which underlies all these sequences. - N. J. A. Sloane, Aug 28-30, 2016

Crossrefs

Cf. A274640, A065188, A275915 (first differences).
The four spokes are A275916, A275917, A275918, A275919.
A140100 and A140101 describe this same problem in a different way.

Programs

  • Maple
    # see link above
  • Mathematica
    fx[n_] := fx[n] = If[n == 1, 0, fx[n - 1] + Sin[#*Pi/2]& @ Mod[Floor[Sqrt[ 4*(n - 2) + 1]], 4]];
    fy[n_] := fy[n] = If[n == 1, 0, fy[n - 1] - Cos[k*Pi/2]& @ Mod[Floor[Sqrt[ 4*(n - 2) + 1]], 4]];
    b[, ] = 0;
    a[n_] := Module[{x, y, s, i, t, m}, {x, y} = {fx[n + 1], fy[n + 1]}; If[b[x, y] > 0, b[x, y], s = {};
    For[i=1, True, i++, t = b[x+i, y+i]; If[t>0, s = Union[s, {t}], Break[]]];
    For[i=1, True, i++, t = b[x-i, y-i]; If[t>0, s = Union[s, {t}], Break[]]];
    For[i=1, True, i++, t = b[x+i, y-i]; If[t>0, s = Union[s, {t}], Break[]]];
    For[i=1, True, i++, t = b[x-i, y+i]; If[t>0, s = Union[s, {t}], Break[]]];
    For[i=1, True, i++, t = b[x+i, y]; If[t > 0, s = Union[s, {t}], Break[]]];
    For[i=1, True, i++, t = b[x-i, y]; If[t > 0, s = Union[s, {t}], Break[]]];
    For[i=1, True, i++, t = b[x, y+i]; If[t > 0, s = Union[s, {t}], Break[]]];
    For[i=1, True, i++, t = b[x, y-i]; If[t > 0, s = Union[s, {t}], Break[]]];
    m = 1; While[MemberQ[s, m], m++]; b[x, y] = m]];
    Flatten[Position[a /@ Range[0, 10^4], 1]] - 1 (* Jean-François Alcover, Feb 25 2020, after Alois P. Heinz *)

Formula

A274640(a(n)) = 1 (this is simply a restatement of the definition).

Extensions

Offset changed to 0 by N. J. A. Sloane, Aug 31 2016

A275916 a(n) = A273059(4n).

Original entry on oeis.org

0, 21, 112, 276, 511, 708, 1063, 1491, 1990, 2561, 3205, 3920, 4437, 5272, 6180, 7159, 8211, 9334, 10123, 11366, 12682, 14069, 15528, 17060, 18663, 19772, 21495, 23291, 25158, 26443, 28430, 30490, 32621, 34824, 37100, 39447, 41052, 43519, 46059, 48670, 51354, 54109, 55986, 58861, 61809
Offset: 0

Views

Author

N. J. A. Sloane, Aug 28 2016

Keywords

Comments

A275916-A275919 are the four rays in A273059. There is a conjectured recursion for these sequences: see A140101.

Crossrefs

Showing 1-3 of 3 results.