cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A216894 n - (sum of prime factors of n) is a positive square.

Original entry on oeis.org

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

Views

Author

Michel Lagneau, Sep 19 2012

Keywords

Comments

Contains 4p for odd prime p if 3p-2 is a square, in particular if p is in A122430. - Robert Israel, Apr 13 2014

Examples

			54 = 2*3^3 and 54 -(2+3) = 49 is a square, hence 54 is in the sequence.
		

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 *)