# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/
Search: id:a104113
Showing 1-1 of 1
%I A104113 #60 Jul 12 2023 11:12:44
%S A104113 0,1,81,100,1296,2025,3025,6724,8281,9801,10000,55225,88209,136161,
%T A104113 136900,143641,171396,431649,455625,494209,571536,627264,826281,
%U A104113 842724,893025,929296,980100,982081,998001,1000000,1679616,2896804,3175524,4941729,7441984
%N A104113 Numbers which when chopped into one, two or more parts, added and squared result in the same number.
%C A104113 Every term is congruent to 0 or 1 modulo 9. - _Andrea Tarantini_, Sep 27 2021
%H A104113 John Drake, Table of n, a(n) for n = 1..408 (terms 1..80 from Mehrad Mahmoudian, terms 81..225 from Giovanni Resta)
%H A104113 Mehrad Mahmoudian, R code to produce the sequence
%H A104113 Mehrad Mahmoudian, Decompositions for a(1)-a(80)
%H A104113 Project Euler, Problem 719: Number Splitting (2020)
%F A104113 a(n) = A038206(n)^2. - _Andrea Tarantini_, Sep 27 2021
%e A104113 1296 is a term since (1+29+6)^2 = 36^2 = 1296.
%t A104113 Join[{0},Select[Select[Range@3000^2,Mod[#,9]<2&],(n=#;MemberQ[(Total/@(FromDigits/@#&/@Union[DeleteCases[SplitBy[#,#==-1&],{-1}]&/@(Insert[IntegerDigits@n,-1,#]&/@(List/@#&/@Rest@Subsets[Range@IntegerLength@n]))]))^2,#])&]] (* _Giorgos Kalogeropoulos_, Oct 28 2021 *)
%o A104113 (Python)
%o A104113 def expr(t, d): # can you express target t with digits d, only adding +'s
%o A104113 if t < 0: return False
%o A104113 if t == int(d): return True
%o A104113 return any(expr(t-int(d[:i]), d[i:]) for i in range(1, len(d)))
%o A104113 def aupto(limit):
%o A104113 alst, k, k2 = [], 0, 0
%o A104113 while k2 <= limit:
%o A104113 if expr(k, str(k2)):
%o A104113 alst.append(k2)
%o A104113 k, k2 = k+1, k2 + 2*k + 1
%o A104113 return alst
%o A104113 print(aupto(7500000)) # _Michael S. Branicky_, Sep 27 2021
%Y A104113 Cf. A038206, A102766.
%K A104113 nonn,base
%O A104113 1,3
%A A104113 _Bodo Zinser_, Mar 05 2005
%E A104113 a(30) and beyond from _Mehrad Mahmoudian_, Dec 16 2019
# Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE