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.

A088371 Position where n is inserted into the n-th row of triangle A088370, where the n-th row differs from the prior row only by the presence of n.

This page as a plain text file.
%I A088371 #14 Jul 26 2019 18:23:05
%S A088371 1,2,2,4,2,5,4,8,2,7,5,11,4,11,8,16,2,11,7,17,5,16,11,23,4,17,11,25,8,
%T A088371 23,16,32,2,19,11,29,7,26,17,37,5,26,16,38,11,34,23,47,4,29,17,43,11,
%U A088371 38,25,53,8,37,23,53,16,47,32,64,2,35,19,53,11,46,29,65,7,44,26,64,17
%N A088371 Position where n is inserted into the n-th row of triangle A088370, where the n-th row differs from the prior row only by the presence of n.
%H A088371 Alois P. Heinz, <a href="/A088371/b088371.txt">Table of n, a(n) for n = 1..16384</a> (first 1024 terms from Paul D. Hanna)
%F A088371 a(2^n)=2^n.
%F A088371 a(2*n-1)=a(n), a(2*n)=n+a(n).
%e A088371 A088370 rows: {1}, {1, 2}, {1, 3, 2}, {1, 3, 2, 4}, {1, 5, 3, 2, 4}, {1, 5, 3, 2, 6, 4}, {1, 5, 3, 7, 2, 6, 4}, ...
%e A088371 Row 5 is formed from row 3, {1, 3, 2} and row 2, {1, 2}: {1, 5, 3, 2, 4} = {1*2-1, 3*2-1, 2*2-1}|{1*2, 2*2}.
%e A088371 This sequence can form the following irregular triangle:
%e A088371 1;
%e A088371 2;
%e A088371 2, 4;
%e A088371 2, 5, 4, 8;
%e A088371 2, 7, 5, 11, 4, 11, 8, 16;
%e A088371 2, 11, 7, 17, 5, 16, 11, 23, 4, 17, 11, 25, 8, 23, 16, 32;
%e A088371 2, 19, 11, 29, 7, 26, 17, 37, 5, 26, 16, 38, 11, 34, 23, 47, 4, 29, 17, 43, 11, 38, 25, 53, 8, 37, 23, 53, 16, 47, 32, 64;
%e A088371 2, 35, 19, 53, 11, 46, 29, 65, 7, 44, 26, 64, 17, 56, 37, 77, 5, 46, 26, 68, 16, 59, 38, 82, 11, 56, 34, 80, 23, 70, 47, 95, 4, 53, 29, 79, 17, 68, 43, 95, 11, 64, 38, 92, 25, 80, 53, 109, 8, 65, 37, 95, 23, 82, 53, 113, 16, 77, 47, 109, 32, 95, 64, 128; ...
%p A088371 a:= proc(n) option remember; `if`(n<2, n,
%p A088371      `if`(n::odd, a(n/2+1/2), a(n/2)+n/2))
%p A088371     end:
%p A088371 seq(a(n), n=1..128);  # _Alois P. Heinz_, Jul 26 2019
%o A088371 (PARI) L=100; b=vector(L,k,k); c=vector(L); a=vector(L,k,b); a[1]=[1]; print1(1,","); for(n=2,L,i=floor((n+1)/2); j=floor(n/2); b=a[i]; b=vector(i,k,b[k]=2*b[k]-1 ); c=a[j]; c=vector(j,k,c[k]=2*c[k]); a[n]=concat(b,c); t=a[n]; for(k=1,n,if(t[k]==n,print1(k,","); k=n+1)))
%Y A088371 Cf. A088370 (triangle).
%K A088371 nonn
%O A088371 1,2
%A A088371 _Paul D. Hanna_, Sep 28 2003