cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A368217 a(n) is the first number == 1 (mod n) that is the product of n primes, counted by multiplicity.

Original entry on oeis.org

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
Offset: 1

Views

Author

Robert Israel, Dec 17 2023

Keywords

Comments

a(n) is the first number k == 1 (mod n) such that A001222(k) = n.
A053669(n)^n <= a(n) <= A034694(n).
If n is in A007694 then a(n) = A053669(n)^n.

Examples

			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.
		

Crossrefs

Programs

  • 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]);