OFFSET
1,1
COMMENTS
EXAMPLE
(A001644(182)-1)/182 = 8056145960961609628091266244940745410646318417.
MAPLE
MATHEMATICA
seq[kmax_] := Module[{x = 1, y = 3, z = 7, s = {}, t}, Do[t = x + y + z; If[Mod[t, k] == 1 && CompositeQ[k], AppendTo[s, k]]; x = y; y = z; z = t, {k, 4, kmax}]; s]; seq[200000] (* Amiram Eldar, Apr 06 2024 *)
PROG
(Python)
from sympy import isprime
from itertools import count, islice
def agen(): # generator of terms
t0, t1, t2 = 3, 1, 3
for k in count(1):
t0, t1, t2 = t1, t2, t0+t1+t2
if k > 1 and not isprime(k) and (t0-1)%k == 0:
yield k
print(list(islice(agen(), 5))) # Michael S. Branicky, Apr 07 2024
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Robert FERREOL, Apr 06 2024
EXTENSIONS
a(13)-a(15) from Amiram Eldar, Apr 07 2024
STATUS
approved