A027418 Duplicate of A035508.
0, 2, 7, 20, 54, 143, 376, 986, 2583, 6764, 17710, 46367, 121392, 317810
Offset: 1
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.
a(0) = 0*1 mod 1 = 0; a(1) = 1*1 mod 2 = 1; a(2) = 1*2 mod 3 = 2; a(3) = 2*3 mod 5 = 1; a(4) = 3*5 mod 8 = 7.
With[{f = Fibonacci}, Table[Mod[f[n] * f[n+1], f[n+2]], {n, 0, 50}]] (* Amiram Eldar, Mar 28 2020 *)
a(n) = if (n % 2, 1, fibonacci(n+2) - 1); \\ Michel Marcus, Mar 29 2020
concat(0, Vec(x*(1 + 3*x - x^3) / ((1 + x)*(1 + x - x^2)*(1 - x - x^2)) + O(x^45))) \\ Colin Barker, Mar 29 2020
def a(n): f1 = 0 f2 = 1 for i in range(n): f = f1 + f2 f1 = f2 f2 = f return (f1 * f2) % (f1 + f2)
with(combinat): seq(fibonacci(2*n+1)-n-1, n = 1 .. 27); # Emeric Deutsch, Jun 01 2009
lst={};a=b=0;Do[b+=n+a;a+=n+b;AppendTo[lst,a],{n,0,2*4!}];lst Table[Fibonacci[2n+1]-n-1,{n,30}] (* or *) LinearRecurrence[{5,-8,5,-1},{0,2,9,29},30] (* Harvey P. Dale, Sep 24 2013 *)
Northwest corner: 1....3....4....8....9...11...12...21...22... 2....5....6...10...13...14...16...17...23... 7...15...18...19...28...36...39...40...44... 20..41...49...52...53...75...96..104..107... Examples: 12=8+3+1=F(6)+F(4)+F(2), zero odds, so 12 is in row 0. 28=21+5+2=F(8)+F(5)+F(3), two odds, so 28 is in row 2.
f[n_] := Module[{i = Ceiling[Log[GoldenRatio, Sqrt[5]*n]], v = {}, m = n}, While[i > 1, If[Fibonacci[i] <= m, AppendTo[v, 1]; m -= Fibonacci[i], If[v != {}, AppendTo[v, 0]]]; i--]; Total[Reverse[v][[1 ;; -1 ;; 2]]]]; T = GatherBy[SortBy[ Range[10^4], f], f]; Table[Table[T[[n - k + 1, k]], {k, n, 1, -1}], {n, 1, Length[T]}] // Flatten (* Amiram Eldar, Feb 04 2020 *)
Representation of 20 is 101010, three 1's and three 0's, so 20 is in the sequence. Representation of 22 is 1000001, two 1's and five 0's, so 22 is not in the sequence.
nn = 10; f = Join[{0}, Accumulate[Fibonacci[Range[2, 2*nn, 2] - 1]]]; t = Table[hi = f[[n+1]] - 1; Reverse[Table[hi - f[[i]], {i, n - 1}]], {n, 2, nn}]; t = Flatten[t] (* T. D. Noe, May 08 2012 *)
seq[count_, nConsec_] := Module[{cn = wnQ /@ Range[nConsec], s = {}, c = 0, k = nConsec + 1}, While[c < count, If[And @@ cn, c++; AppendTo[s, k - nConsec]]; cn = Join[Rest[cn], {wnQ[k]}]; k++]; s]; seq[50, 2] (* using the function wnQ[n] from A364006 *)
Table T(n, k) begins: 0 1, 2 3, 4, 5, 7 6, 8, 9, 10, 12, 13, 15, 20 11, 14, 16, 17, 18, 21, 22, 23, 25, 26, 28, 33, 34, 36, 41, 54 ...
\\ See Links section.
Comments