|
|
A345379
|
|
Number of terms m <= n, where m is a term in the bisection of Lucas numbers (A005248).
|
|
1
|
|
|
0, 0, 1, 2, 2, 2, 2, 3, 3, 3, 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, 4, 4, 4, 4, 4, 4, 4, 4, 4, 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, 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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
LINKS
|
|
|
EXAMPLE
|
a(0)=a(1)=0, since the least term in A005248 is 2.
a(2)=1 since A005248(0) = 2 is followed in that sequence by 3.
a(k)=3 for 3 <= k <= 6 since the first terms of A005248 are {0, 2, 3, 7}.
|
|
MATHEMATICA
|
Block[{a = 3, b = 1, nn = 105, 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] ] (* or *)
{0}~Join~Accumulate@ ReplacePart[ConstantArray[0, Last[#]], Map[# -> 1 &, #]] &@ LucasL@ Range[0, 10, 2] (* Michael De Vlieger, Jun 16 2021 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|