A355323 Numbers k such that A007063(k) = A356026(k).
1, 2, 3, 371, 5131, 9250, 26664
Offset: 1
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.
The eight diagonals described in Comments: A007063 = RILI = (1, 3, 5, 4, 10, 7, 15, 8, 20, 9, 18, 24, 31, 14, ... ) A282348 = ROLO = (1, 3, 5, 2, 8, 9, 4, 10, 7, 20, 12, 24, 14, 23, ... ) A356376 = LORO = (1, 3, 5, 6, 4, 11, 12, 9, 13, 15, 23, 7, 27, 16, ... ) A356026 = LIRI = (1, 3, 5, 7, 4, 12, 10, 17, 6, 22, 15, 19, 24, 33, ... ) A356377 = ROLI = (1, 3, 5, 4, 8, 6, 10, 15, 2, 9, 13, 26, 11, 12, ... ) A356378 = RILO = (1, 3, 5, 2, 10, 9, 15, 8, 20, 19, 7, 21, 31, 6, ... ) A356379 = LORI = (1, 3, 5, 7, 4, 12, 11, 17, 10, 22, 21, 9, 23, 33, ... ) A356380 = LIRO = (1, 3, 5, 6, 4, 11, 13, 2, 7, 14, 24, 9, 10, 31, ... )
K[i_, j_] := i + j - 1 /; (j >= 2 i - 3); K[i_, j_] := K[i - 1, i - j/2 - 1] /; (EvenQ[j] && (j < 2 i - 3)); K[i_, j_] := K[i - 1, i + (j - 1)/2] /; (OddQ[j] && (j < 2 i - 3)); A007063[i_] := A007063[i] = K[i, i]; SetAttributes[A007063, Listable] (* Enrique Pérez Herrero, Feb 09 2010 *) (* Next program generates the 8 arrays with highlighted diagonal sequences. *) len = 1000; roli = Join[{{1}}, NestList[ Join[#[[Riffle[Range[Length[#], (Length[#] + 3)/2, -1], Range[(Length[#] - 1)/2, 1, -1]]]], Range[#, # + 2] &[(3 Length[#] + 1)/2]] &, {2, 3, 4}, len]]; rili = Join[{{1}}, NestList[Join[#[[Riffle[Range[(Length[#] + 3)/2, Length[#]], Range[(Length[#] - 1)/2, 1, -1]]]], Range[#, # + 2] &[(3 Length[#] + 1)/2]] &, {2, 3, 4}, len]];(*A007063*) rolo = Join[{{1}}, NestList[Join[#[[Riffle[Range[Length[#], (Length[#] + 3)/2, -1], Range[1, (Length[#] - 1)/2]]]], Range[#, # + 2] &[(3 Length[#] + 1)/2]] &, {2, 3, 4}, len]];(*A282348*) rilo = Join[{{1}}, NestList[Join[#[[Riffle[Range[(Length[#] + 3)/2, Length[#]], Range[1, (Length[#] - 1)/2, 1]]]], Range[#, # + 2] &[(3 Length[#] + 1)/2]] &, {2, 3, 4}, len]]; lori = Join[{{1}}, NestList[ Join[#[[Riffle[Range[1, (Length[#] - 1)/2], Range[(Length[#] + 3)/2, Length[#]]]]], Range[#, # + 2] &[(3 Length[#] + 1)/2]] &, {2, 3, 4}, len]]; liri = Join[{{1}}, NestList[Join[#[[Riffle[Range[(Length[#] - 1)/2, 1, -1], Range[(Length[#] + 3)/2, Length[#]]]]], Range[#, # + 2] &[(3 Length[#] + 1)/2]] &, {2, 3, 4}, len]];(*A356026*) loro = Join[{{1}}, NestList[Join[#[[Riffle[Range[1, (Length[#] - 1)/2], Range[Length[#], (Length[#] + 3)/2, -1]]]], Range[#, # + 2] &[(3 Length[#] + 1)/2]] &, {2, 3, 4}, len]]; liro = Join[{{1}}, NestList[ Join[#[[Riffle[Range[(Length[#] - 1)/2, 1, -1], Range[Length[#], (Length[#] + 3)/2, -1]]]], Range[#, # + 2] &[(3 Length[#] + 1)/2]] &, {2, 3, 4}, len]]; (Map[{#, Take[Flatten[Map[Take[#, {(Length[#] + 1)/2}] &, #]], 200] &[ ToExpression[#]]} &, {"rolo", "rilo", "roli", "rili", "loro", "liro", "lori", "liri"}]) // ColumnForm rows = 10; Map[{#, Grid[Map[Map[StringPadLeft[ToString[#], 2] &, #] &, Take[ToExpression[#], rows]], Frame -> {None, None, Map[{#, #} -> True &, Range[rows]]}, FrameStyle -> Directive[Red]]} &, {"rolo", "rilo", "roli", "rili", "loro", "liro", "lori", "liri"}] (* Peter J. C. Moses, Oct 24 2022; Clark Kimberling, Oct 24 2022 *)
K(i,j) = { my(i1,j1);i1=i; j1=j; while(j1<(2*i1-3),if(j1%2,j1=i1+((j1-1)/2),j1=i1-((j1+2)/2));i1--;); return(i1+j1-1);} A007063(i)=K(i,i); \\ Enrique Pérez Herrero, Feb 21 2010
f[seq_] := Riffle[Take[Reverse[seq], #], Take[seq, #]] &[Floor[Length[seq]/2]]; rows = 200; row[1] = Table[n, {n, rows}]; Table[row[n + 1] = Flatten[{f[Take[row[n], 2 n - 1]], Drop[row[n], 2 n - 1]}], {n, Floor[(rows - 1)/3 + 1]}]; TableForm[Table[Take[row[n], 20], {n, 1, 20}]] (* A282347 *) Table[row[n][[n]], {n, 2 + Floor[(rows - 1)/3]}] (* A282348 *)
Comments