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.

A255615 a(n) is the number of even A098550 terms less than 2*prime(n) but occurring after 2*prime(n).

Original entry on oeis.org

0, 0, 0, 3, 1, 2, 1, 0, 0, 1, 3, 1, 1, 3, 1, 1, 1, 1, 0, 1, 1, 3, 0, 0, 0, 2, 1, 0, 1, 0, 1, 2, 1, 2, 0, 0, 2, 0, 0, 1, 2, 1, 1, 0, 0, 0, 4, 3, 2, 2, 2, 0, 0, 4, 5, 1, 2, 1, 1, 2, 0, 1, 0, 1, 0, 0, 0, 2, 0, 0, 1, 1, 2, 1, 2, 1, 0, 1, 2, 2, 4, 4, 1, 0, 0, 1, 1
Offset: 1

Views

Author

Vladimir Shevelev, Feb 28 2015

Keywords

Examples

			Let A=A098550. Let n=4, prime(4)=7, 2*prime(4)=14 = A(8). We have 2=A(2), 4=A(4), 6=A(10), 8=A(6), 10=A(16), 12=A(12). Thus 6,10 and 12 appear in A later than 14. So a(4)=3.
		

Crossrefs

Programs

  • Mathematica
    terms = 87;
    f[lst_] := Block[{k = 4}, While[ GCD[ lst[[-2]], k] == 1 || GCD[ lst[[-1]], k] > 1 || MemberQ[lst, k], k++]; Append[lst, k]]; A098550 = Nest[f, {1, 2, 3}, 12 terms] ;
    a[n_] := Module[{p, pos}, p = Prime[n]; pos = FirstPosition[A098550, 2 p][[1]]; Count[A098550[[pos+1 ;; 12 terms]], k_ /; EvenQ[k] && k < 2 p]];
    Array[a, terms] (* Jean-François Alcover, Dec 12 2018, after Robert G. Wilson v in A098550 *)

Extensions

More terms from Peter J. C. Moses, Feb 28 2015