A377109 a(n) = coefficient of the term that is independent of sqrt(2), sqrt(3), and sqrt(6) in the expansion of (2 + sqrt(2) + sqrt(3))^n.
1, 2, 9, 38, 185, 922, 4689, 23998, 123217, 633458, 3258489, 16765718, 86273225, 443967370, 2284733313, 11757749038, 60508271137, 311391065570, 1602499602537, 8246883961094, 42440638964825, 218410733951098, 1123999345270833, 5784397706237854
Offset: 0
Examples
(2 + sqrt(2) + sqrt(3))^3 = 9 + 4*sqrt(2) + 4*sqrt(3) + 2*sqrt(6), so a(3) = 9.
Links
- Index entries for linear recurrences with constant coefficients, signature (8,-14,-8,23).
Programs
-
Mathematica
(* Program 1 generates sequences A377109-A377112. *) tbl = Table[Expand[(2 + Sqrt[2] + Sqrt[3])^n], {n, 0, 24}]; u = MapApply[{#1/#2, #2} /. {1, #} -> {{1}, {#}} &, Map[({#1, #1 /. ^ -> 1} &), Map[(Apply[List, #1] &), tbl]]]; {s1, s2, s3, s4} = Transpose[(PadRight[#1, 4] &) /@ Last /@ u][[1 ;; 4]]; s1 (* Peter J. C. Moses, Oct 16 2024 *) (* Program 2 generates this sequence. *) LinearRecurrence[{8, -14, -8, 23}, {1, 2, 9, 38}, 15] (* Program 3 confirms the periodicity properties described in Comments. *) tbl = Table[Expand[(2 + Sqrt[2] + Sqrt[3])^n], {n, 0, 1000}]; u = MapApply[{#1/#2, #2} /. {1, #} -> {{1}, {#}} &, Map[({#1, #1 /. ^ -> 1} &), Map[(Apply[List, #1] &), tbl]]]; v = {s1, s2, s3, s4} = Transpose[(PadRight[#1, 4] &) /@ Last /@ u][[1 ;; 4]]; Position[Partition[list, Length[#], 1], Flatten[{_, #, _}]] &[seqtofind]; period[seq_] := (If[Last[#1] == {} || Length[#1] == Length[seq] - 1, 0, Length[#1]] &)[NestWhileList[Rest, Rest[seq], #1 != Take[seq, Length[#1]] &, 1]]; periodicityReport[seq_] := ({Take[seq, Length[seq] - Length[#1]], period[#1], Take[#1, period[#1]]} &)[Take[seq, -Length[ NestWhile[Rest[#1] &, seq, period[#1] == 0 &, 1, Length[seq]]]]]; seq = s1; Take[seq, 10] f[n_] := Flatten[Position[Mod[s1, Prime[n]], 0]]; d[n_] := Differences[f[n]]; Table[Take[f[n], 10], {n, 2, 4}] Table[Take[d[n], 10], {n, 2, 4}] Column[Table[{n, Prime[n], periodicityReport[d[Prime[n]]]}, {n, 1, 8}]] (* Peter J. C. Moses, Aug 07 2014, Oct 16 2024 *)
Formula
a(n) = 8*a(n-1) - 14*a(n-2) - 8*a(n-3) + 23*a(n-4), with a(0)=1, a(1)=2, a(3)=9, a(4)=38.
G.f.: (-1 + 6 x - 7 x^2 - 2 x^3)/(-1 + 8 x - 14 x^2 - 8 x^3 + 23 x^4).
Comments