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!)
A345668 Last prime minus distance to last prime. 0
1, 2, 1, 4, 3, 6, 5, 4, 3, 10, 9, 12, 11, 10, 9, 16, 15, 18, 17, 16, 15, 22, 21, 20, 19, 18, 17, 28, 27, 30, 29, 28, 27, 26, 25, 36, 35, 34, 33, 40, 39, 42, 41, 40, 39, 46, 45, 44, 43, 42, 41, 52, 51, 50, 49, 48, 47, 58, 57, 60, 59, 58, 57, 56, 55, 66, 65, 64 (list; graph; refs; listen; history; text; internal format)
OFFSET
3,2
LINKS
FORMULA
a(n) = p - (n-p) = 2*p - n where p is the largest prime < n.
a(n) = A151799(n) - A049711(n).
a(n) = A175856(n-1) - 1.
MATHEMATICA
a[n_] := 2 * NextPrime[n, -1] - n; Array[a, 100, 3] (* Amiram Eldar, Jun 21 2021 *)
CROSSREFS
Sequence in context: A351752 A361189 A004560 * A076981 A355678 A355679
KEYWORD
nonn
AUTHOR
Brian Beard, Jun 21 2021
EXTENSIONS
More terms from Jon E. Schoenfield, Jun 21 2021
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 08:27 EDT 2024. Contains 371964 sequences. (Running on oeis4.)