login
Composite numbers k that divide A001644(k) - 1.
0

%I #25 May 03 2024 17:26:30

%S 182,25201,54289,63618,194390,750890,804055,1889041,2487941,3542533,

%T 3761251,6829689,12032021,12649337,18002881

%N Composite numbers k that divide A001644(k) - 1.

%C If k is prime, k divides A001644(k) - 1; and since A001644(k) satisfies a tribonacci recurrence, these numbers could be called tribonacci pseudoprimes.

%e (A001644(182)-1)/182 = 8056145960961609628091266244940745410646318417.

%p A001644:=proc(n) option remember: if n=0 then 3 elif n=1 then 1 elif n=2 then 3 else A001644(n-1)+A001644(n-2)+A001644(n-3) fi end:

%p test:=n->A001644(n) mod n = 1:select(test and not isprime, [seq(n, n=1..100000)]);

%t 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 *)

%o (Python)

%o from sympy import isprime

%o from itertools import count, islice

%o def agen(): # generator of terms

%o t0, t1, t2 = 3, 1, 3

%o for k in count(1):

%o t0, t1, t2 = t1, t2, t0+t1+t2

%o if k > 1 and not isprime(k) and (t0-1)%k == 0:

%o yield k

%o print(list(islice(agen(), 5))) # _Michael S. Branicky_, Apr 07 2024

%Y Cf. A001644.

%Y Cf. A005845 (composite k that divide Lucas(k) - 1).

%Y Cf. A013998 (composite k that divide Perrin(k) - 1).

%K nonn,more

%O 1,1

%A _Robert FERREOL_, Apr 06 2024

%E a(13)-a(15) from _Amiram Eldar_, Apr 07 2024