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!)
A035214 2 followed by a run of n 1's. 5
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
Mohammad K. Azarian, Remarks and Conjectures Regarding Combinatorics of Discrete Partial Functions, Int'l Math. Forum (2022) Vol. 17, No. 3, 129-141. See Conjecture 4.5, p. 137.
FORMULA
a(n) = 2 if n is a triangular number, otherwise 1.
Equals A010054(n) + 1.
a(n) = floor((3-cos(Pi*sqrt(8*n+1)))/2). - Carl R. White, Mar 18 2006
MATHEMATICA
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 *)
PROG
(PARI) for(n=0, 100, print1(floor((3-cos(Pi*sqrt(8*n+1)))/2), ", ")) \\ G. C. Greubel, May 14 2017
(PARI) a(n) = issquare(n<<3 + 1) + 1; \\ Kevin Ryde, Aug 03 2022
CROSSREFS
Sequence in context: A342263 A109495 A164295 * A071292 A088569 A246144
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Typo corrected by Neven Juric, Jan 10 2009
STATUS
approved

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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)