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.

A345668 Last prime minus distance to last prime.

This page as a plain text file.
%I A345668 #15 Jun 30 2021 12:44:58
%S A345668 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,
%T A345668 17,28,27,30,29,28,27,26,25,36,35,34,33,40,39,42,41,40,39,46,45,44,43,
%U A345668 42,41,52,51,50,49,48,47,58,57,60,59,58,57,56,55,66,65,64
%N A345668 Last prime minus distance to last prime.
%F A345668 a(n) = p - (n-p) = 2*p - n where p is the largest prime < n.
%F A345668 a(n) = A151799(n) - A049711(n).
%F A345668 a(n) = A175856(n-1) - 1.
%t A345668 a[n_] := 2 * NextPrime[n, -1] - n; Array[a, 100, 3] (* _Amiram Eldar_, Jun 21 2021 *)
%Y A345668 Cf. A049711, A151799, A175856.
%K A345668 nonn
%O A345668 3,2
%A A345668 _Brian Beard_, Jun 21 2021
%E A345668 More terms from _Jon E. Schoenfield_, Jun 21 2021