login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A307136
a(n) = ceiling(2*sqrt(A000037(n))), n >= 1.
7
3, 4, 5, 5, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20
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
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
A307136[n_] := Ceiling[2*Sqrt[n+Round[Sqrt[n]]]]; Array[A307136, 100] (* or *)
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