login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A137322 a(n) = k! - A051674(n), where k is the smallest number for which A051674(n) <= k! where A051674(n) = prime(n)^prime(n). 0
2, 93, 1915, 2805257, 1022362697389, 52812321503747, 296760465891270915823, 13532790387670672394876021, 244372391812343146601953447089433, 11196066938065133911754151366849886273516531, 3328707950474207400029638710843582600755265569 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
a(4) = 10! - prime(4)^prime(4) = 3628800 - 823543 = 2805257.
MATHEMATICA
a[n_] := Module[{p = Prime[n]^Prime[n], k = 1}, While[k! < p, k++]; k! - p]; Array[a, 11] (* Amiram Eldar, Mar 12 2022 *)
PROG
(PARI) f(n) = my(p = prime(n)); p^p;
a(n) = my(k=1, P=f(n)); until(k! >= P, k++); k!-P; \\ Michel Marcus, Mar 12 2022
CROSSREFS
Sequence in context: A365852 A042057 A214542 * A239006 A248627 A290936
KEYWORD
easy,nonn
AUTHOR
Ctibor O. Zizka, Apr 06 2008
EXTENSIONS
Corrected and extended by Michel Marcus, Mar 12 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 10:01 EDT 2024. Contains 371967 sequences. (Running on oeis4.)