|
|
A368217
|
|
a(n) is the first number == 1 (mod n) that is the product of n primes, counted by multiplicity.
|
|
1
|
|
|
2, 9, 28, 81, 176, 15625, 288, 6561, 1792, 137781, 17920, 244140625, 30720, 7971615, 311296, 43046721, 1492992, 3814697265625, 2752512, 3486784401, 38797312, 242137805625, 28311552, 59604644775390625, 184549376, 51684605176023, 2583691264, 63546645708225, 9512681472, 41858774825571336448888891
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
a(n) is the first number k == 1 (mod n) such that A001222(k) = n.
|
|
LINKS
|
|
|
EXAMPLE
|
a(4) = 81 because 81 == 1 (mod 4) and 81 = 3^4 is the product of 4 primes, counted by multiplicity, and no smaller number works.
|
|
MAPLE
|
f:= proc(n) uses priqueue; local p, x, Aprimes, v;
initialize(Aprimes);
p:= 2;
while n mod p = 0 do p:= nextprime(p) od:
insert([-p^n, p, 0], Aprimes);
do
v:= extract(Aprimes);
x:= -v[1];
if x mod n = 1 then return x fi;
if v[3] < n then
insert([v[1], v[2], v[3]+1], Aprimes);
p:= nextprime(v[2]);
while n mod p = 0 do p:= nextprime(p) od;
x:= x * (p/v[2])^(n-v[3]);
insert([-x, p, v[3]], Aprimes);
fi;
od;
end proc:
f(1):= 2:
map(f, [$1..30]);
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|