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!)
A004738 Concatenation of sequences (1,2,...,n-1,n,n-1,...,2) for n >= 2. 12
1, 2, 1, 2, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 10, 9 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Also concatenation of sequences n,n-1,...,2,1,2,...,n-1,n.

Table T(n,k) n, k > 0, T(n,k) = n-k+1, if n >= k, T(n,k) = k-n+1, if n < k.  Table read by sides of squares from T(1,n) to T(n,n), then from T(n,n) to T(n,1). General case A209301. Let m be a natural number. The first column of the table T(n,1) is the sequence of the natural numbers A000027. In all columns with number k (k > 1) the segment with the length of (k-1): {m+k-2, m+k-3, ..., m} shifts the sequence A000027. For m=1 the result is A004739, for m=2 the result is A004738, for m=3 the result is A209301. - Boris Putievskiy, Jan 24 2013

REFERENCES

F. Smarandache, "Numerical Sequences", University of Craiova, 1975; [ See Arizona State University, Special Collection, Tempe, AZ, USA ].

LINKS

Table of n, a(n) for n=1..103.

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

F. Smarandache, Collected Papers, Vol. II

F. Smarandache, Sequences of Numbers Involved in Unsolved Problems.

Eric Weisstein's World of Mathematics, Smarandache Sequences

FORMULA

a(n) = floor(sqrt(n) + 1/2) + 1 - abs(n - 1 - (floor(sqrt(n) + 1/2))^2). - Benoit Cloitre, Feb 08 2003

From Boris Putievskiy, Jan 24 2013: (Start)

For the general case, a(n) = m*v + (2*v-1)*(t*t-n) + t, where t = floor((sqrt(n) - 1/2) + 1 and v = floor((n-1)/t) - t + 1.

For m=2, a(n) = 2*v + (2*v-1)*(t*t-n)+t, where t = floor((sqrt(n) - 1/2) + 1 and v = floor((n-1)/t) - t + 1. (End)

EXAMPLE

From Boris Putievskiy, Jan 24 2013: (Start)

The start of the sequence as table:

  1, 2, 3, 4, 5, 6, 7, ...

  2, 1, 2, 3, 4, 5, 6, ...

  3, 2, 1, 2, 3, 4, 5, ...

  4, 3, 2, 1, 2, 3, 4, ...

  5, 4, 3, 2, 1, 2, 3, ...

  6, 5, 4, 3, 2, 1, 2, ...

  7, 6, 5, 4, 3, 2, 1, ...

  ...

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

  1;

  2, 1, 2;

  3, 2, 1, 2, 3;

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

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

  6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6;

  7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7;

  ...

Row number r contains 2*r - 1 numbers: r, r-1, ..., 1, 2, ..., r. (End)

MAPLE

A004738 := proc(n)

    local tri ;

    tri := floor(sqrt(n)+1/2) ;

    tri+1-abs(n-1-tri^2) ;

end proc:

seq(A004738(n), n=1..30) ; #R. J. Mathar, Feb 14 2019

PROG

(PARI) a(n)= floor(sqrt(n)+1/2)+1-abs(n-1-(floor(sqrt(n)+1/2)-1/2)^2)

CROSSREFS

Cf. A004737, A004739, A187760, A079813, A209301.

Sequence in context: A088696 A257249 A267108 * A043554 A005811 A008342

Adjacent sequences:  A004735 A004736 A004737 * A004739 A004740 A004741

KEYWORD

nonn,easy

AUTHOR

R. Muller

EXTENSIONS

More terms from Patrick De Geest, Jun 15 1998

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 February 18 04:48 EST 2020. Contains 332011 sequences. (Running on oeis4.)