|
|
A000194
|
|
n appears 2n times, for n >= 1; also nearest integer to square root of n.
|
|
65
|
|
|
0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
COMMENTS
|
Define the oblong root obrt(x) to be the (larger) solution of y * (y+1) = x; i.e., obrt(x) = sqrt(x+1/4) - 1/2. So obrt(x) is an integer iff x is an oblong number (A002378). Then a(n) = ceiling(obrt(n)). - Franklin T. Adams-Watters, Jun 24 2015
The general Pell equation is related to the non-reduced form F(n) = Xvec^T A(n) Xvec = x^2 - D(n)*y^2 with D(n) = A000037(n) (D not a square), Xvec = (x,y)^T (T for transposed) and A(n) = matrix[[1,0], [0,-D(n)]]. The discriminant of F(n) = [1, 0, -D(n)] is 4*D(n).
The first reduced form appears after two applications of an equivalence transformation A' = R^T A R obtained with R = R(t) = matrix([0, -1], [1, t]), namely first with t = 0, leading to the still not reduced form [-D, 0, 1], and then with t = ceiling(f(4*D(n))/2 - 1), where f(4*D(n)) = ceiling(2*sqrt(D(n))). This can be shown to be a(n), which is also D(n) - n, for n >= 1 (see a formula below).
This leads to the reduced form FR(n) = [1, 2*a(n), -(D(n) - a(n)^2)] = [1, 2*a(n), -(n - a(n)*(a(n) - 1))]. Example: n = 5, a(5) = 2: D(5) = 7 and FR(5) = [1, 4, -3]. (End)
|
|
REFERENCES
|
Titu Andreescu, Dorin Andrica, and Zuming Feng, 104 Number Theory Problems, Birkhäuser, 2006, 59-60.
B. C. Berndt, Ramanujan's Notebooks Part IV, Springer-Verlag, see p. 78, Entry 24.
|
|
LINKS
|
G. Gutin, Problem 913 (BCC20.5), Mediated digraphs, in Research Problems from the 20th British Combinatorial Conference, Discrete Math., 308 (2008), 621-630.
|
|
FORMULA
|
G.f.: x * f(x^2, x^6)/(1-x) where f(,) is Ramanujan's two-variable theta function. - Michael Somos, May 31 2000
a(n) = floor((1/2)*(1 + sqrt(4*n - 3))). - Zak Seidov, Jan 18 2006
a(n) = floor(sqrt(n) + 1/2).
a(n) = floor(2*sqrt(n)) - floor(sqrt(n)). - Ridouane Oudra, Jun 08 2020
Sum_{n>=1} 1/a(n)^s = 2*zeta(s-1), for s > 2 (Borwein, 1994). - Amiram Eldar, Oct 31 2020
|
|
EXAMPLE
|
G.f. = x + x^2 + 2*x^3 + 2*x^4 + 2*x^5 + 2*x^6 + 3*x^7 + 3*x^8 + 3*x^9 + 3*x^10 + ...
|
|
MAPLE
|
Digits := 100; f := n->round(evalf(sqrt(n))); [ seq(f(n), n=0..100) ];
# More efficient:
a := n -> isqrt(n): seq(a(n), n=0..98); # Peter Luschny, Mar 13 2019
|
|
MATHEMATICA
|
Flatten[Table[PadRight[{}, 2 n, n], {n, 10}]] (* Harvey P. Dale, Nov 16 2011 *)
CoefficientList[Series[x QPochhammer[-x^2, x^4] QPochhammer[x^8, x^8]/(1 - x), {x, 0, 50}], x] (* Eric W. Weisstein, Jan 10 2024 *)
|
|
PROG
|
(PARI) {a(n) = ceil( sqrtint(4*n) / 2)}; /* Michael Somos, Feb 11 2004 */
(Haskell)
a000194 n = a000194_list !! (n-1)
a000194_list = concat $ zipWith ($) (map replicate [2, 4..]) [1..]
(Python)
from math import isqrt
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,nice
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|