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!)
A229117 Numbers k where d/k reaches a new record, with d the distance from the k-th triangular number to the nearest square. 2

%I #23 Sep 08 2022 08:46:05

%S 2,3,13,20,37,78,119,218,457,696,1273,2666,4059,7422,15541,23660,

%T 43261,90582,137903,252146,527953,803760,1469617,3077138,4684659,

%U 8565558,17934877,27304196,49923733,104532126,159140519,290976842

%N Numbers k where d/k reaches a new record, with d the distance from the k-th triangular number to the nearest square.

%C Positions of records of A229118(n)/n.

%C The maximum of d/k appears to converge to sqrt(2)/2 (A010503), i.e., k*(k+1)/2 is not more than k*sqrt(2)/2 distant from a square.

%H G. C. Greubel, <a href="/A229117/b229117.txt">Table of n, a(n) for n = 1..2500</a>

%F G.f.: x * (2 + x + 10*x^2 - 5*x^3 + 11*x^4 - 19*x^5 + x^6 - 2*x^7 + 3*x^8) / (1 - x - 6*x^3 + 6*x^4 + x^6 - x^7). - _Michael Somos_, Dec 25 2016

%F a(n) = a(n-1) + 6*a(n-3) - 6*a(n-4) - a(n-6) + a(n-7) if n>9. - _Michael Somos_, Dec 25 2016

%e G.f. = 2*x + 3*x^2 + 13*x^3 + 20*x^4 + 37*x^5 + 78*x^6 + 119*x^7 + 218*x^8 + ...

%t Drop[CoefficientList[Series[x*(2 + x + 10*x^2 - 5*x^3 + 11*x^4 - 19*x^5 + x^6 - 2*x^7 + 3*x^8)/(1 - x - 6*x^3 + 6*x^4 + x^6 - x^7), {x, 0, 50}], x], 1] (* _G. C. Greubel_, Aug 09 2018 *)

%o (PARI) m=0;for(n=1, 10^9, t=n*(n+1)/2;s=sqrtint(t);d=min(t-s^2,(s+1)^2-t);r=d/n;if(r>m,m=r;print1(n, ",")))

%o (PARI) {a(n) = if( n<1, 0, polcoeff( (1 + x + x^2 + 4*x^3 + x^4 + 11*x^5 - 18*x^6 - 2*x^8 + 3*x^9) / (1 - x - 6*x^3 + 6*x^4 + x^6 - x^7) + x * O(x^n), n))}; /* _Michael Somos_, Dec 25 2016 */

%o (Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(x*(2 +x+10*x^2-5*x^3+11*x^4-19*x^5+x^6-2*x^7+3*x^8)/(1-x-6*x^3+6*x^4+x^6- x^7))); // _G. C. Greubel_, Aug 09 2018

%Y Cf. A010503, A229118.

%K nonn

%O 1,1

%A _Ralf Stephan_, Sep 14 2013

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