This site is supported by donations to The OEIS Foundation.

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A035506 Stolarsky array read by antidiagonals. 52

%I

%S 1,2,4,3,6,7,5,10,11,9,8,16,18,15,12,13,26,29,24,19,14,21,42,47,39,31,

%T 23,17,34,68,76,63,50,37,28,20,55,110,123,102,81,60,45,32,22,89,178,

%U 199,165,131,97,73,52,36,25,144,288,322,267,212,157,118,84,58,40,27,233,466,521,432,343,254,191,136,94,65,44,30

%N Stolarsky array read by antidiagonals.

%C Inverse of sequence A064357 considered as a permutation of the positive integers. - _Howard A. Landman_, Sep 25 2001

%C PARI-GP script gives general solution for the Stolarsky array in square array form by row,column. Increase the default precision to compute large values in the array. - Randall L. Rathbun (randallr(AT)abac.com), Jan 25 2002

%C The Stolarsky array is the dispersion of the sequence s given by s(n)=(integer nearest n*x), where x=(golden ratio). For a discussion of dispersions, see A191426.

%C See A098861 for the row in which is a given number. - _M. F. Hasler_, Nov 05 2014

%D C. Kimberling, "Stolarsky interspersions," Ars Combinatoria 39 (1995) 129-138.

%H Alois P. Heinz, <a href="/A035506/b035506.txt">Antidiagonals n = 0..140, flattened</a>

%H C. Kimberling, <a href="http://faculty.evansville.edu/ck6/integer/intersp.html">Interspersions</a>

%H Clark Kimberling, <a href="http://dx.doi.org/10.1090/S0002-9939-1993-1111434-0">Interspersions and dispersions</a>, Proceedings of the American Mathematical Society, 117 (1993) 313-321.

%H N. J. A. Sloane, <a href="/classic.html#WYTH">Classic Sequences</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/StolarskyArray.html">Stolarsky arrays</a>

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%F T(1,k) = 2*T(0,k+1); T(3,k) = 3*T(0,k+2). - _M. F. Hasler_, Nov 05 2014

%e Top left corner of the array is:

%e 1 2 3 5 8 13 21 34 55

%e 4 6 10 16 26 42 68 110 178

%e 7 11 18 29 47 76 123 119 322

%e 9 15 24 39 63 102 165 267 432

%e 12 19 31 50 81 131 212 343 555

%e 14 23 37 60 97 157 254 411 665

%p A:= proc(n, k) local t, a, b; t:= (1+sqrt(5))/2; a:= floor(n*(t+1)+1 +t/2); b:= round(a*t); (Matrix([[b, a]]). Matrix([[1, 1], [1, 0]])^k) [1, 2] end: seq(seq(A (n, d-n), n=0..d), d=0..10); # _Alois P. Heinz_, Aug 17 2008

%t (* program generates the dispersion array T of the complement of increasing sequence f[n] *)

%t r = 40; r1 = 12; (* r=# rows of T, r1=# rows to show *)

%t c = 40; c1 = 12; (* c=# cols of T, c1=# cols to show *)

%t x = GoldenRatio; f[n_] := Floor[n*x + 1/2]

%t (* f(n) is complement of column 1 *)

%t mex[list_] := NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1, Length[Union[list]]]

%t rows = {NestList[f, 1, c]};

%t Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}];

%t t[i_, j_] := rows[[i, j]];

%t TableForm[Table[t[i, j], {i, 1, 10}, {j, 1, 10}]]

%t (* t=Stolarsky array, A035506 *)

%t Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]]

%t (* Stolarsky array as a sequence *)

%t (* Program by _Peter J. C. Moses_, Jun 01 2011 *)

%o (PARI) {Stolarsky(r,c)= tau=(1+sqrt(5))/2; a=floor(r*(1+tau)-tau/2); b=round(a*tau); if(c==1,a, if(c==2,b, for(i=1,c-2,d=a+b; a=b; b=d; ); d))}

%Y Cf. A035513 (Wythoff array), A035507 (inverse Stolarksy array), A191426.

%K nonn,tabl,easy,nice

%O 0,2

%A _N. J. A. Sloane_

%E More terms from Larry Reeves (larryr(AT)acm.org), Sep 27 2000

%E Extended (terms, Mathematica, example) by _Clark Kimberling_, Jun 03 2011

%E Example corrected by _M. F. Hasler_, Nov 05 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified January 18 03:13 EST 2019. Contains 319260 sequences. (Running on oeis4.)