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.
%I A139544 #21 Feb 11 2025 13:41:31 %S A139544 1,2,4,6,10,14,18,22,26,30,34,38,42,46,50,54,58,62,66,70,74,78,82,86, %T A139544 90,94,98,102,106,110,114,118,122,126,130,134,138,142,146,150,154,158, %U A139544 162,166,170,174,178,182,186,190,194,198,202,206,210,214,218,222,226,230 %N A139544 Numbers which are not the difference of two squares of positive integers. %C A139544 Conjecture: these numbers do not occur in A139491. %C A139544 Complement sequence to A024352. %C A139544 All odd numbers 2k+1 for k>0 can be represented by (k+1)^2-k^2. All multiples 4k for k>1 can be represented by (k+1)^2-(k-1)^2. No number of the form 4k+2 is the difference of two squares because, modulo 4, the differences of two squares are 0, 1, or 3. [_T. D. Noe_, Apr 27 2009] %C A139544 A024359(a(n)) = 0. - _Reinhard Zumkeller_, Nov 09 2012 %H A139544 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1). %t A139544 a[1] = 1; a[2] = 2; a[3] = 4; a[n_] := 4*n-10; Array[a, 60] (* _Jean-François Alcover_, May 27 2015 *) %o A139544 (Haskell) %o A139544 a139544 n = a139544_list !! (n-1) %o A139544 a139544_list = 1 : 2 : 4 : tail a016825_list %o A139544 -- _Reinhard Zumkeller_, Nov 09 2012 %o A139544 (PARI) is(n)=n%4==2||n==1||n==4 \\ _Charles R Greathouse IV_, May 31 2013 %o A139544 (Python) %o A139544 def A139544(n): return 1<<n-1 if n<4 else (n<<2)-10 # _Chai Wah Wu_, Feb 11 2025 %Y A139544 Cf. A024352, A016825. %K A139544 nonn,easy %O A139544 1,2 %A A139544 _Artur Jasinski_, Apr 25 2008 %E A139544 Corrected by _T. D. Noe_, Apr 27 2009