A139544 Numbers which are not the difference of two squares of positive integers.
1, 2, 4, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 62, 66, 70, 74, 78, 82, 86, 90, 94, 98, 102, 106, 110, 114, 118, 122, 126, 130, 134, 138, 142, 146, 150, 154, 158, 162, 166, 170, 174, 178, 182, 186, 190, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230
Offset: 1
Links
- Index entries for linear recurrences with constant coefficients, signature (2,-1).
Programs
-
Haskell
a139544 n = a139544_list !! (n-1) a139544_list = 1 : 2 : 4 : tail a016825_list -- Reinhard Zumkeller, Nov 09 2012
-
Mathematica
a[1] = 1; a[2] = 2; a[3] = 4; a[n_] := 4*n-10; Array[a, 60] (* Jean-François Alcover, May 27 2015 *)
-
PARI
is(n)=n%4==2||n==1||n==4 \\ Charles R Greathouse IV, May 31 2013
-
Python
def A139544(n): return 1<
Chai Wah Wu, Feb 11 2025
Extensions
Corrected by T. D. Noe, Apr 27 2009
Comments