OFFSET
1,3
COMMENTS
If n' = 1 (<=> n is prime) were not excluded, the sequence would mainly consist of the primes.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000
FORMULA
Disjoint from sequence A157037 of numbers whose arithmetic derivative is a prime.
MAPLE
b:= n-> n*add(i[2]/i[1], i=ifactors(n)[2]):
a:= proc(n) option remember; local k;
for k from 1+`if`(n=1, -1, a(n-1)) while
(p-> p=1 or not issqr(p))(b(k)) do od; k
end:
seq(a(n), n=1..70); # Alois P. Heinz, Apr 08 2015
MATHEMATICA
f[n_] := If[Abs@ n < 2, 0, n Total[#2/#1 & @@@ FactorInteger[Abs@ n]]]; {0}~Join~Flatten@ Position[Array[f, 2000], n_ /; IntegerQ[Sqrt@ n] && n != 1] (* Michael De Vlieger, Apr 08 2015, after Michael Somos at A003415 *)
PROG
(PARI) is(n)=!isprime(n)&&issquare(A003415(n))
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Apr 08 2015
STATUS
approved