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!)
A346528 Distance between first appearance and last appearance of n in A105224, counting both end points. 1
17, 33, 60, 67, 102, 103, 144, 162, 186, 204, 187, 246, 264, 288, 306, 273, 348, 307, 390, 408, 432, 450, 393, 492, 510, 534, 552, 477, 594, 513, 636, 654, 678, 696, 597, 738, 756, 780, 798, 683, 840, 858, 882, 900 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
When the sequence A105224 is plotted, we get horizontal lines which lie roughly on a parabola and correspond to repeated values in the sequence. This sequence is the length of these lines.
Empirically, all elements seem to roughly lie on either of the lines 20.5*n or 17*n.
LINKS
FORMULA
a(n) = A346527(n) - A346522(n) + 1.
EXAMPLE
For n = 1, the number 1 appears in the sequence A105224 at indices ranging from 1 to 17. This is because the intervals [1,2] and [17,34] each contain 1 square, and are the smallest and largest intervals, respectively, of the form [k,2*k] that contain exactly 1 square. So a(1) = 17.
PROG
(Python)
k = 1
n = 1
while n<100:
if math.isqrt(2*k)-math.isqrt(k-1) == n:
k1 = k
t = k
k2 = k
while t < 6*(n+1)**2:
if math.isqrt(2*t)-math.isqrt(t-1) == n:
k2 = t
t = t+1
n = n+1
print(k2-k1+1)
k = k+1
(Python)
from math import isqrt
def A346528(n):
if n == 1: return 17
a, b, k, k2, m, r, s = -6*(n+1)**2, (n+1)**4, 2, 4, 1, 0, 0
while 2*m+a < 0 or m*(m+a)+b < 0:
if isqrt(2*m) - isqrt(m-1) == n:
r = m
if s == 0 and isqrt(2*m+2)-isqrt(m) == n:
s = m
k += 1
k2 += 2*k-1
m = (k2-1)//2
return r-s # Chai Wah Wu, Sep 28 2021
CROSSREFS
Sequence in context: A158057 A249356 A329919 * A286679 A116523 A168579
KEYWORD
easy,nonn
AUTHOR
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 September 2 12:25 EDT 2024. Contains 375613 sequences. (Running on oeis4.)