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.

A289712 Smallest integer such that the sum of its n smallest divisors is a square.

This page as a plain text file.
%I A289712 #22 Oct 13 2019 06:14:41
%S A289712 1,3,15,22,12,36,24,66,126,420,90,364,270,264,240,210,672,780,864,
%T A289712 1050,672,720,924,1092,1344,3240,3312,1260,3600,1200,8910,1080,27104,
%U A289712 5940,1680,8568,8910,14280,6384,5670,5544,9600,43092,42900,5280,3360,9504,8580,21600,54288
%N A289712 Smallest integer such that the sum of its n smallest divisors is a square.
%C A289712 The first corresponding squares are 1, 4, 9, 36, 16, 25, 36, 144, 81, ...
%C A289712 The first squares in the sequence are 1, 36, 3600, ...
%H A289712 Robert Israel, <a href="/A289712/b289712.txt">Table of n, a(n) for n = 1..241</a>
%e A289712 a(4)=22 because the sum of the first 4 divisors of 22, i.e., 1 + 2 + 11 + 22 = 36, is a square, and 22 is the smallest integer with this property.
%p A289712 N:= 5*10^5: # to get terms before the first term > N
%p A289712 for k from 1 to N do
%p A289712   d:= sort(convert(numtheory:-divisors(k),list));
%p A289712   s:= ListTools:-PartialSums(d);
%p A289712   for m from 1 to nops(d) do
%p A289712     if not assigned(A[m]) and issqr(s[m]) then A[m]:= k fi
%p A289712   od
%p A289712 od:
%p A289712 iA:= map(op,{indices(A)}):
%p A289712 seq(A[i],i=1..min({$1..max(iA)+1} minus iA)-1); # _Robert Israel_, Oct 01 2017
%t A289712 Table[k=1;While[Nand[Length@#>=n,IntegerQ[Sqrt[Total@Take[PadRight[#,n],n]]]]&@Divisors@k,k++];k,{n,1,50}] (* Program from _Michael De Vlieger_ adapted for this sequence. See A289776. *)
%o A289712 (PARI) isok(k, n) = {my(v = divisors(k)); if (#v < n, return(0)); issquare(sum(j=1, n, v[j]));}
%o A289712 a(n) = {my(k = 1); while(!isok(k,n), k++); k;} \\ _Michel Marcus_, Sep 04 2017
%Y A289712 Cf. A000290, A027750, A240698, A289776.
%K A289712 nonn
%O A289712 1,2
%A A289712 _Michel Lagneau_, Sep 02 2017