# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a105349 Showing 1-1 of 1 %I A105349 #10 Jun 20 2024 02:37:23 %S A105349 1,1,1,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0, %T A105349 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, %U A105349 0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 %N A105349 Characteristic sequence for the Pell numbers. %H A105349 Index entries for characteristic functions. %F A105349 G.f.: Sum_{k>=0} x^A000129(k). %t A105349 a[n_] := If[Or @@ (IntegerQ[Sqrt[#]]& /@ (2*n^2 + {-1, 1})), 1, 0]; Array[a, 100, 0] (* _Amiram Eldar_, Jun 20 2024 *) %Y A105349 Cf. A000129. %K A105349 easy,nonn %O A105349 0,1 %A A105349 _Paul Barry_, Apr 01 2005 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE