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.

A085918 Primes p such that for some k the number of terms > 0 and < 1 in the Farey sequence of order k is p.

This page as a plain text file.
%I A085918 #17 Jul 06 2024 09:22:48
%S A085918 3,5,11,17,31,41,71,79,101,127,139,149,179,199,211,229,241,269,277,
%T A085918 307,359,383,431,449,541,773,829,881,1259,1307,1327,1493,1831,1933,
%U A085918 2141,2551,3373,3947,4127,4831,4957,5021,5153,5323,5431,5569,5813,6091,6329
%N A085918 Primes p such that for some k the number of terms > 0 and < 1 in the Farey sequence of order k is p.
%C A085918 Or, prime numbers of the form Sum_{j=2..k} phi(j). - _Jorge Coveiro_, Dec 22 2004. Examples: phi(2)+phi(3) = 3; phi(2)+phi(3)+phi(4) = 5; phi(2)+phi(3)+phi(4)+phi(5)+phi(6) = 11; phi(2)+phi(3)+phi(4)+phi(5)+phi(6)+phi(7) = 17.
%C A085918 Does this sequence have an infinite number of terms?
%H A085918 Amiram Eldar, <a href="/A085918/b085918.txt">Table of n, a(n) for n = 1..10000</a>
%e A085918 The Farey sequence of order 4 is {0, 1/4, 1/3, 1/2, 2/3, 3/4, 1}. The number of terms > 0 and < 1 is 5, which is prime, so 5 is a term.
%t A085918 Select[Accumulate[Table[EulerPhi[k], {k, 2, 150}]], PrimeQ] (* _Amiram Eldar_, Jul 06 2024 *)
%o A085918 (PARI) /* Farey sequence of order n */ fareycountp(n) = { for(x=2,n, y = farey(x); if(isprime(y),print1(y",")); ) }
%o A085918 farey(n) = { c=1; m=n*(n-2)+2; a=vector(m); for(x=1,n, for(y=x,n, v = x/y; if(v<1, c++; a[c]=v; ) ) ); a = vecsort(a); c=0; for(x=2,m, if(a[x]<>a[x-1] & a[x]<>0, \ print1(a[x]","); c++; ) ); return(c) }
%Y A085918 Cf. A078334, A005728, A101300, A000010.
%K A085918 easy,nonn
%O A085918 1,1
%A A085918 _Cino Hilliard_, Aug 16 2003
%E A085918 Definition corrected by _Jonathan Sondow_, Apr 21 2005