The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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
2, 3, 13, 20, 37, 78, 119, 218, 457, 696, 1273, 2666, 4059, 7422, 15541, 23660, 43261, 90582, 137903, 252146, 527953, 803760, 1469617, 3077138, 4684659, 8565558, 17934877, 27304196, 49923733, 104532126, 159140519, 290976842 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Positions of records of A229118(n)/n.
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.
LINKS
FORMULA
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
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
EXAMPLE
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 + ...
MATHEMATICA
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 *)
PROG
(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, ", ")))
(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 */
(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
CROSSREFS
Sequence in context: A084958 A249573 A295111 * A295722 A037392 A136341
KEYWORD
nonn
AUTHOR
Ralf Stephan, Sep 14 2013
STATUS
approved

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 May 14 00:47 EDT 2024. Contains 372528 sequences. (Running on oeis4.)