|
|
A075783
|
|
Additive perfect powers: sum-of-digits is also a perfect power.
|
|
1
|
|
|
1, 4, 8, 9, 27, 36, 81, 100, 121, 125, 144, 169, 196, 216, 225, 243, 324, 400, 441, 484, 512, 529, 900, 961, 1000, 1331, 1521, 1681, 2025, 2304, 2601, 3364, 3481, 3600, 3969, 4489, 4624, 5776, 5929, 7225, 7396, 7569, 7776, 8000, 8100, 8649, 8836, 9025, 10000
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
121 is OK because sum-of-digits=1+2+1=4 is perfect power.
|
|
MATHEMATICA
|
perfectPowerQ[n_] := n == 1 || GCD @@ FactorInteger[n][[All, 2]] > 1; Select[Range@ 10000, perfectPowerQ@ # && perfectPowerQ@ Total@ IntegerDigits@ # &] (* Michael De Vlieger, Oct 02 2015, after Ant King at A001597 *)
|
|
PROG
|
(PARI) isok(n) = (n==1 || ispower(n)) && (sumdigits(n)==1 || ispower(sumdigits(n))) \\ Dana Jacobsen, Oct 01 2015
(Perl) use ntheory ":all"; my @seq = grep { ($_==1 || is_power($_)) && (sumdigits($_) == 1 || is_power(sumdigits($_))) } 1..1000; say "@seq"; # Dana Jacobsen, Oct 01 2015
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|