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.

A267958 4 times A042965.

This page as a plain text file.
%I A267958 #20 Sep 01 2024 10:43:11
%S A267958 0,4,12,16,20,28,32,36,44,48,52,60,64,68,76,80,84,92,96,100,108,112,
%T A267958 116,124,128,132,140,144,148,156,160,164,172,176,180,188,192,196,204,
%U A267958 208,212,220,224,228,236,240,244,252,256,260,268,272,276,284,288,292,300,304
%N A267958 4 times A042965.
%C A267958 Ordered list of differences between even squares.
%H A267958 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1).
%F A267958 Numbers of the form (2m)^2 - (2n)^2, sorted.
%F A267958 From _Chai Wah Wu_, Sep 01 2024: (Start)
%F A267958 a(n) = a(n-1) + a(n-3) - a(n-4) for n > 4.
%F A267958 G.f.: 4*x^2*(x + 1)^2/(x^4 - x^3 - x + 1). (End)
%e A267958 (2*0)^2 - (2*0)^2 = 0,
%e A267958 (2*1)^2 - (2*0)^2 = 4,
%e A267958 (2*2)^2 - (2*1)^2 = 12,
%e A267958 (2*2)^2 - (2*0)^2 = 16,
%e A267958 (2*3)^2 - (2*2)^2 = 20,
%e A267958 ...
%p A267958 a := proc(n) option remember; if n = 1 then 0 elif n = 2 then 4 elif n = 3 then 12 else a(floor((1/2)*n)) + a(1+ceil((1/2)*n)) end if; end proc:
%p A267958 seq(a(n), n = 1..50); # _Peter Bala_, Aug 03 2022
%o A267958 (Python)
%o A267958 def DifferenceOfEvenSquares(maximumBound):
%o A267958     sequence = set([0])
%o A267958     for x in range(0, maximumBound+1, 4):
%o A267958         if x % 16 != 8:
%o A267958             sequence.add(x)
%o A267958     print(sorted(sequence))
%Y A267958 Cf. A008590, A042965.
%K A267958 easy,nonn
%O A267958 1,2
%A A267958 _Matthew Burch_, Jan 22 2016