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!)
A027434 a(1) = 2; then defined by property that a(n) = smallest number >= a(n-1) such that successive runs have lengths 1,1,2,2,3,3,4,4. 14

%I #73 Jan 22 2024 06:02:08

%S 2,3,4,4,5,5,6,6,6,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,10,11,11,11,11,

%T 11,12,12,12,12,12,12,13,13,13,13,13,13,14,14,14,14,14,14,14,15,15,15,

%U 15,15,15,15,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,18,18,18,18

%N a(1) = 2; then defined by property that a(n) = smallest number >= a(n-1) such that successive runs have lengths 1,1,2,2,3,3,4,4.

%C Also the sequence of first skipped terms for Beatty sequences in the family alpha = 1+sqrt(n)-sqrt(n-1). - _Alisa Ediger_, Jul 20 2016

%C Optimal cost for one-dimensional Racetrack over a distance n. - _Jason Schoeters_, Aug 18 2021

%C If b > 0 and c > 0 are the integer coefficients of a monic quadratic x^2 + b*x + c, it has integer roots if its discriminant d^2 = b^2 - 4c is a perfect square. This sequence is the values of b for increasing b sorted by b then c. The first pair of (b, c) = (2, 1) and has d = A082375(0) = 0. The n-th pair of (b, c) = (a(n), A350634(n)) and has d = A082375(n-1). - _Frank M Jackson_, Jan 21 2024

%D Sam Speed, An integer sequence (preprint).

%H William A. Tedeschi, <a href="/A027434/b027434.txt">Table of n, a(n) for n = 1..10000</a>

%H A. Casteigts, M. Raffinot and J. Schoeters, <a href="https://arxiv.org/abs/2006.03666">VectorTSP: A Traveling Salesperson Problem with Racetrack-like acceleration constraints</a>, Lemma 7, arXiv:2006.03666 [cs.DS], 2020-2021.

%F a(n) = 1 + floor( sqrt(4*n-3) ) = 1+A000267(n-1).

%F a(n) = A049068(n) - n.

%F a(n) = A027709(n)/2. - _Tanya Khovanova_, Mar 04 2008

%F a(n) = ceiling(2*sqrt(n)). [_Mircea Merca_, Feb 07 2012]

%F a(n) = floor(1+sqrt(n)+sqrt(n-1)). - _Alisa Ediger_, Jul 20 2016

%F G.f.: x*(1 + x^(-1/4)*theta_2(x) + theta_3(x))/(2*(1 - x)), where theta_k(x) is the Jacobi theta function. - _Ilya Gutkovskiy_, Jul 20 2016

%F a(n) = 1 + floor(sqrt(4*n-1)). - _Chai Wah Wu_, Jul 27 2022

%F a(n) = sqrt((A082375(n))^2 + 4*A350634(n+1)). - _Frank M Jackson_, Jan 21 2024

%p A027434:=n->ceil(2*sqrt(n)); seq(A027434(n), n=1..100); # _Wesley Ivan Hurt_, Mar 01 2014

%t Table[Ceiling[2*Sqrt[n]], {n, 100}] (* _Wesley Ivan Hurt_, Mar 01 2014 *)

%t Sort[Flatten[Table[#,{#[[1]]/2}]]]&/@Partition[Range[2,20],2]//Flatten (* _Harvey P. Dale_, Sep 05 2019 *)

%t lst = {}; Do[If[IntegerQ[d=Sqrt[b^2-4 c]], AppendTo[lst, b]], {b, 1, 20}, {c, 1, b^2/4}]; lst (* _Frank M Jackson_, Jan 21 2024 *)

%o (Haskell)

%o a027434 = (+ 1) . a000196 . (subtract 3) . (* 4)

%o a027434_list = 2 : concat (map (\x -> replicate (x `div` 2) x) [3..])

%o -- _Reinhard Zumkeller_, Mar 23 2013, Nov 22 2011

%o (PARI) a(n)=sqrtint(4*n-3)+1 \\ _Charles R Greathouse IV_, Feb 07 2012

%o (Python)

%o from math import isqrt

%o def A027434(n): return 1+isqrt((n<<2)-1) # _Chai Wah Wu_, Jul 27 2022

%Y Cf. A000267, A049068, A027709.

%Y Cf. A082375, A350634.

%K nonn,nice,easy

%O 1,1

%A Sam Speed (SPEEDS(AT)msci.memphis.edu)

%E More terms from Courtney Clipp (cclipp(AT)ashland.edu), Dec 08 2004

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 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)