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!)
A151918 a(n) = k! - prime(n) where k is the smallest number for which prime(n) <= k!. 1
0, 3, 1, 17, 13, 11, 7, 5, 1, 91, 89, 83, 79, 77, 73, 67, 61, 59, 53, 49, 47, 41, 37, 31, 23, 19, 17, 13, 11, 7, 593, 589, 583, 581, 571, 569, 563, 557, 553, 547, 541, 539, 529, 527, 523, 521, 509, 497, 493, 491, 487, 481, 479, 469, 463, 457, 451, 449, 443, 439, 437 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
How many times does each prime number appear in this sequence?
Are there infinitely many solutions of the form
(k!-p(n)) = p(r_1)*...*p(r_i); r_i < n for all i?
LINKS
FORMULA
a(n) = A048765(prime(n)) - prime(n). - R. J. Mathar, Aug 25 2010
EXAMPLE
a(1) = 2! - p(1) = 2 - 2 = 0;
a(2) = 3! - p(2) = 6 - 3 = 3;
a(3) = 3! - p(3) = 6 - 5 = 1;
a(4) = 4! - p(4) = 24 - 7 = 17;
a(5) = 4! - p(5) = 24 - 11 = 13;
a(6) = 4! - p(6) = 24 - 13 = 11;
a(7) = 4! - p(7) = 24 - 17 = 7;
a(8) = 4! - p(8) = 24 - 19 = 5;
a(9) = 4! - p(9) = 24 - 23 = 1;
a(10) = 5! - p(10) = 120 - 29 = 91;
etc.
MAPLE
A048765 := proc(n) for i from 1 do if i! >= n then return i! ; end if; end do: end proc:
A151918 := proc(n) p := ithprime(n) ; A048765(p)-p ; end proc:
seq(A151918(n), n=1..80) ; # R. J. Mathar, Aug 25 2010
MATHEMATICA
Module[{fs=Range[10]!, p}, Join[{0}, Flatten[Table[p=Prime[n]; Select[ fs, #>p&, 1]-p, {n, 2, 70}]]]] (* Harvey P. Dale, Oct 04 2013 *)
CROSSREFS
Sequence in context: A188645 A060281 A350078 * A089974 A346039 A143849
KEYWORD
easy,nonn
AUTHOR
Ctibor O. Zizka, Apr 06 2008
EXTENSIONS
More terms from R. J. Mathar, Aug 25 2010
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 July 9 01:55 EDT 2024. Contains 374171 sequences. (Running on oeis4.)