login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A007071 First row of 2-shuffle of spectral array W( sqrt 2 ).
(Formerly M0616)
1

%I M0616 #22 Dec 21 2023 10:23:23

%S 1,2,3,5,6,7,9,11,12,13,15,16,17,19,21,22,23,25,26,27,29,30,31,33,35,

%T 36,37,39,40,41,43,45,46,47,49,50,51,53,54,55,57,59,60,61,63,64,65,67,

%U 69,70,71,73,74,75,77,79,80,81,83,84,85,87,88,89,91,93,94,95,97,98,99,101

%N First row of 2-shuffle of spectral array W( sqrt 2 ).

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H Aviezri S. Fraenkel and Clark Kimberling, <a href="http://dx.doi.org/10.1016/0012-365X(94)90259-3">Generalized Wythoff arrays, shuffles and interspersions</a>, Discr. Math. 126 (1-3) (1994) 137-149. [From _R. J. Mathar_, Aug 17 2009]

%p Digits := 200 : WythSpec := proc(n,x) floor(n*x) ; end: A001951 := proc(n) WythSpec(n,sqrt(2)) ; end: A001952 := proc(n) A001951(n)+2*n; end: Wsqrt2 := proc(i,j) option remember ; if j = 1 then A001951(A001951(i)) ; elif j = 2 then A001952(A001951(i)) ; elif type(j,'odd') then A001951(procname(i,j-1)) ; else A001952(procname(i,j-2)) ; fi; end: A007071 := proc(n) option remember ; local a; if n = 1 then 1; else for a from procname(n-1)+1 do for k from 1 do if Wsqrt2(k,1) = a then RETURN(a); elif Wsqrt2(k,1) > a then break; fi; od: for k from 1 do if Wsqrt2(k,2) = a then RETURN(a); elif Wsqrt2(k,2) > a then break; fi; od: od: fi; end: seq(A007071(n),n=1..100) ; # _R. J. Mathar_, Aug 17 2009

%t WythSpec[n_, x_] := Floor[n*x] ;

%t A001951[n_] := WythSpec[n, Sqrt[2]];

%t A001952[n_] := A001951[n] + 2n;

%t WSqrt2[i_, j_] := WSqrt2[i, j] = Which[j == 1, A001951[A001951[i]], j == 2, A001952[A001951[i]], OddQ[j], A001951[WSqrt2[i, j-1]], True, A001952[WSqrt2[i, j-2]]];

%t A007071[n_] := A007071[n] = Module[{a, k}, If[n == 1, 1, For[a = A007071[n-1]+1, True, a++, For[k = 1, True, k++, If[WSqrt2[k, 1] == a, Return[a], If[WSqrt2[k, 1] > a, Break[]]]]; For[k = 1, True, k++, If[WSqrt2[k, 2] == a, Return[a], If[WSqrt2[k, 2] > a, Break[]]]]]]];

%t Table[A007071[n], {n, 1, 72}] (* _Jean-François Alcover_, Dec 20 2023, after _R. J. Mathar_ *)

%K nonn,easy

%O 1,2

%A _N. J. A. Sloane_, _Mira Bernstein_

%E More terms from _R. J. Mathar_, Aug 17 2009

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 11:39 EDT 2024. Contains 371969 sequences. (Running on oeis4.)