A216894 n - (sum of prime factors of n) is a positive square.
1, 6, 22, 54, 68, 164, 166, 336, 388, 454, 588, 854, 886, 1086, 1122, 1124, 1636, 1710, 1828, 2182, 2356, 2468, 2702, 2960, 3046, 3048, 3708, 3748, 3770, 4036, 4054, 4655, 5106, 5394, 5636, 6502, 7108, 7368, 7956, 8324, 9170, 9188, 9412, 9438, 9471, 9726
Offset: 1
Keywords
Examples
54 = 2*3^3 and 54 -(2+3) = 49 is a square, hence 54 is in the sequence.
Links
- Robert Israel, Table of n, a(n) for n = 1..2121
Crossrefs
Cf. A008472.
Programs
-
Maple
filter:= proc(x) local y; y:= x - add(i, i=numtheory:-factorset(x)); y > 0 and issqr(y) end proc; N:= 10000; # to get all entries <= N A216894:= select(filter,[$1..N]); # Robert Israel, Apr 13 2014
-
Mathematica
nspfQ[n_]:=Module[{c=n-Total[Transpose[FactorInteger[n]][[1]]]},c>0 && IntegerQ[ Sqrt[c]]]; Join[{1},Select[Range[10000],nspfQ]] (* Harvey P. Dale, Feb 12 2015 *)
Comments