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!)
A055616 Numbers, with an even number of digits, that are the sum of the squares of their two halves (leading zeros allowed only for the second half). 10
1233, 8833, 990100, 94122353, 1765038125, 2584043776, 7416043776, 8235038125, 9901009901, 116788321168, 123288328768, 876712328768, 883212321168, 999900010000, 13793103448276, 15348303604525, 84651703604525, 86206903448276, 91103202846976, 92318202663025 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The sequence is infinite since it contains several infinite subsequences (see A055617, etc.).
If x = A*10^n+B is an element not beginning with 9, then (10^n-A)*10^n+B is another (e.g. 1233 <-> 8833).
Numbers that can be written as n = A*10^d + B with 10^(d-1) <= A < 10^d, 0 <= B < 10^d, and A^2 + B^2 = n. - Robert Israel, May 10 2015
LINKS
EXAMPLE
8833 is ok, since 8833 = 88^2 + 33^2.
MAPLE
dmax:= 8: # to get all entries with at most 2*dmax digits
Res:= NULL:
for d from 2 to dmax do
cands:= map(t -> subs(t, [x, y]), [isolve(x^2 + y^2 = 10^(2*d)+1)]);
cands:= select(t -> t[1]::even and t[1]>=0 and t[2]>0, cands);
cands:= map(t -> ([(10^d + t[1])/2, (t[2]+1)/2], [(10^d-t[1])/2, (t[2]+1)/2]), cands);
cands:= select(t -> (t[1]>= 10^(d-1) and t[1] < 10^d and t[2] <= 10^d), cands);
Res:= Res, op(map(t -> 10^d*t[1]+t[2], cands));
od:
sort([Res]); # Robert Israel, May 10 2015
MATHEMATICA
fQ[n_] := Block[{d = IntegerDigits@ n}, If[OddQ[Length@ d], False, Plus[FromDigits[Take[d, Length[d]/2]]^2, FromDigits[Take[d, -Length[d]/2]]^2]] == n]; Select[Range@ 1000000, fQ] (* Michael De Vlieger, May 09 2015 *)
PROG
(Python)
def a():
..n = 1
..while n < 10**6:
....st = str(n)
....if len(st) % 2 == 0:
......s1 = st[:int(len(st)/2)]
......s2 = st[int(len(st)/2):int(len(st))]
......if int(s1)**2+int(s2)**2 == int(st):
........print(n, end=', ')
........n += 1
......else:
........n += 1
....else:
......n = 10*n
a()
# Derek Orr, Jul 08 2014
CROSSREFS
Cf. A064942 for the number of solutions, where leading zeros are allowed.
Sequence in context: A206272 A064942 A101311 * A104971 A193492 A279204
KEYWORD
nonn,base
AUTHOR
Ulrich Schimke (ulrschimke(AT)aol.com)
EXTENSIONS
Definition corrected by Derek Orr, Jul 09 2014
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 April 18 20:26 EDT 2024. Contains 371781 sequences. (Running on oeis4.)