cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A307136 a(n) = ceiling(2*sqrt(A000037(n))), n >= 1.

This page as a plain text file.
%I A307136 #43 Feb 29 2024 11:22:59
%S A307136 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,
%T A307136 12,12,13,13,13,13,13,13,14,14,14,14,14,14,15,15,15,15,15,15,15,16,16,
%U A307136 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
%N A307136 a(n) = ceiling(2*sqrt(A000037(n))), n >= 1.
%C A307136 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)).
%C A307136 Even a(n) appear (a(n) - 2)/2 times, odd a(n) appear (a(n) - 1)/2 times. See the second formula below.
%C A307136 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
%H A307136 Paolo Xausa, <a href="/A307136/b307136.txt">Table of n, a(n) for n = 1..10000</a>
%F A307136 a(n) = ceiling(2*sqrt(A000037(n))), n >= 1.
%F A307136 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).
%F A307136 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
%p A307136 seq(i$((i-2+(i mod 2))/2),i=3..20); # _Robert Israel_, Mar 26 2019
%t A307136 A307136[n_] := Ceiling[2*Sqrt[n+Round[Sqrt[n]]]]; Array[A307136, 100] (* or *)
%t A307136 Flatten[Array[ConstantArray[#, Floor[(#-1)/2]] &, 19, 3]] (* _Paolo Xausa_, Feb 29 2024 *)
%o A307136 (PARI) lista(nn) = for (n=1, nn, if (!issquare(n), print1(ceil(2*sqrt(n)), ", "))); \\ _Michel Marcus_, Mar 26 2019
%o A307136 (Python)
%o A307136 from math import isqrt
%o A307136 def A307136(n): return 1+isqrt((n+isqrt(n+isqrt(n))<<2)-1) # _Chai Wah Wu_, Jul 28 2022
%Y A307136 Cf. A000037, A000194, A225953, A336750.
%K A307136 nonn,easy
%O A307136 1,1
%A A307136 _Wolfdieter Lang_, Mar 26 2019