OFFSET
1,1
COMMENTS
This sequence a(n) = f(D(n)) := ceiling(sqrt(4*D(n))), with D(n) > 0, not a square, given in A000037, is important i) for finding out whether an indefinite binary quadratic form with discriminant 4*D(n) is reduced and also ii) for finding the principal reduced form for discriminant 4*D(n). See the W. Lang link under A225953 for the definition of reduced in eq. (1), and the principal reduced form [1, b(n), - (D(n) - (b(n)/2)^2] with eq. b(n) given in eq. (5) (there the discriminant D = 4*D(n)).
Even a(n) appear (a(n) - 2)/2 times, odd a(n) appear (a(n) - 1)/2 times. See the second formula below.
Middle side of integer-sided triangles whose sides a < b < c are in arithmetic progression. For the corresponding triples and miscellaneous properties and references, see A336750. - Bernard Schott, Oct 07 2020
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = ceiling(2*sqrt(A000037(n))), n >= 1.
s(n):= floor((a(n)-1)/2) = A000194(n) = A000037(n) - n, for n >= 1. See a comment above for the multiplicity of a(n).
G.f.: (Theta2(0,x)/x^(1/4) + Theta3(0,x)+3)*x/(2*(1-x)) where Theta2 and Theta3 are Jacobi Theta functions. - Robert Israel, Mar 26 2019
MAPLE
seq(i$((i-2+(i mod 2))/2), i=3..20); # Robert Israel, Mar 26 2019
MATHEMATICA
Flatten[Array[ConstantArray[#, Floor[(#-1)/2]] &, 19, 3]] (* Paolo Xausa, Feb 29 2024 *)
PROG
(PARI) lista(nn) = for (n=1, nn, if (!issquare(n), print1(ceil(2*sqrt(n)), ", "))); \\ Michel Marcus, Mar 26 2019
(Python)
from math import isqrt
def A307136(n): return 1+isqrt((n+isqrt(n+isqrt(n))<<2)-1) # Chai Wah Wu, Jul 28 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wolfdieter Lang, Mar 26 2019
STATUS
approved