A225567 Primes with nonzero digits such that sum of cubes of digits equal to square of sums.
1423, 2143, 2341, 4231, 12253, 21523, 22153, 22531, 23251, 25321, 32251, 35221, 36343, 36433, 43633, 52321, 64333, 114451, 144511, 224461, 244261, 246241, 365557, 415141, 424261, 426421, 446221, 446461, 451411, 462421, 466441, 541141, 555637, 556537, 556573
Offset: 1
Examples
a(5) = 12253 since 1^3 + 2^3 + 2^3 + 5^3 + 3^3 = (1 + 2 + 2 + 5 + 3)^2.
Links
- T. D. Noe, Table of n, a(n) for n = 1..1201 (terms < 10^7)
- David Pagni, 82.27 An interesting number fact, The Mathematical Gazette 82:494 (1998), pp. 271-273.
- C. Rivera, PP&P Puzzle 158: Sum of Cubes equal to Square of Sum
Crossrefs
Programs
-
Mathematica
(* let tz[[i]] be numbers computed in A227073 *) Select[tz, PrimeQ] (* T. D. Noe, Jul 30 2013 *) pQ[n_]:=Module[{idn=IntegerDigits[n]},FreeQ[idn,0]&&Total[idn^3] == Total[ idn]^2]; Select[Prime[Range[50000]],pQ] (* Harvey P. Dale, Sep 17 2013 *)
-
PARI
forprime(n=1, 10^7, v=digits(n); if(sum(i=1, length(v), v[i]^3)==sum(i=1, length(v), v[i])^2 & setsearch(Set(v),0)!=1, print1(n", ")))
Extensions
Corrected by T. D. Noe, Jul 26 2013
Comments