OFFSET
1,1
COMMENTS
Largest term of this sequence is the 20-digit prime 99151111111111111111.
The Pagni article mentioned below has no bearing on this problem because it deals with the well-known identity sum_{i=1..n} i^3 = (sum_{i=1..n} i)^2. However, the article is interesting. - T. D. Noe, Jul 26 2013
This sequence has exactly 14068465 provable primes. This result required about one hour of Mathematica on fairly fast computer having 16 GB of memory. - T. D. Noe, Jul 30 2013
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.
EXAMPLE
a(5) = 12253 since 1^3 + 2^3 + 2^3 + 5^3 + 3^3 = (1 + 2 + 2 + 5 + 3)^2.
MATHEMATICA
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 *)
PROG
(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", ")))
CROSSREFS
KEYWORD
nonn,base,fini,easy
AUTHOR
Balarka Sen, Jul 26 2013
EXTENSIONS
Corrected by T. D. Noe, Jul 26 2013
STATUS
approved
