|
|
A007071
|
|
First row of 2-shuffle of spectral array W( sqrt 2 ).
(Formerly M0616)
|
|
1
|
|
|
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, 36, 37, 39, 40, 41, 43, 45, 46, 47, 49, 50, 51, 53, 54, 55, 57, 59, 60, 61, 63, 64, 65, 67, 69, 70, 71, 73, 74, 75, 77, 79, 80, 81, 83, 84, 85, 87, 88, 89, 91, 93, 94, 95, 97, 98, 99, 101
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
REFERENCES
|
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
|
|
LINKS
|
|
|
MAPLE
|
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
|
|
MATHEMATICA
|
WythSpec[n_, x_] := Floor[n*x] ;
A001951[n_] := WythSpec[n, Sqrt[2]];
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]]];
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[]]]]]]];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|