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.

A345376 Number of Companion Pell numbers m <= n.

This page as a plain text file.
%I A345376 #12 Jun 23 2021 10:50:56
%S A345376 0,0,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
%T A345376 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
%U A345376 5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6
%N A345376 Number of Companion Pell numbers m <= n.
%C A345376 Table 1 of Andrica 2021 paper (p. 24) refers to A002203 as "Pell-Lucas" numbers.
%H A345376 Michael De Vlieger, <a href="/A345376/b345376.txt">Table of n, a(n) for n = 0..10000</a>
%H A345376 Dorin Andrica, Ovidiu Bagdasar, and George Cătălin Tųrcąs, <a href="https://doi.org/10.2478/auom-2021-0002">On some new results for the generalised Lucas sequences</a>, An. Şt. Univ. Ovidius Constanţa (Romania, 2021) Vol. 29, No. 1, 17-36. See Section 5.2, pp. 32-33, Table 3.
%e A345376 The Pell-Lucas numbers A002203 are 2, 2, 6, 14, 34, 82, ...
%e A345376 a(0)=a(1)=0, since there are no Pell-Lucas numbers less than or equal to 0 and 1, respectively.
%e A345376 a(2)=a(3)=a(4)=a(5)=2, since the first 2 Pell-Lucas numbers, 2 and 2, are less than or equal to 2, 3, 4, and 5, respectively.
%t A345376 Block[{a = 2, b = -1, nn = 64, u, v = {}}, u = {2, a}; Do[AppendTo[u, Total[{-b, a} u[[-2 ;; -1]]]]; AppendTo[v, Count[u, _?(# <= i &)]], {i, nn}]; {Boole[First[u] <= 0]}~Join~v]  (* _Michael De Vlieger_, Jun 16 2021 *)
%Y A345376 Cf. A002203, A108852 (Fibonacci), A130245 (Lucas), A335741 (Pell).
%K A345376 nonn,easy
%O A345376 0,3
%A A345376 _Ovidiu Bagdasar_, Jun 16 2021