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.

A176996 Numbers n such that sum of divisors, sigma(n), and sum of the proper divisors, sigma(n)-n, are both square.

Original entry on oeis.org

1, 3, 119, 527, 935, 3591, 3692, 6887, 12319, 47959, 65151, 97767, 99116, 202895, 237900, 373319, 438311, 699407, 734111, 851927, 957551, 1032156, 1064124, 1437599, 1443959, 2858687, 3509231, 3699311, 4984199, 7237415
Offset: 1

Views

Author

Claudio Meller, Dec 08 2010

Keywords

Comments

The only prime in this sequence is 3. All prime numbers have the square 1 as the sum of their proper divisors. But since 3 is the only prime of the form n^2 - 1, it is the only prime that satisfies the first condition for inclusion in this sequence.

Examples

			119 has divisors 1, 7, 17, 119; it is in the list because 1+7+17+119 = 144 = 12^2 and 1+7+17 = 25 = 5^2.
		

Crossrefs

Cf. A006532, which considers all divisors; A048699, which for nonprime numbers considers all divisors except the number itself; A073040, which is the union of A048699 and the prime numbers (A000040).

Programs

  • Mathematica
    Intersection[Select[Range[10^5], IntegerQ[Sqrt[-# + Plus@@Divisors[#]]] &], Select[Range[10^5], IntegerQ[Sqrt[Plus@@Divisors[#]]] &]] (* Alonso del Arte, Dec 08 2010 *)
    t = {}; Do[If[And @@ IntegerQ /@ Sqrt[{x = DivisorSigma[1, n], x - n}], AppendTo[t, n]], {n, 10^6}]; t (* Jayanta Basu, Jul 27 2013 *)
    sdQ[n_]:=Module[{d=DivisorSigma[1,n]},AllTrue[{Sqrt[d],Sqrt[d-n]}, IntegerQ]]; Select[Range[73*10^5],sdQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Apr 17 2018 *)
  • Sage
    is_A176996 = lambda n: is_square(sigma(n)) and is_square(sigma(n)-n) # D. S. McNeil, Dec 09 2010

Formula

Intersection of A006532 and A073040.