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.

A085378 Difference between primes p and the largest prime divisor of p-1.

This page as a plain text file.
%I A085378 #19 Sep 08 2016 03:31:01
%S A085378 3,4,6,10,15,16,12,22,26,34,36,36,24,40,30,56,56,64,70,66,42,78,94,96,
%T A085378 86,54,106,106,120,118,120,116,112,146,144,160,84,130,90,176,172,190,
%U A085378 190,188,204,186,114,210,204,222,236,246,255,132,202,266,254,274,236
%N A085378 Difference between primes p and the largest prime divisor of p-1.
%C A085378 This sequence contains only one prime number, the 3.
%e A085378 For prime 107 we have 107 - 53 = 54.
%p A085378 A085378 := proc(n)
%p A085378     ithprime(n)-A023503(n) ;
%p A085378 end proc:
%p A085378 seq( A085378(n),n=3..80) ; # _R. J. Mathar_, Sep 07 2016
%t A085378 #-FactorInteger[#-1][[-1,1]]&/@Prime[Range[3,70]] (* _Harvey P. Dale_, Jan 04 2012 *)
%o A085378 (PARI) cminuspm1(n) = \ prime - maxprime of prime-1 { forprime(x=5,n, forstep(p=x,2,-1, if(isprime(p) & (x-1)%p==0,print1(x-p,","); break); ) ) }
%K A085378 easy,nonn
%O A085378 3,1
%A A085378 _Cino Hilliard_, Aug 12 2003