Original entry on oeis.org
9, 4, 4, 4, 61, 10, 10, 10, 116, 16, 16, 16, 169, 22, 22, 22, 119, 26, 26, 26, 259, 32, 32, 32, 314, 38, 38, 38, 367, 44, 44, 44, 421, 50, 50, 50, 476, 56, 56, 56, 529, 62, 62, 62, 319, 66, 66, 66, 619, 72, 72, 72, 674, 78, 78, 78, 727, 84, 84, 84, 782, 90, 90, 90, 835, 96, 96, 96, 489, 100
Offset: 0
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
Original entry on oeis.org
17, 102, 260, 489, 682, 1031, 1453, 1946, 2511, 3149, 3858, 4371, 5200, 6102, 7075, 8121, 9238, 10023, 11260, 12570, 13951, 15404, 16930, 18527, 19632, 21349, 23139, 25000, 26281, 28262, 30316, 32441, 34638, 36908, 39249, 40850, 43311, 45845, 48450, 51128, 53877, 55750, 58619, 61561, 64574
Offset: 0
Original entry on oeis.org
9, 82, 228, 445, 630, 967, 1377, 1858, 2411, 3037, 3734, 4239, 5056, 5946, 6907, 7941, 9046, 9823, 11048, 12346, 13715, 15156, 16670, 18255, 19352, 21057, 22835, 24684, 25957, 27926, 29968, 32081, 34266, 36524, 38853, 40446, 42895, 45417, 48010, 50676, 53413, 55278, 58135, 61065, 64066
Offset: 0
Original entry on oeis.org
13, 92, 244, 467, 656, 999, 1415, 1902, 2461, 3093, 3796, 4305, 5128, 6024, 6991, 8031, 9142, 9923, 11154, 12458, 13833, 15280, 16800, 18391, 19492, 21203, 22987, 24842, 26119, 28094, 30142, 32261, 34452, 36716, 39051, 40648, 43103, 45631, 48230, 50902, 53645, 55514, 58377, 61313, 64320
Offset: 0
A274640
Counterclockwise square spiral constructed by greedy algorithm, so that each row, column, and diagonal contains distinct numbers.
Original entry on oeis.org
1, 2, 3, 4, 2, 3, 4, 5, 6, 1, 4, 6, 2, 1, 6, 5, 3, 1, 5, 2, 6, 1, 2, 4, 5, 3, 7, 8, 5, 4, 9, 7, 8, 3, 10, 11, 4, 7, 8, 6, 3, 9, 5, 7, 8, 9, 10, 11, 12, 6, 8, 9, 11, 10, 12, 13, 7, 6, 10, 9, 12, 13, 14, 15, 8, 2, 9, 12, 7, 10, 11, 13, 14, 10, 9, 6, 13, 5, 3, 15, 16, 7, 1, 10, 13, 12, 14, 11, 15, 3, 8, 5, 1, 12, 11, 14, 7, 4, 2, 16, 9, 17, 1, 8, 11
Offset: 0
The spiral begins:
.
9--16---2---4---7--14--11--12---1---5---8
| |
17 8--15--14--13--12---9--10---6---7 3
| | | |
1 2 4--11--10---3---8---7---9 13 15
| | | | | |
8 9 7 3---5---6---1---2 4 12 11
| | | | | | | |
11 12 8 1 2---4---3 6 5 10 14
| | | | | | | | | |
15 7 6 5 3 1---2 4 8 11 12
| | | | | | | | |
14 10 3 2 4---5---6---1 7 9 13
| | | | | | |
7 11 9 6---1---2---4---5---3 8 10
| | | | |
4 13 5---7---8---9--10--11--12---6 1
| | |
12 14--10---9---6--13---5---3--15--16---7
|
10--15---1--12--16---8--14--13--11--18--17
.
The 8 spokes (A274924-A274931) begin:
E: 1, 2, 4, 8, 11, 12, 16, 9, 19, 24, 22, ...
NE: 1, 3, 2, 9, 7, 8, 12, 15, 13, 17, 20, ...
N: 1, 4, 6, 3, 12, 14, 15, 18, 20, 26, 25, ...
NW: 1, 2, 3, 4, 8, 9, 7, 11, 14, 10, 22, ...
W: 1, 3, 5, 6, 7, 15, 10, 17, 13, 25, 14, ...
SW: 1, 4, 6, 5, 14, 10, 11, 23, 16, 18, 21, ...
S: 1, 5, 2, 9, 13, 8, 7, 11, 10, 17, 19, ...
SE: 1, 6, 5, 12, 16, 17, 21, 24, 27, 13, 15, ...
- Alois P. Heinz, Table of n, a(n) for n = 0..20000
- F. Michel Dekking, Jeffrey Shallit, and N. J. A. Sloane, Queens in exile: non-attacking queens on infinite chess boards, Electronic J. Combin., 27:1 (2020), #P1.52.
- Alois P. Heinz, Distribution of a(n) for n <= 4010000
- Kerry Mitchell, Color-coded version of spiral, (1): the colors represent the values, from black (small) to white (large) (jpg file, low resolution)
- Kerry Mitchell, Color-coded version of spiral, (1a): the colors represent the values, from black (small) to white (large) (tiff file, much higher resolution)
- Kerry Mitchell, Color-coded version of spiral, (2): values <= 100 are black and those > 100 are white.
- Zak Seidov, Distribution of a(n) for first 20001 terms
In the same spirit as the infinite Sudoku array
A269526.
Cf.
A274821 (the same construction on a hexagonal tiling).
-
# Maple program from Alois P. Heinz, Jul 12 2016:
fx:= proc(n) option remember; `if`(n=1, 0, (k->
fx(n-1)+sin(k*Pi/2))(floor(sqrt(4*(n-2)+1)) mod 4))
end:
fy:= proc(n) option remember; `if`(n=1, 0, (k->
fy(n-1)-cos(k*Pi/2))(floor(sqrt(4*(n-2)+1)) mod 4))
end:
b:= proc() 0 end:
a:= proc(n) local x,y,s,i,t,m;
x, y:= fx(n+1), fy(n+1);
if b(x, y) > 0 then b(x, y)
else s:={};
for i do t:=b(x+i,y+i); if t>0 then s:=s union {t} else break fi od;
for i do t:=b(x-i,y-i); if t>0 then s:=s union {t} else break fi od;
for i do t:=b(x+i,y-i); if t>0 then s:=s union {t} else break fi od;
for i do t:=b(x-i,y+i); if t>0 then s:=s union {t} else break fi od;
for i do t:=b(x+i,y ); if t>0 then s:=s union {t} else break fi od;
for i do t:=b(x-i,y ); if t>0 then s:=s union {t} else break fi od;
for i do t:=b(x ,y+i); if t>0 then s:=s union {t} else break fi od;
for i do t:=b(x ,y-i); if t>0 then s:=s union {t} else break fi od;
for m while m in s do od;
b(x,y):= m
fi
end:
seq(a(n), n=0..1000);
-
fx[n_] := fx[n] = If[n == 1, 0, Function[k, fx[n-1] + Sin[k*Pi/2]][Mod[Floor[Sqrt[4*(n-2)+1]], 4]]]; fy[n_] := fy[n] = If[n == 1, 0, Function[k, fy[n-1] - Cos[k*Pi/2]][Mod[Floor[Sqrt[4*(n-2)+1]], 4]]]; Clear[b]; 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]]; Table[a[n], {n, 0, 1000}] (* Jean-François Alcover, Nov 14 2016, after Alois P. Heinz *)
-
class Lines: # manage lines in direction d = dx + dy*1j
def _init_(self, d):
self.lines={}; self.t = d.real/d.imag if d.imag else None
def _call_(self, pos): # Return the line through pos in direction d
index = pos.imag if self.t is None else pos.real - pos.imag*self.t
if index not in self.lines: self.lines[index] = Values()
return self.lines[index]
class Values(set): # the set of used numbers on a given line
def next(self, n): # return least k >= n not on this line
return min(m+1 for m in self if m+1 >= n and m+1 not in self
) if n in self else n
def A274640(): # generator of the sequence, see below for possible usage
lines = [Lines(d) for d in (1, 1+1j, 1j, 1-1j)]; pos = 0
for side in range(9**9):
for _ in range(side//2 + 1):
n = 1; lines_here = [L(pos) for L in lines]
while any(n < (n := L.next(n)) for L in lines_here): pass
yield n; any(L.add(n) for L in lines_here); pos += 1j**side
[a for a,A274640(),range(99))%5D%20%23%20_M.%20F.%20Hasler"> in zip(A274640(),range(99))] # _M. F. Hasler, Feb 01 2025
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
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.
- Robbert Fokkink, Gerard Francis Ortega, Dan Rust, Corner the Empress, arXiv:2204.11805. See Table 3.
- N. J. A. Sloane, Table of n, a(n) for n = 0..50000, Sep 13 2016 (First 1001 terms from Reinhard Zumkeller)
- F. Michel Dekking, Jeffrey Shallit, and N. J. A. Sloane, Queens in exile: non-attacking queens on infinite chess boards, Electronic J. Combin., 27:1 (2020), #P1.52.
- Eric Duchêne and Michel Rigo, A morphic approach to combinatorial games: the Tribonacci case. RAIRO - Theoretical Informatics and Applications, 42, 2008, pp 375-393. doi:10.1051/ita:2007039. [Also available here]
- Robbert Fokkink and Dan Rust, A modification of Wythoff's Nim, arXiv:1904.08339 [math.CO], 2019.
- Jeffrey Shallit, Some Tribonacci conjectures, arXiv:2210.03996 [math.CO], 2022.
- Jeffrey Shallit, Using Walnut to Prove Results About Sequences in the OEIS, Seminar, Oct 18 2
- 022
- Jeffrey Shallit, Automaton to be called yaut.txt in Walnut format, recognizing (n, Y(n)) in parallel, in Tribonacci representation.
- N. J. A. Sloane, Maple program for A140100, A140101, A140102, A140103
The indicator function of this sequence is
A305386.
-
See link.
-
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 *)
-
/* 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))))))}
A140100
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 X(n) (for Y(n) see A140101).
Original entry on oeis.org
1, 3, 4, 6, 7, 9, 10, 12, 14, 15, 17, 18, 20, 21, 23, 24, 26, 27, 29, 30, 32, 34, 35, 37, 38, 40, 41, 43, 44, 46, 47, 49, 51, 52, 54, 55, 57, 58, 60, 61, 63, 64, 66, 67, 69, 71, 72, 74, 75, 77, 78, 80, 82, 83, 85, 86, 88, 89, 91, 92, 94, 95, 97, 98, 100, 102, 103, 105, 106
Offset: 1
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.
CONSTRUCTION: PLOT OF (A140100(n), A140101(n)).
This sequence gives the x-coordinates of the following construction.
Start with an x-y coordinate system and place an 'o' at the origin.
Define an open position as a point not lying in the same row, column, or diagonal (slope +1/-1) as any point previously given an 'o' marker.
From then on, place an 'o' marker at the first open position with integer coordinates that is nearest the origin and the y-axis in the positive quadrant, while simultaneously placing markers at rotationally symmetric positions in the remaining three quadrants.
Example: after the origin, begin placing markers at x-y coordinates:
n=1: (1,2), (2,-1), (-1,-2), (-2,1);
n=2: (3,5), (5,-3), (-3,-5), (-5,3);
n=3: (4,8), (8,-4), (-4,-8), (-8,4);
n=4: (6,11), (11,-6), (-6,-11), (-11,6);
n=5: (7,13), (13,-7), (-7,-13), (-13,7); ...
The result of this process is illustrated in the following diagram (see A273059 for an equivalent picture - _N. J. A. Sloane_, Aug 30 2016).
----------------+---o------------
--o-------------+----------------
----o-----------+----------------
----------------+--o-------------
--------o-------+----------------
-----------o----+----------------
----------------+o---------------
--------------o-+----------------
++++++++++++++++o++++++++++++++++
----------------+-o--------------
---------------o+----------------
----------------+----o-----------
----------------+-------o--------
-------------o--+----------------
----------------+------------o---
----------------+--------------o-
------------o---+----------------
Graph: no two points lie in the same row, column, diagonal, or antidiagonal.
Points in the positive quadrant are at (A140100(n), A140101(n)).
A140101 begins: [2,5,8,11,13,16,19,22,25,28,31,33,36,39,42,...].
- N. J. A. Sloane, Table of n, a(n) for n = 1..50000, Sep 13 2016 (First 1001 terms from Reinhard Zumkeller)
- F. Michel Dekking, Jeffrey Shallit, and N. J. A. Sloane, Queens in exile: non-attacking queens on infinite chess boards, Electronic J. Combin., 27:1 (2020), #P1.52.
- Eric Duchêne and Michel Rigo, A morphic approach to combinatorial games: the Tribonacci case. RAIRO - Theoretical Informatics and Applications, 42, 2008, pp 375-393. doi:10.1051/ita:2007039. [Also available here]
- Robbert Fokkink and Dan Rust, A modification of Wythoff's Nim, arXiv:1904.08339 [math.CO], 2019.
- Jeffrey Shallit, Some Tribonacci conjectures, arXiv:2210.03996 [math.CO], 2022.
- Jeffrey Shallit, Automaton to be called xaut.txt in Walnut format, recognizing (n, X(n)) in parallel, in Tribonacci representation
- N. J. A. Sloane, Maple program for A140100, A140101, A140102, A140103
Cf. Greedy Queens in a spiral,
A273059.
-
See link.
-
y[0] = 0; x[1] = 1; y[1] = 2;
x[n_] := x[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], y[n] = yn; Return[xn]]]];
Table[x[n], {n, 1, 100}] (* Jean-François Alcover, Jun 17 2018 *)
-
/* 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))))))}
A275925
Trajectory of 3 under repeated application of the morphism sigma: 3 -> 3656, 5 -> 365656, 6 -> 3656656.
Original entry on oeis.org
3, 6, 5, 6, 3, 6, 5, 6, 6, 5, 6, 3, 6, 5, 6, 5, 6, 3, 6, 5, 6, 6, 5, 6, 3, 6, 5, 6, 3, 6, 5, 6, 6, 5, 6, 3, 6, 5, 6, 5, 6, 3, 6, 5, 6, 6, 5, 6, 3, 6, 5, 6, 6, 5, 6, 3, 6, 5, 6, 5, 6, 3, 6, 5, 6, 6, 5, 6, 3, 6, 5, 6, 3, 6, 5, 6, 6, 5, 6, 3, 6, 5, 6, 5, 6, 3, 6, 5, 6, 6, 5, 6, 3, 6, 5, 6, 5, 6, 3, 6
Offset: 1
The first few generations of the iteration are:
3
3656
365636566563656563656656
3656365665636565636566563656365665636565636566563656656365656365665636563656656\
3656563656656365656365665636563656656365656365665636566563656563656656
...
- N. J. A. Sloane, Table of n, a(n) for n = 1..35890
- J.-P. Allouche, M. Baake, J. Cassaigns, and D. Damanik, Palindrome complexity, arXiv:math/0106121 [math.CO], 2001; Theoretical Computer Science, 292 (2003), 9-31.
- F. Michel Dekking, Jeffrey Shallit, and N. J. A. Sloane, Queens in exile: non-attacking queens on infinite chess boards, Electronic J. Combin., 27:1 (2020), #P1.52.
- Index entries for sequences that are fixed points of mappings
-
SubstitutionSystem[{3 -> {3, 6, 5, 6}, 5 -> {3, 6, 5, 6, 5, 6}, 6 -> {3, 6, 5, 6, 6, 5, 6}}, {3}, 3] // Last (* Jean-François Alcover, Jan 21 2018 *)
Original entry on oeis.org
2, 5, 16, 25, 33, 40, 78, 89, 158, 172, 221, 237, 376, 395, 415, 523, 570, 749, 777, 790, 876, 923, 1016, 1114, 1182, 1303, 1341, 1473, 1512, 1754, 1839, 1970, 2105, 2267, 2315, 2488, 2538, 2957, 3012, 3204, 3262, 3467, 3527, 3646, 3983, 4110, 4276, 4744, 4815
Offset: 1
Showing 1-10 of 10 results.
Comments