A056733 Each number is the sum of the cubes of its 3 sections.
153, 370, 371, 407, 165033, 221859, 336700, 336701, 340067, 341067, 407000, 407001, 444664, 487215, 982827, 983221, 166500333, 296584415, 333667000, 333667001, 334000667, 710656413, 828538472, 142051701000, 166650003333, 262662141664, 333366670000
Offset: 1
Examples
333667001 = 333^3 + 667^3 + 001^3, so 333667001 is a term.
References
- J. S. Madachy, Madachy's Mathematical Recreations, pp. 166, Dover, NY, 1979.
- Donald D. Spencer, "Exploring number theory with microcomputers", pp. 65 and 101, Camelot Publishing Co.
Links
- Jose M. Arenas and Giovanni Resta, Table of n, a(n) for n = 1..69 (terms < 10^18, first 49 terms from Jose M. Arenas)
- Jose M. Arenas, Python code.
Programs
-
Mathematica
f[n_] := Block[{len = IntegerLength@ n}, If[IntegerQ[len/3], n == Plus @@ Flatten[(FromDigits /@ Partition[IntegerDigits@ n, len/3])^3], False]]; Select[Range[10^6], f] (* Michael De Vlieger, Jan 31 2015 *)
-
Python
def a(): n = 1 while n < 10**9: st = str(n) if len(st) % 3 == 0: s1 = st[:int(len(st)/3)] s2 = st[int(len(st)/3):int(2*len(st)/3)] s3 = st[int(2*len(st)/3):int(len(st))] if int(s1)**3+int(s2)**3+int(s3)**3 == int(st): print(n, end=', ') n += 1 else: n += 1 else: n = 10*n a() # Derek Orr, Jul 03 2014
-
Python
def a(): for i in range(1,10): for j in range(10): for k in range(10): if i**3 + j**3 + k**3 == i*100 + j*10 + k: print(i*100 + j*10 + k) for i in range(10,100): for j in range(100): for k in range(100): if i**3 + j**3 + k**3 == i*10000 + j*100 + k: print(i*10000 + j*100 + k) for i in range(100,1000): for j in range(1000): for k in range(1000): if i**3 + j**3 + k**3 == i*1000000 + j*1000 + k: print(i*1000000 + j*1000 + k) a() # Denys Contant, Feb 23 2017
Extensions
Offset changed to 1 by N. J. A. Sloane, Jul 07 2014
a(24)-a(27) from Jose M. Arenas, Mar 08 2017
Comments