login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A004202 Skip 1, take 1, skip 2, take 2, skip 3, take 3, etc. 11

%I

%S 2,5,6,10,11,12,17,18,19,20,26,27,28,29,30,37,38,39,40,41,42,50,51,52,

%T 53,54,55,56,65,66,67,68,69,70,71,72,82,83,84,85,86,87,88,89,90,101,

%U 102,103,104,105,106,107,108,109,110,122,123,124,125,126,127,128,129,130,131,132

%N Skip 1, take 1, skip 2, take 2, skip 3, take 3, etc.

%C a(n) are the numbers satisfying m < sqrt(a(n)) < m + 0.5 for some integer m. - _Floor van Lamoen_, Jul 24 2001

%C a(A000217(n)) = A002378(n). [_Reinhard Zumkeller_, Feb 12 2011]

%C Complement of A004201. Upper s(n)-Wythoff sequence (as defined in A184117), for s(n)=A002024(n)=floor[1/2+sqrt(2n)]. I.e., A004202(n) = A002024(n) + A004201(n), with A004201(1)=1 and for n>1, A004201(n) = least positive integer not yet in (A004201(1..n-1) union A004202(1..n-1)). - _M. F. Hasler_ (following observations from _R. J. Mathar_), Feb 13 2011

%C Positions of record values in A256188 that are greater than 1: A014132(n) = A256188(a(n)). - _Reinhard Zumkeller_, Mar 26 2015

%H Reinhard Zumkeller, <a href="/A004202/b004202.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = n + A000217(A002024(n)). - _M. F. Hasler_, Feb 13 2011

%F T(n, k) = n^2 + k, for n>=1, k>=1 as a triangular array. a(n) = n + A127739(n). - _Michael Somos_, May 03 2019

%e Interpretation as Wythoff sequence (from _Clark Kimberling_):

%e s = (1,2,2,3,3,3,4,4,4,4...) = A002024 (n n's);

%e a = (1,3,4,7,8,9,13,14,...) = A004201 = least number > 0 not yet in a or b;

%e b = (2,5,6,10,11,12,17,18,...) = A004202 = a+s.

%e From _Michael Somos_, May 03 2019: (Start)

%e As a triangular array

%e 2;

%e 5, 6;

%e 10, 11, 12;

%e 17, 18, 19, 20;

%e (End)

%t a = Table[n, {n, 1, 210} ]; b = {}; Do[a = Drop[a, {1, n} ]; b = Append[b, Take[a, {1, n} ]]; a = Drop[a, {1, n} ], {n, 1, 14} ]; Flatten[b]

%t a[ n_] := If[ n < 1, 0, With[{m = Round@Sqrt[2 n]}, n + m (m + 1)/2]]; (* _Michael Somos_, May 03 2019 *)

%t Take[#,(-Length[#])/2]&/@Module[{nn=20},TakeList[Range[ nn+nn^2],2*Range[ nn]]]//Flatten (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, May 13 2019 *)

%o (Haskell)

%o a004202 n = a004202_list !! (n-1)

%o a004202_list = skipTake 1 [1..] where

%o skipTake k xs = take k (drop k xs) ++ skipTake (k + 1) (drop (2*k) xs

%o -- _Reinhard Zumkeller_, Feb 12 2011

%o (PARI) A004202(n) = n+0+(n=(sqrtint(8*n-7)+1)\2)*(n+1)\2 \\ _M. F. Hasler_, Feb 13 2011

%o (PARI) {a(n) = my(m); if( n<1, 0, m=round(sqrt(2*n)); n + m*(m+1)/2)}; /* _Michael Somos_, May 03 2019 */

%Y Cf. A004201, A007606, A064801.

%Y Cf. A014132, A256188, A127739.

%K nonn,tabl

%O 1,1

%A Alexander Stasinski

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 3 20:41 EDT 2020. Contains 335418 sequences. (Running on oeis4.)