A068916 Smallest positive integer that is equal to the sum of the n-th powers of its prime factors (counted with multiplicity).
2, 16, 1096744, 3125, 256, 823543, 19683
Offset: 1
Examples
a(3) = 1096744 = 2^3*11^3*103; the sum of the cubes of the prime factors is 3*2^3 + 3*11^3 + 103^3 = 1096744.
Links
- S. P. Hurd and J. S. McCranie, Integers that are Sums of Uniform Powers of all their Prime Factors: the sequence A068916, J. of Int. Seq., vol 22, article 19.3.4.
Programs
-
Mathematica
a[n_] := For[x=1, True, x++, If[x==Plus@@(#[[2]]#[[1]]^n&/@FactorInteger[x]), Return[x]]]
-
PARI
isok(k, n) = {my(f=factor(k)); sum(j=1, #f~, f[j,2]*f[j,1]^n) == k;} a(n) = {my(k = 1); while(! isok(k,n), k++); k;} \\ Michel Marcus, Jan 25 2016
-
Python
from sympy import factorint def a(n): k = 1 while True: f = factorint(k) if k == sum(f[d]*d**n for d in f): return k k += 1 for n in range(1, 8): print(a(n), end=", ") # Michael S. Branicky, Feb 16 2021
Comments