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 6 primes, with respective period lengths 1,5,3,17,2,13 and these periods:
p = 2: (1)
p = 3: (1, 2, 8, 9, 4)
p = 5: (21, 9, 10)
p = 7: (8, 42, 7, 19, 1, 2, 10, 31, 4, 11, 6, 34, 60, 23, 5, 9, 16)
p = 11: (9, 21)
p = 13: (15, 51, 45, 1, 2, 17, 41, 28, 54, 119, 13, 9, 25)
See A377109 for a guide to related sequences.
LINKS
FORMULA
a(n) = 6*a(n-2) + 6*a(n-3) for n >= 5. [Corrected by Georg Fischer, Oct 29 2024]
G.f.: (-1 - x + 2 x^2 + 6 x^3 + 6 x^4)/(-1 + 6 x^2 + 6 x^3).
EXAMPLE
((2^(1/3) + 2^(2/3)))^3 = 4 + 2 2^(1/3) + 2^(2/3), so a(3) = 4.
MATHEMATICA
tbl = Table[Expand[(2^(1/3) + 2^(2/3))^n], {n, 0, 24}];
Take[tbl, 6]
u = MapApply[{#1/#2, #2} /. {1, #} -> {{1}, {#}} &,
Map[({#1, #1 /. _^_ -> 1} &), Map[(Apply[List, #1] &), tbl]]];
{s1, s2, s3} = Transpose[(PadRight[#1, 3] &) /@ Last /@ u][[1 ;; 3]];
s1 (* Peter J. C. Moses, Oct 16 2024 *)
(* Program 2 generates (a(n)) for n>=1. *)
LinearRecurrence[{0, 6, 6}, {1, 1, 4, 6, 24}, 15]
(* Program 3 confirms the periodicity properties described in Comments. *)
tbl = Table[Expand[(2^(1/3) + 2^(2/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} = Transpose[(PadRight[#1, 3] &) /@ Last /@ u][[1 ;; 3]];
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 7 2014, Oct 16 2024 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Oct 24 2024
STATUS
approved