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.
%I A348677 #64 Jun 11 2023 02:59:03 %S A348677 1,4,4,4,6,4,2,14,6,10,12,2,6,2,4,8,4,4,6,6,6,10,4,6,4,10,2,14,14,8, %T A348677 10,2,18,8,8,4,10,4,8,12,6,14,2,2,2,8,12,6,10,10,12,10,8,2,2,4,6,6,16, %U A348677 14,6,6,2,10,6,2,8,6,20,2,8,28,6,16,2,6,2,10,6,22,4,6,4,14,6,2 %N A348677 a(n) is the difference between A262275(n) and the next lower prime. %C A348677 This sequence can be used as an alternate method of approximating the prime-counting function pi(n). %H A348677 Alois P. Heinz, <a href="/A348677/b348677.txt">Table of n, a(n) for n = 1..10000</a> %H A348677 Michael P. May, <a href="https://doi.org/10.35834/2020/3202158">Properties of Higher-Order Prime Number Sequences</a>, Missouri J. Math. Sci. (2020) Vol. 32, No. 2, 158-170; and <a href="https://arxiv.org/abs/2108.04662">arXiv version</a>, arXiv:2108.04662 [math.NT], 2021. %H A348677 Michael P. May, <a href="https://arxiv.org/abs/2112.08941">Approximating the Prime Counting Function via an Operation on a Unique Prime Number Subsequence</a>, arXiv:2112.08941 [math.GM], 2021. %H A348677 Michael P. May, <a href="https://doi.org/10.35834/2023/3501105">Relationship Between the Prime-Counting Function and a Unique Prime Number Sequence</a>, Missouri J. Math. Sci. (2023), Vol. 35, No. 1, 105-116. %F A348677 a(n) = p_p'(n) - p_(p'(n) - 1), where p' is a prime number in the sequence A333242, p_p' is a prime number with index in A333242 (forms the prime number sequence A262275), and p_(p'(n)-1) is a prime number which is the next lower prime than those in A262275. %F A348677 a(n) = A001223(A000720(A262275(n)) - 1). %F A348677 a(n) = A262275(n) - A151799(A262275(n)). - _Alois P. Heinz_, Jan 06 2022 %e A348677 For n = 3, a(3) = 17 - 13 = 4. %p A348677 b:= proc(n) option remember; %p A348677 `if`(isprime(n), 1+b(numtheory[pi](n)), 0) %p A348677 end: %p A348677 g:= proc(n) option remember; local p; p:= g(n-1); %p A348677 do p:= nextprime(p); %p A348677 if b(p)::even then break fi %p A348677 od; p %p A348677 end: g(1):=3: %p A348677 a:= n-> (t-> t-prevprime(t))(g(n)): %p A348677 seq(a(n), n=1..86); # _Alois P. Heinz_, Jan 06 2022 %t A348677 fQ[n_]:=If[!PrimeQ[n]||(PrimeQ[n]&&FreeQ[lst,PrimePi[n]]),AppendTo[lst,n]];k=2;lst={1};While[k<10000000,fQ@k;k++];tab1=Select[lst,PrimeQ] %t A348677 lowerP[n_]:=Module[{m}, m=n;While[!PrimeQ[m-1],m--]; m-1] %t A348677 tab2=lowerP/@tab1 %t A348677 tab3=tab1-tab2 %Y A348677 Cf. A151799, A262275, A333242. %K A348677 nonn %O A348677 1,2 %A A348677 _Michael P. May_, Oct 30 2021