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.

Showing 1-2 of 2 results.

A035506 Stolarsky array read by antidiagonals.

Original entry on oeis.org

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, 23, 17, 34, 68, 76, 63, 50, 37, 28, 20, 55, 110, 123, 102, 81, 60, 45, 32, 22, 89, 178, 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
Offset: 0

Views

Author

Keywords

Comments

Inverse of sequence A064357 considered as a permutation of the positive integers. - Howard A. Landman, Sep 25 2001
The PARI/GP script gives a 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, Jan 25 2002
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.
See A098861 for the row in which is a given number. - M. F. Hasler, Nov 05 2014
Named after the American mathematician Kenneth Barry Stolarsky. - Amiram Eldar, Jun 11 2021

Examples

			Top left corner of the array is:
   1    2    3    5    8   13   21   34   55
   4    6   10   16   26   42   68  110  178
   7   11   18   29   47   76  123  119  322
   9   15   24   39   63  102  165  267  432
  12   19   31   50   81  131  212  343  555
  14   23   37   60   97  157  254  411  665
		

References

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

Crossrefs

Cf. A035513 (Wythoff array), A035507 (inverse Stolarsky array), A191426.
Main diagonal gives A035489.

Programs

  • Maple
    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
  • Mathematica
    (* program generates the dispersion array T of the complement of increasing sequence f[n] *)
    r = 40; r1 = 12; (* r=# rows of T, r1=# rows to show *)
    c = 40; c1 = 12; (* c=# cols of T, c1=# cols to show *)
    x = GoldenRatio; f[n_] := Floor[n*x + 1/2]
    (* f(n) is complement of column 1 *)
    mex[list_] := NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1, Length[Union[list]]]
    rows = {NestList[f, 1, c]};
    Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}];
    t[i_, j_] := rows[[i, j]];
    TableForm[Table[t[i, j], {i, 1, 10}, {j, 1, 10}]]
    (* t=Stolarsky array, A035506 *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]]
    (* Stolarsky array as a sequence *)
    (* Program by Peter J. C. Moses, Jun 01 2011 *)
    (* Second program: *)
    A[n_, k_] := Module[{t, a, b}, t = (1+Sqrt[5])/2; a = Floor[n*(t+1)+1+t/2]; b = Round[a*t]; ({b, a}.MatrixPower[{{1, 1}, {1, 0}}, k])[[2]]];
    Table[A[n, d-n], {d, 0, 11}, {n, 0, d}] // Flatten (* Jean-François Alcover, Mar 22 2023, after Alois P. Heinz *)
  • 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))} \\ Randall L Rathbun, Jan 25 2002

Formula

T(1,k) = 2*T(0,k+1); T(3,k) = 3*T(0,k+2). - M. F. Hasler, Nov 05 2014

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Sep 27 2000
Extended (terms, Mathematica, example) by Clark Kimberling, Jun 03 2011
Example corrected by M. F. Hasler, Nov 05 2014

A133299 Fractal sequence of the Stolarsky array, A035506.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 3, 1, 4, 2, 3, 5, 1, 6, 4, 2, 7, 3, 5, 8, 1, 9, 6, 4, 10, 2, 11, 7, 3, 12, 5, 8, 13, 1, 14, 9, 6, 15, 4, 10, 16, 2, 17, 11, 7, 18, 3, 19, 12, 5, 20, 8, 13, 21, 1, 22, 14, 9, 23, 6, 15, 24, 4, 25, 10, 16, 26, 2, 27, 17, 11, 28, 7, 18, 29, 3, 30, 19, 12, 31, 5, 32, 20, 8, 33
Offset: 1

Views

Author

Gregg Whisler, Oct 17 2007

Keywords

Examples

			As a fractal sequence, if each first occurrence of each n is deleted, then the resulting sequence is the same as the original. For the fractal sequence of the Wythoff array, see A003603.
		

References

  • D. R. Morrison, A Stolarsky Array of Wythoff Pairs, A Collection of Manuscripts Related to the Fibonacci Sequence, edited by V. E. Hoggatt Jr., M. Bicknell-Johnson, published by The Fibonacci Association, (1980) pp. 134-136. - Casey Mongoven, Sep 10 2011

Crossrefs

Programs

  • Maple
    A035506 := proc(r,c) local tau,a,b,d,i ; tau := (1+sqrt(5))/2 ; a := floor( r*(1+tau)-tau/2) ; b := round(a*tau) ; if c = 1 then RETURN(a) ; else if c =2 then RETURN(b) ; else for i from 1 to c-2 do d := a+b ; a := b; b := d ; od: RETURN(d) ; fi ; fi ; end:
    A133299 := proc(n) local row,col ; for row from 1 do for col from 1 do stola := A035506(row,col) ; if stola = n then RETURN(row) ; elif stola > n then break ; fi ; od: od: end:
    seq(A133299(n),n=1..100) ; # R. J. Mathar, Nov 21 2007
  • Mathematica
    A035506[r_, c_] := Module[{tau = GoldenRatio, a, b, d, i}, a = Floor[r*(1 + tau) - tau/2]; b = Round[a*tau]; If[c == 1, Return[a], If[c == 2, Return[b], For[i = 1, i <= c - 2, i++, d = a + b; a = b; b = d]; Return[d]]]];
    a[n_] := Module[{row, col}, For[row = 1, True, row++, For[col = 1, True, col++, stola = A035506[row, col] ; If[stola == n, Return[row], If[stola > n, Break[]]]]]];
    Array[a, 100] (* Jean-François Alcover, Mar 22 2020, after R. J. Mathar *)

Formula

A035506(a(n),k)=n for some k>=1. - R. J. Mathar, Nov 21 2007
a(n) = 1+A098861(n). - Casey Mongoven, Sep 10 2011

Extensions

Better definition from R. J. Mathar, Oct 22 2007
More terms from R. J. Mathar, Nov 21 2007
Definition now conforms to others; comment replaced - Clark Kimberling, Oct 29 2009
Showing 1-2 of 2 results.