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

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A194195 First inverse function (numbers of rows) for pairing function A060734 2
1, 2, 2, 1, 3, 3, 3, 2, 1, 4, 4, 4, 4, 3, 2, 1, 5, 5, 5, 5, 5, 4, 3, 2, 1, 6, 6, 6, 6, 6, 6, 5, 4, 3, 2, 1, 7, 7, 7, 7, 7, 7, 7, 6, 5, 4, 3, 2, 1, 8, 8, 8, 8, 8, 8, 8, 8, 7, 6, 5, 4, 3, 2, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

The  sequence is the second inverse function (numbers of columns) for pairing function A060736.

LINKS

Boris Putievskiy, Rows n = 1..140 of triangle, flattened

Boris Putievskiy, Transformations Integer Sequences And Pairing Functions arXiv:1212.2732 [math.CO], 2012.

FORMULA

a(n) = min{t; t^2 - n + 1}, where t=floor(sqrt(n-1))+1.

EXAMPLE

The start of the sequence as triangle array read by rows:

1;

2,2,1;

3,3,3,2,1;

4,4,4,4,3,2,1;

. . .

Row number k contains 2k-1 numbers k,k,...k,k-1,k-2,...1 (k times repetition "k").

MATHEMATICA

f[n_]:=Module[{t=Floor[Sqrt[n-1]]+1}, Min[t, t^2-n+1]]; Array[f, 80] (* Harvey P. Dale, Dec 31 2012 *)

PROG

(Python)

t=int(math.sqrt(n-1)) +1

i=min(t, t**2-n+1)

CROSSREFS

Cf. A060734, A060736,  A220603, A220604

Sequence in context: A097094 A210870 A104726 * A164999 A292030 A162909

Adjacent sequences:  A194192 A194193 A194194 * A194196 A194197 A194198

KEYWORD

nonn,tabf

AUTHOR

Boris Putievskiy, Dec 21 2012

STATUS

approved

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 November 30 11:07 EST 2021. Contains 349419 sequences. (Running on oeis4.)