login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A054424 expanded to normal triangular array, with zeros at those (x,y) where x and y are not relatively prime.
10

%I #13 Sep 07 2023 04:43:03

%S 1,2,3,4,0,7,8,5,6,15,16,0,0,0,31,32,9,11,12,14,63,64,0,10,0,13,0,127,

%T 128,17,0,23,24,0,30,255,256,0,19,0,0,0,28,0,511,512,33,18,20,47,48,

%U 27,29,62,1023,1024,0,0,0,22,0,25,0,0,0,2047,2048,65,35,39,21,95,96,26,56

%N A054424 expanded to normal triangular array, with zeros at those (x,y) where x and y are not relatively prime.

%p position_in_whole_SB_tree_or_zero := (n,m) -> `if`((1 = gcd(n,m)),(frac2position_in_whole_SB_tree(n/m)),(0));

%p A054424_as_array := n -> position_in_whole_SB_tree_or_zero( ((n-((trinv(n)*(trinv(n)-1))/2))+1), ((((trinv(n)-1)*(((1/2)*trinv(n))+1))-n)+1) );

%p trinv := n -> floor((1+sqrt(1+8*n))/2); # Gives integral inverses to the triangular numbers

%Y Cf. A054424, A054431.

%K nonn,tabl,nice

%O 1,2

%A _Antti Karttunen_