A105349 Characteristic sequence for the Pell numbers.
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, 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, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0
Crossrefs
Cf. A000129.
Programs
-
Mathematica
a[n_] := If[Or @@ (IntegerQ[Sqrt[#]]& /@ (2*n^2 + {-1, 1})), 1, 0]; Array[a, 100, 0] (* Amiram Eldar, Jun 20 2024 *)
Formula
G.f.: Sum_{k>=0} x^A000129(k).