cp's OEIS Frontend

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.

A227072 Positive numbers with nondecreasing digits such that sum of cubes of the digits equals the square of the sum of the digits.

This page as a plain text file.
%I A227072 #17 Sep 06 2013 00:10:59
%S A227072 1,12,22,123,333,1224,1234,2244,4444,12235,12345,33336,33346,55555,
%T A227072 111225,111445,112455,114555,122346,122446,123456,144466,222226,
%U A227072 224466,244557,244666,333357,333666,345567,355567,455667,666666,1122556,1134457,1145557,1155666
%N A227072 Positive numbers with nondecreasing digits such that sum of cubes of the digits equals the square of the sum of the digits.
%C A227072 Because the digits are nondecreasing, the search to 10^20 is fairly rapid.
%H A227072 T. D. Noe, <a href="/A227072/b227072.txt">Table of n, a(n) for n = 1..660</a>
%e A227072 1234 is here because 1^3 + 2^3 + 3^3 + 4^3 = (1 + 2 + 3 + 4)^2 and its digits are nondecreasing..
%t A227072 (* complete sequence *) tx = {}; Do[d = {i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20}; If[Total[d^3] == Total[d]^2, n = FromDigits[d]; AppendTo[tx, n]], {i1, 0, 9}, {i2, i1, 9}, {i3, i2, 9}, {i4, i3, 9}, {i5, i4, 9}, {i6, i5, 9}, {i7, i6, 9}, {i8, i7, 9}, {i9, i8, 9}, {i10, i9, 9}, {i11, i10, 9}, {i12, i11, 9}, {i13, i12, 9}, {i14, i13, 9}, {i15, i14, 9}, {i16, i15, 9}, {i17, i16, 9}, {i18, i17, 9}, {i19, i18, 9}, {i20, i19, 9}]; tx = Rest[tx]
%t A227072 (* partial sequence *) nddQ[n_] := Module[{idn=IntegerDigits[n]}, Min[Differences[idn]] >= 0 && Total[idn^3] == Total[idn]^2]; Select[Range[2000000], nddQ] (* _Harvey P. Dale_, Sep 01 2013 *)
%Y A227072 Cf. A225567 (primes in a related sequence), A227073.
%K A227072 nonn,base,fini,full
%O A227072 1,2
%A A227072 _T. D. Noe_, Jul 27 2013