A039668 Replaced by the pair of sequences A048611 and A048612.
1, 0, 6, 5, 20, 17, 56, 45, 156, 115, 344, 85, 356, 125
Offset: 0
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.
For n=2, 6^2 - 5^2 = 11.
s = Flatten[Table[r = (10^i - 1)/9; d = Divisors[r]; p = d[[Length[d]/2]]; Solve[{x - y == p, x + y == r/p}, {y, x}], {i, 2, 56}]]; Prepend[Cases[s, Rule[x, n_] -> n], 1]
from sympy import divisors def A048611(n): d = divisors((10**n-1)//9) l = len(d) return (d[l//2]+d[(l-1)//2])//2 # Chai Wah Wu, Apr 05 2021
0 is a term because 0 + 1 = 1. The result is another square. 25 is a term because 25 + 11 = 36. The result is another square. 289 is a term because 289 + 111 = 400. The result is another square.
f:= proc(d,q,m) local x,y; if d < q/d then return NULL fi; x:= ((d-q/d)/2)^2; if x >= 10^m and x < 10^(m+1) then x else NULL fi; end proc: R:= 0: for m from 1 to 20 do q:= (10^m-1)/9; V:= sort(convert(map(f, numtheory:-divisors(q),q,m-1),list)); R:= R, op(V); od: R; # Robert Israel, Aug 21 2020
lista(limit)={for(k=0, sqrtint(limit), my(t=k^2); if(issquare(t + (10^if(t, 1+logint(t,10), 1)-1)/9), print1(t, ", ")))} { lista(10^12) } \\ Andrew Howroyd, Aug 11 2020
Comments