OFFSET
0,3
COMMENTS
Conjecture: every prime divides a(n) for infinitely many n, and if K(p) = (k(1), k(2),...) is the maximal subsequence of indices n such that p divides a(n), then the difference sequence of K(p) is eventually periodic; indeed, K(p) is purely periodic for the first 7 primes, with respective period lengths 6, 5, 18, 28, 16, 14, 35:
p = 2: (1, 2, 2, 1, 3, 3),
p = 3: (1, 4, 3, 8, 8).
See A377109 for a guide to related sequences.
LINKS
Index entries for linear recurrences with constant coefficients, signature (8,-14,-8,23).
FORMULA
a(n) = 8*a(n-1) - 14*a(n-2) - 8*a(n-3) + 23*a(n-4), with a(0)=0, a(1)=0, a(3)=2, a(4)=12.
G.f.: (2 x^2 (-1 + 2 x))/(-1 + 8 x - 14 x^2 - 8 x^3 + 23 x^4).
EXAMPLE
(2 + sqrt(2) + sqrt(3))^3 = 9 + 4*sqrt(2) + 4*sqrt(3) + 2*sqrt(6), so a(3) = 2.
MATHEMATICA
(* Program 1 generates sequences A377109-A37712. *)
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]];
s4 (* Peter J. C. Moses, Oct 16 2024 *)
(* Program 2 generates this sequence. *)
LinearRecurrence[{8, -14, -8, 23}, {0, 0, 2, 12}, 12].
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Oct 20 2024
STATUS
approved