A172412 Multiples of 4 with the property that addition of a square gives a square that is not larger than the square for any later term.
0, 4, 8, 12, 16, 24, 32, 36, 40, 48, 60, 64, 72, 80, 84, 96, 100, 112, 120, 128, 140, 144, 160, 168, 180, 192, 196, 200, 216, 224, 240, 252, 256, 264, 280, 288, 308, 320, 324, 336, 352, 360, 364, 384, 396, 400, 416, 432, 440, 448, 468, 480, 484
Offset: 1
Keywords
Examples
S(20) =36 is larger than S(24), so 20 is not in the sequence. S(28)=64 is larger than S(32)=36, so 28 is not in the sequence.
Programs
-
Maple
nxtSqr := proc(n) local d,y,x ; for d in sort(convert(numtheory[divisors](n),list)) do if d >= n/d then y := (d+n/d)/2 ; if type(y,'integer') then x := d-y ; if n+x^2 = y^2 then return y^2 ; end if; end if; end if; end do: return -1 ; end proc: isA172412 := proc(n) local y2; if n mod 4 = 0 then y2 := nxtSqr(n) ; for a from n+4 by 4 do if a > y2 then return true; elif nxtSqr(a) < y2 then return false; end if; end do: else false; end if; end proc: for n from 0 to 500 by 4 do if isA172412(n) then printf("%d,",n); end if; end do:
Comments