OFFSET
1,2
COMMENTS
From Bernard Schott, Dec 05 2019: (Start)
a(n) = 1 iff n > 1 is a power of 3.
a(n) = 2 iff n > 1 is a power of p prime with p in A028871. (End)
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
a(6)=3 because 6=2*3 and (4-2)+(4-3)=3.
a(20)=6 because 20=2^2*5 and (4-2)+(9-5)=6.
MATHEMATICA
f[n_]:=Module[{difs=Transpose[FactorInteger[n]][[1]]}, Total[Ceiling[ Sqrt[difs]]^2-difs]]; Array[f, 120] (* Harvey P. Dale, Apr 18 2011 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jason Earls, Nov 20 2002
STATUS
approved