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!)
A004737 Concatenation of sequences (1,2,...,n-1,n,n-1,...,1) for n >= 1. 36

%I #119 Jan 24 2024 07:58:32

%S 1,1,2,1,1,2,3,2,1,1,2,3,4,3,2,1,1,2,3,4,5,4,3,2,1,1,2,3,4,5,6,5,4,3,

%T 2,1,1,2,3,4,5,6,7,6,5,4,3,2,1,1,2,3,4,5,6,7,8,7,6,5,4,3,2,1,1,2,3,4,

%U 5,6,7,8,9,8,7,6,5,4,3,2,1,1,2,3,4,5,6,7,8,9,10,9,8,7,6,5,4,3,2,1,1,2,3,4,5

%N Concatenation of sequences (1,2,...,n-1,n,n-1,...,1) for n >= 1.

%C The following sequences all have the same parity: A004737, A006590, A027052, A071028, A071797, A078358, A078446. - _Jeremy Gardiner_, Mar 16 2003

%C The ordinal transform of a sequence b_0, b_1, b_2, ... is the sequence a_0, a_1, a_2, ... where a_n is the number of times b_n has occurred in {b_0 ... b_n}.

%C From _Artur Jasinski_, Mar 07 2010: (Start)

%C This sequence is the even subset of A003983 for odd p=2,4,6,8,....

%C For the odd subset of A003983 see A004739. (End)

%C From _Gary W. Adamson_, Mar 30 2010: (Start)

%C Given the triangle rows: (1; 1,2,1; 1,2,3,2,1; ...) as polcoeff with offset 0:

%C q = (1 + 2x + x^2), r = (1 + 2x + 3x^2 + 2x^3 +x^4), etc.; then

%C (1 + 2x + 3x^2 + ...) = q(x) * q(x^2) * q(x^4) * q(x^8) * ...

%C ..................... = r(x) * r(x^3) * r(x^9) * r(x^27) * ...

%C ..................... = s(x) * s(x^4) * s(x^16)* s(x^64) * ...

%C ... (End)

%C From _L. Edson Jeffery_, Jan 13 2012: (Start)

%C Let U_1(t)=1, U_2(t)=2*t, and U_r(t)=2*t*U_(r-1)(t)-U(r-2)(t), r>2, be Chebyshev polynomials of the second kind. For q>1 an integer, let N=2*q and x_k=cos((2*k-1)*Pi/N), and define the ordered column vectors V_k=[U_k(x_1), U_k(x_2), ..., U_k(x_q)]^T, k=1,...,q, where A^T denotes the transpose of matrix A. Let E_N=[V_1, V_2, ..., V_q] be the q X q matrix formed from the ordered components of the V_k. E_N contains the joint spectra of the Danzer basis (see [Jeffery]) associated with N. Let M_N=(1/q)*[E_N]^T*E_N. For the trivial case q=1, let M_2=[1]. CONJECTURE: E_N and M_N are always integral and symmetric, with M_N having diagonal entries {1,2,...} beginning at entries 1,j (j odd) in the first row and i,1 (i odd) in the first column and with zeros elsewhere. If N is allowed to increase without bound, and assuming the conjecture is true, then triangle A004737 emerges in its entirety from the successive antidiagonals containing those entries [M_N]_(i,j) such that i+j=2*v, for each v in {1,2,...,floor((q+1)/2)}. For example, for N=18 and q=9 (omitting the zeros for clarity),

%C M_18=[

%C (1 1 1 1 1);

%C ( 2 2 2 2 );

%C (1 3 3 3 3);

%C ( 2 4 4 4 );

%C (1 3 5 5 5);

%C ( 2 4 6 6 );

%C (1 3 5 7 7);

%C ( 2 4 6 8 );

%C (1 3 5 7 9)],

%C from which the first five rows of the sequence can be read off in succession. (End)

%C T(n,k) = min(n,k). The order of the list T(n,k) is by sides of squares from T(1,n) to T(n,n), then from T(n,n) to T(n,1). - _Boris Putievskiy_, Jan 13 2013

%C Expanded form of T(2,k) k=0,1,...,2m for ascending m-nomial triangles. - _Bob Selcoe_, Feb 07 2014

%C Terms in the first nine rows of the triangle can be duplicated by performing (111...)^2 with <= nine ones. By way of example, (11111)^2 = 123454321. - _Gary W. Adamson_, Mar 27 2015

%D Miklós Laczkovich, Conjecture and Proof, TypoTex, Budapest, 1998. See Chapter 10.

%D F. Smarandache, "Numerical Sequences", University of Craiova, 1975.

%H Reinhard Zumkeller, <a href="/A004737/b004737.txt">Table of n, a(n) for n = 1..10000</a>

%H Jerry Brown et al., <a href="http://dx.doi.org/10.1111/j.1949-8594.1997.tb17373.x">Problem 4619</a>, School Science and Mathematics, USA, Vol. 97 (4), 1997, pp. 221-222.

%H L. E. Jeffery, <a href="/wiki/User:L._Edson_Jeffery/Unit-Primitive_Matrices">Danzer matrices (definitions)</a>

%H Boris Putievskiy, <a href="http://arxiv.org/abs/1212.2732">Transformations [of] Integer Sequences And Pairing Functions</a> arXiv:1212.2732 [math.CO], 2012.

%H F. Smarandache, <a href="http://www.gallup.unm.edu/~smarandache/CP2.pdf">Collected Papers, Vol. II</a>, Tempus Publ. Hse., Bucharest, 1996.

%H F. Smarandache, <a href="http://www.gallup.unm.edu/~smarandache/Sequences-book.pdf">Sequences of Numbers Involved in Unsolved Problems</a>, Hexis, Phoenix, 2006.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/SmarandacheSequences.html">Smarandache Sequences.</a>

%F a(A002061(n)) = n; a(A000290(n)) = a(A002522(n)) = 1. - _Reinhard Zumkeller_, Mar 10 2006

%F a(n) = if n<3 then 1 else (if a(n-1)=1 then 1 + 0^(a(n-2)-1) else a(n-1) - 0^X + (a(n-1)-a(n-2))*(1 - 0^X)), where X = A003059(n-1)-a(n-1). - _Reinhard Zumkeller_, Mar 10 2006

%F Let b(n) = floor(sqrt(n-1)). Then a(n) = min(n - b(n)^2, (b(n)+1)^2 - n + 1). - _Franklin T. Adams-Watters_, Jun 09 2006

%F Ordinal transform of A004741. - _Franklin T. Adams-Watters_, Aug 28 2006

%F If the sequence is read as a triangular array, beginning [1]; [1,2,1]; [1,2,3,2,1]; ..., then the o.g.f. is (1+qx)/((1-x)(1-qx)(1-q^2x)) = 1 + x(1 + 2q + q^2) + x^2(1 + 2q + 3q^2 + 2q^3 +q^4) + .... The row polynomials for this triangle are (1 + q + ... + q^n)^2 =[n,2]_q + q[n-1,2]_q, where [n,2]_q are Gaussian polynomials (see A008967). - _Peter Bala_, Sep 23 2007

%F a(n) = floor(sqrt(n-1)) - |n - floor(sqrt(n-1))^2 - floor(sqrt(n-1)) - 1| + 1. - _Boris Putievskiy_, Jan 13 2013

%F Read as a triangular array, then T(n,k) = n - |n-k-1|; T(n,0) = 1; T(n,n-1) = n. - _Juan Pablo Herrera P._, Oct 17 2016

%e From _Boris Putievskiy_, Jan 13 2013: (Start)

%e The start of the sequence as a table:

%e 1 1 1 1 1 1 ...

%e 1 2 2 2 2 2 ...

%e 1 2 3 3 3 3 ...

%e 1 2 3 4 4 4 ...

%e 1 2 3 4 5 5 ...

%e 1 2 3 4 5 6 ...

%e ...

%e The start of the sequence as an irregular triangle array read by rows:

%e 1;

%e 1,2,1;

%e 1,2,3,2,1;

%e 1,2,3,4,3,2,1;

%e 1,2,3,4,5,4,3,2,1;

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

%e ...

%e Row number k contains 2*k-1 numbers: 1,2,...,k-1,k,k-1,...,1. (End)

%e The sequence of fractions A196199/A004737 = 0/1, -1/1, 0/2, 1/1, -2/1, -1/2, 0/3, 1/2, 2/1, -3/1, -2/2, -1/3, 0/4, 1/3, 2/2, 3/1, -4/4. -3/2, ... contains every rational number (infinitely often) [Laczkovich]. - _N. J. A. Sloane_, Oct 09 2013

%t Table[Min[n - #^2, (# + 1)^2 - n + 1] &@ Floor[Sqrt[n - 1]], {n, 105}] (* or *)

%t Table[Floor@ # - Abs[n - Floor[#]^2 - Floor@ # - 1] + 1 &@ Sqrt[n - 1], {n, 105}] (* _Michael De Vlieger_, Oct 21 2016 *)

%t Table[Join[Range[n],Range[n-1,1,-1]],{n,20}]//Flatten (* _Harvey P. Dale_, Dec 27 2019 *)

%o (Haskell)

%o import Data.List (inits)

%o a004737 n = a004737_list !! (n-1)

%o a004737_list = concatMap f $ tail $ inits [1..]

%o where f xs = xs ++ tail (reverse xs)

%o -- _Reinhard Zumkeller_, May 11 2014, Mar 26 2011

%o (PARI) a(n) = n--;my(m=sqrtint(n));m+1-abs(n-m^2-m) \\ _David A. Corneth_, Oct 18 2016

%Y Cf. A004738, A008967, A003983, A196199.

%Y Cf. A242357, A000290 (row sums).

%K nonn,frac,easy,tabf

%O 1,3

%A R. Muller

%E More terms from _Patrick De Geest_, Jun 15 1998

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 25 16:23 EDT 2024. Contains 371989 sequences. (Running on oeis4.)