login
Numbers that divide no nonzero terms of A003422.
4

%I #17 Feb 18 2021 00:35:23

%S 3,6,8,9,12,13,15,16,18,20,21,24,25,26,27,28,29,30,32,33,35,36,39,40,

%T 42,43,44,45,47,48,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,

%U 68,69,70,72,75,76,78,79,80,81,83,84,85,86,87,88,90,91,92,93,94,95,96,97,98,99,100

%N Numbers that divide no nonzero terms of A003422.

%C Numbers k such that A013584(k) = 0.

%C If k is in the sequence, then so is every multiple of k.

%H Robert Israel, <a href="/A275608/b275608.txt">Table of n, a(n) for n = 1..10000</a>

%e 3 is in the sequence because A003422(1)=1 and A003422(2)=2 are not divisible by 3, and A003422(k) == 1 (mod 3) for k >= 3.

%e 4 is not in the sequence because A003422(3) = 4 is divisible by 4.

%p filter:= proc(n) local t,r,m;

%p r:= 1; t:= 1;

%p for m from 1 do

%p r:= r*m mod n;

%p if r = 0 then return true fi;

%p t:= t + r mod n;

%p if t = 0 then return false fi;

%p od;

%p end proc:

%p select(filter, [$2..100]);

%t okQ[n_] := Module[{t, r, m}, r = 1; t = 1; For[m = 1, True, m++, r = Mod[r*m, n]; If[r == 0, Return[True]]; t = Mod[t + r, n]; If[t == 0, Return[False]]]];

%t Select[Range[2, 100], okQ] (* _Jean-François Alcover_, Apr 12 2019, after _Robert Israel_ *)

%Y Cf. A003422, A013584.

%Y Complement of A049045.

%K nonn

%O 1,1

%A _Robert Israel_, Nov 14 2016