%I #23 Nov 10 2022 07:40:43
%S 2,2,1,2,1,1,2,1,1,1,2,1,1,1,1,2,1,1,1,1,1,2,1,1,1,1,1,1,2,1,1,1,1,1,
%T 1,1,2,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,2,1,
%U 1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1
%N 2 followed by a run of n 1's.
%H G. C. Greubel, <a href="/A035214/b035214.txt">Table of n, a(n) for n = 0..10000</a>
%H Mohammad K. Azarian, <a href="https://doi.org/10.12988/imf.2022.912321">Remarks and Conjectures Regarding Combinatorics of Discrete Partial Functions</a>, Int'l Math. Forum (2022) Vol. 17, No. 3, 129-141. See Conjecture 4.5, p. 137.
%F a(n) = 2 if n is a triangular number, otherwise 1.
%F Equals A010054(n) + 1.
%F a(n) = floor((3-cos(Pi*sqrt(8*n+1)))/2). - _Carl R. White_, Mar 18 2006
%t Table[(SquaresR[1, 8*n + 1] + 2)/2, {n, 0, 100}] (* or *) Table[Floor[(3 - Cos[Pi*Sqrt[8*n + 1]])/2], {n,0,100}] (* _G. C. Greubel_, May 14 2017 *)
%o (PARI) for(n=0,100, print1(floor((3-cos(Pi*sqrt(8*n+1)))/2), ", ")) \\ _G. C. Greubel_, May 14 2017
%o (PARI) a(n) = issquare(n<<3 + 1) + 1; \\ _Kevin Ryde_, Aug 03 2022
%Y Cf. A010054, A035253, A035254.
%K nonn,easy
%O 0,1
%A _N. J. A. Sloane_
%E Typo corrected by Neven Juric, Jan 10 2009