login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A002262 Integers 0 to n followed by integers 0 to n+1 etc. 120
0, 0, 1, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 1, 2, 3, 4, 5 (list; table; graph; refs; listen; history; internal format)
OFFSET

0,6

COMMENTS

a(n) = n - the largest triangular number <= n. - Amarnath Murthy (amarnath_murthy(AT)yahoo.com), Dec 25 2001

The PARI functions t1, t2 can be used to read a square array T(n,k) (n >= 0, k >= 0) by antidiagonals downwards: n -> T(t1(n), t2(n)). - Michael Somos, Aug 23, 2002

Values x of unique solution pair (x,y) to equation T(x+y) + x = n, where T(k)=A000217(k). - Lekraj Beedassy (blekraj(AT)yahoo.com), Aug 21 2004

a(A000217(n)) = 0; a(A000096(n)) = n. [Reinhard Zumkeller, May 20 2009]

Concatenation of the set representation of ordinal numbers, where the

  n_th ordinal number is represented by the set of all ordinals preceding

  n, 0 being represented by the empty set. - Daniel Forgues, April 27, 2011

An integer sequence is nonnegative if and only if it is a subsequence of this sequence. [Charles R Greathouse IV, Sep 21 2011]

a(A195678(n)) = A000040(n) and a(m) <> A000040(n) for m < A195678(n), an example of the preceding comment. [Reinhard Zumkeller, Sep 23 2011]

LINKS

M. Somos, Sequences used for indexing triangular or square arrays

FORMULA

a(n) = (n-((trinv(n)*(trinv(n)-1))/2)); trinv := n -> floor((1+sqrt(1+8*n))/2) (cf. A002024); # Gives integral inverses of triangular numbers.

a(n)=n-A000217(A003056(n))=n-A057944(n). - Lekraj Beedassy (blekraj(AT)yahoo.com), Aug 21 2004

a(n) = A140129(A023758(n+2)). - Reinhard Zumkeller, May 14 2008

a(n)=f(n,1) with f(n,m) = if n<m then n else f(n-m,m+1). [From Reinhard Zumkeller, May 20 2009]

EXAMPLE

[Daniel Forgues, April 27, 2011] (Start)

  Examples of set-theoretic representation of ordinal numbers:

  0: {}

  1: {0} = {{}}

  2: {0, 1} = {0, {0}} = {{}, {{}}}

  3: {0, 1, 2} = {{}, {0}, {0, 1}} = ... = {{}, {{}}, {{}, {{}}}} (End)

MAPLE

seq(seq(i, i=0..n), n=0..12); # Peter Luschny, Sep 22 2011

A002262 := n -> n - binomial(floor((1/2)+sqrt(2*(1+n))), 2);

MATHEMATICA

m[n_] := Floor[(-1 + Sqrt[8 n - 7])/2]

b[n_] := n - m[n] (m[n] + 1)/2

Table[m[n], {n, 1, 100}]     (* A003056 *)

Table[b[n], {n, 1, 100}]     (* A002260 *)

Table[b[n] - 1, {n, 1, 100}] (* A002262 *)

(* Clark Kimberling, Jun 14 2011 *)

Flatten[Table[k, {n, 0, 12}, {k, 0, n}]] (* Alonso del Arte, Sep 21 2011 *)

PROG

(PARI) a(n)=n-binomial(round(sqrt(2+2*n)), 2)

(PARI) t1(n)=n-binomial(floor(1/2+sqrt(2+2*n)), 2) /* A002262, this sequence */

(PARI) t2(n)=binomial(floor(3/2+sqrt(2+2*n)), 2)-(n+1) /* A025581, cf. comment by Somos for reading arrays by antidiagonals */

(PARI) concat(vector(13, n, vector(n, i, i-1)))  \\ M. F. Hasler, Sep 21 2011

(Haskell)

a002262 n = a002262_list !! n

a002262_list = f [] where f ts = ts ++ f (ts ++ [length ts])

-- Reinhard Zumkeller, Mar 07 2011

CROSSREFS

A002260(n)=1+a(n).

Cf. A025675, A025682, A025691, A002024, A048645, A004736, A025581. As a sequence, essentially same as A048151.

A053645, A053186. [From Reinhard Zumkeller, May 20 2009]

Cf. A056558, A127324. - Peter Luschny, Sep 22 2011

Sequence in context: A025690 A025668 A048151 * A025675 A025682 A025691

Adjacent sequences:  A002259 A002260 A002261 * A002263 A002264 A002265

KEYWORD

nonn,tabl,easy,nice

AUTHOR

Angele Hamel (amh(AT)maths.soton.ac.uk)

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 15 15:20 EST 2012. Contains 205823 sequences.