%I #12 Dec 18 2023 12:22:12
%S 2,9,28,81,176,15625,288,6561,1792,137781,17920,244140625,30720,
%T 7971615,311296,43046721,1492992,3814697265625,2752512,3486784401,
%U 38797312,242137805625,28311552,59604644775390625,184549376,51684605176023,2583691264,63546645708225,9512681472,41858774825571336448888891
%N a(n) is the first number == 1 (mod n) that is the product of n primes, counted by multiplicity.
%C a(n) is the first number k == 1 (mod n) such that A001222(k) = n.
%C A053669(n)^n <= a(n) <= A034694(n).
%C If n is in A007694 then a(n) = A053669(n)^n.
%H Robert Israel, <a href="/A368217/b368217.txt">Table of n, a(n) for n = 1..1000</a>
%e 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.
%p f:= proc(n) uses priqueue; local p, x, Aprimes, v;
%p initialize(Aprimes);
%p p:= 2;
%p while n mod p = 0 do p:= nextprime(p) od:
%p insert([-p^n,p,0],Aprimes);
%p do
%p v:= extract(Aprimes);
%p x:= -v[1];
%p if x mod n = 1 then return x fi;
%p if v[3] < n then
%p insert([v[1],v[2],v[3]+1],Aprimes);
%p p:= nextprime(v[2]);
%p while n mod p = 0 do p:= nextprime(p) od;
%p x:= x * (p/v[2])^(n-v[3]);
%p insert([-x,p,v[3]],Aprimes);
%p fi;
%p od;
%p end proc:
%p f(1):= 2:
%p map(f, [$1..30]);
%Y Cf. A001222, A007694, A034694, A053669.
%K nonn
%O 1,1
%A _Robert Israel_, Dec 17 2023