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.

A335741 Number of Pell numbers (A000129) <= n.

This page as a plain text file.
%I A335741 #28 Jun 25 2022 00:53:46
%S A335741 1,2,3,3,3,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,
%T A335741 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
%U A335741 6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7
%N A335741 Number of Pell numbers (A000129) <= n.
%C A335741 The sequence is constant on the interval A000129(k) < n <= A000129(k+1).
%H A335741 Michael De Vlieger, <a href="/A335741/b335741.txt">Table of n, a(n) for n = 0..10000</a>
%H A335741 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.
%F A335741 a(n) = 1+floor(log_alpha(2*sqrt(2)*n+1)), n>=0, where alpha=1+sqrt(2).
%e A335741 The Pell numbers A000129 are 0,1,2,5,12,29,70,...
%e A335741 We have a(2)=a(3)=a(4)=3, since there are three Pell numbers less than or equal to 2,3 and 4, respectively.
%t A335741 Block[{a = 2, b = -1, nn = 105, u, v = {}}, u = {0, 1}; 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 11 2021 *)
%t A335741 Module[{pn=LinearRecurrence[{2,1},{0,1},9],nn=100},Accumulate[Table[If[ MemberQ[ pn,n],1,0],{n,0,nn}]]] (* _Harvey P. Dale_, Apr 10 2022 *)
%Y A335741 Cf. A000129 (Pell Numbers), A108852 (Fibonacci), A130245 (Lucas), A130253 (Jacobsthal).
%Y A335741 Partial sums of A105349.
%K A335741 nonn
%O A335741 0,2
%A A335741 _Ovidiu Bagdasar_, Jun 20 2020