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.
%I A117384 #43 Sep 10 2021 06:04:49 %S A117384 1,2,1,3,4,2,5,3,6,7,4,8,5,9,6,10,11,7,12,8,13,9,14,10,15,16,11,17,12, %T A117384 18,13,19,14,20,15,21,22,16,23,17,24,18,25,19,26,20,27,21,28,29,22,30, %U A117384 23,31,24,32,25,33,26,34,27,35,28,36,37,29,38,30,39,31,40,32,41,33,42 %N A117384 Positive integers, each occurring twice in the sequence, such that a(n) = a(k) when n+k = 4*a(n), starting with a(1)=1 and filling the next vacant position with the smallest unused number. %C A117384 Positions where n occurs are A001614(n) and 4*n-A001614(n), where A001614 is the Connell sequence: 1 odd, 2 even, 3 odd, ... %C A117384 From _Paolo Xausa_, Aug 27 2021: (Start) %C A117384 Terms can be arranged in an irregular triangle T(r,c) read by rows in which row r is a permutation P of the integers in the interval [s, s+rlen-1], where s = 1+(r-1)*(r-2)/2, rlen = 2*r-1 and r >= 1 (see example). %C A117384 P is the alternating (first term > second term < third term > fourth term ...) permutation m -> 1, 1 -> 2, m+1 -> 3, 2 -> 4, m+2 -> 5, 3 -> 6, ..., rlen -> rlen, where m = ceiling(rlen/2). %C A117384 The triangle has the following properties. %C A117384 Row lengths are the positive odd numbers. %C A117384 First column is A000124. %C A117384 Terms in column c (where c >= 1) are of the form k*(k+1)/2+ceiling(c/2), for integers k >= floor((c-1)/2), each even column being equal to the column preceding it. %C A117384 Row records (the positive terms of A000217) are in the right border. %C A117384 Indices of row records are the positive terms of A000290. %C A117384 Each row r contains r terms that are duplicated in the next row. %C A117384 In each row, the sum of terms which are not already listed in the sequence gives the positive terms of A006003. %C A117384 Row sums give A063488. %C A117384 For rows r >= 2, row product is A057003(r)*A057003(r-1). (End) %F A117384 a(4*a(n)-n) = a(n). %F A117384 Lim_{n->infinity} a(n)/n = 1/2. %F A117384 Lim_{n->infinity} (a(n+1)-a(n))/sqrt(n) = 1. %F A117384 a( A001614(n) ) = n; a( 4n - A001614(n) ) = n. %F A117384 T(r,c) = k*(k+1)/2+ceiling(c/2), where k = r-1-((c+1) mod 2), r >= 1 and c >= 1. - _Paolo Xausa_, Sep 09 2021 %e A117384 9 first appears at position: A001614(9) = 14; %e A117384 9 next appears at position: 4*9 - A001614(9) = 22. %e A117384 From _Paolo Xausa_, Aug 27 2021: (Start) %e A117384 Written as an irregular triangle T(r,c) the sequence begins: %e A117384 r\c 1 2 3 4 5 6 7 8 9 10 11 12 13 %e A117384 1: 1; %e A117384 2: 2, 1, 3; %e A117384 3: 4, 2, 5, 3, 6; %e A117384 4: 7, 4, 8, 5, 9, 6, 10; %e A117384 5: 11, 7, 12, 8, 13, 9, 14, 10, 15; %e A117384 6: 16, 11, 17, 12, 18, 13, 19, 14, 20, 15, 21; %e A117384 7: 22, 16, 23, 17, 24, 18, 25, 19, 26, 20, 27, 21, 28; %e A117384 ... %e A117384 The triangle can be arranged as shown below so that, in every row, each odd position term is equal to the term immediately below it. %e A117384 1 %e A117384 2 1 3 %e A117384 4 2 5 3 6 %e A117384 7 4 8 5 9 6 10 %e A117384 11 7 12 8 13 9 14 10 15 %e A117384 ... %e A117384 (End) %t A117384 nterms=64;a=ConstantArray[0,nterms];For[n=1;t=1,n<=nterms,n++,If[a[[n]]==0,a[[n]]=t;If[(d=4t-n)<=nterms,a[[d]]=a[[n]]];t++]]; a (* _Paolo Xausa_, Aug 27 2021 *) %t A117384 (* Second program, triangle rows *) %t A117384 nrows = 8;Table[rlen=2r-1;Permute[Range[s=1+(r-1)(r-2)/2,s+rlen-1],Join[Range[2,rlen,2],Range[1,rlen,2]]],{r,nrows}] (* _Paolo Xausa_, Aug 27 2021 *) %o A117384 (PARI) {a(n)=local(A=vector(n),m=1); for(k=1,n,if(A[k]==0,A[k]=m;if(4*m-k<=#A,A[4*m-k]=m);m+=1));A[n]} %o A117384 (PARI) T(r,c) = my(k = r-1-((c+1) % 2)); k*(k+1)/2+ceil(c/2); %o A117384 tabf(nn) = {for (r=1, nn, for(c = 1, 2*r-1, print1(T(r,c), ", ");); print;);} \\ _Michel Marcus_, Sep 09 2021 %Y A117384 Cf. A117385 (a(5*a(n)-n)=a(n)), A117386 (a(6*a(n)-n)=a(n)). %Y A117384 Cf. A001614 (Connell sequence). %Y A117384 Cf. A000124, A000217, A006003, A057003, A063488, A344482. %K A117384 nonn,tabf %O A117384 1,2 %A A117384 _Paul D. Hanna_, Mar 11 2006