login
A254352
a(n) is the least composite x such that sigma(x) divides (x-1)^n but not (x-1)^(n-1), for n >= 2.
1
385, 21, 93, 235, 2899, 903, 1771, 3619, 651, 11935, 2667, 48895, 11811, 27559, 415555, 848995, 172011, 3153535, 761763, 1777447, 2752491, 7281799, 11010027, 28442407, 48758691, 113770279, 199753347, 466091143, 677207307, 2064117919, 3220807683, 7515217927
OFFSET
2,1
EXAMPLE
sigma(385) = 576; (385 - 1)^2 = 21743271936 and 21743271936 / 576 = 37748736.
sigma(21) = 32; (21 - 1)^3 = 8000 and 8000 / 32 = 250.
sigma(93) = 128; (93 - 1)^4 = 71639296 and 71639296 / 128 = 559682.
MAPLE
with(numtheory):P:=proc(q) local a, j, k, n; for k from 2 to q do
for n from 1 to q do if not isprime(n) then
if type((n-1)^k/sigma(n), integer) then
if not type((n-1)^(k-1)/sigma(n), integer) then lprint(k, n);
break; fi; fi; fi; od; od; end: P(10^9);
MATHEMATICA
a[n_] := Module[{k=4, s=7}, While[PrimeQ[k] || !(PowerMod[k-1, n, s] == 0 && PowerMod[k-1, n-1, s] > 0), k++; s=DivisorSigma[1, k]]; k]; Array[a, 11, 2] (* Amiram Eldar, Apr 08 2019 *)
PROG
(PARI) a(n) = {x = 4; sx = sigma(x); while(! (((x-1)^(n-1) % sx) && !((x-1)^n % sx)), x++; while (isprime(x), x++); sx = sigma(x)); x; } \\ Michel Marcus, Jan 30 2015
(PARI) isok(x, n) = my(sx=sigma(x)); (((x-1)^(n-1) % sx) && !((x-1)^n % sx));
a(n) = forcomposite(x=4, , if (isok(x, n), return(x))); \\ Michel Marcus, Apr 08 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Paolo P. Lava, Jan 30 2015
EXTENSIONS
a(22)-a(33) from Amiram Eldar, Apr 08 2019
STATUS
approved