1,2

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)

Amiram Eldar, Table of n, a(n) for n = 1..10000

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.

f[n_]:=Module[{difs=Transpose[FactorInteger[n]][[1]]}, Total[Ceiling[ Sqrt[difs]]^2-difs]]; Array[f, 120] (* Harvey P. Dale, Apr 18 2011 *)

Sequence in context: A091173 A101897 A208058 * A133422 A331136 A099312

Adjacent sequences: A078139 A078140 A078141 * A078143 A078144 A078145

easy,nonn

Jason Earls, Nov 20 2002

approved