login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Numbers n such that prime(n)-1 and prime(n+1)-1 have the same largest prime factor.
6

%I #35 Aug 27 2015 23:39:44

%S 2,30,53,217

%N Numbers n such that prime(n)-1 and prime(n+1)-1 have the same largest prime factor.

%C The PARI program below is a generalization of this type of sequence. These numbers are rare. Are they finite? Proof?

%C No more terms between 217 and 3090000. - _R. J. Mathar_, Feb 14 2008

%C No more terms < 5760000. - _David Wasserman_, May 02 2008

%C No more terms < 11078936. - _Otis Tweneboah_, _Pratik Koirala_, _Eugene Fiorini_, _Nathan Fox_, Jun 30 2015

%C No more terms < 50000000 (~40 minutes computation time). - _Manfred Scheucher_, Jul 25 2015

%C No more terms < 100000000. Conjecture: sequence is full. - _Jon E. Schoenfield_, Jul 25 2015

%H Manfred Scheucher, <a href="/A105403/a105403.sage.txt">Sage Script</a>

%F {i: A023503(i) = A023503(i+1)}. - _R. J. Mathar_, Feb 14 2008

%e The prime factorization of prime(217) - 1 = 1327 - 1 = 1326 is 2*3*13*17, and that of prime(218) - 1 = 1361 - 1 = 1360 is 2^4*5*17; each has 17 as its largest factor.

%t Select[Range@ 1000000, FactorInteger[Prime[#] - 1][[-1, 1]] == FactorInteger[Prime[# + 1] - 1][[-1, 1]] &] (* _Michael De Vlieger_, Jul 25 2015 *)

%o (PARI) \prime indices such that gd of prime(x)+ k and prime(x+m) + k are equal divpm1(n,m,k) = { local(x,l1,l2,v1,v2); for(x=2,n, v1 = ifactor(prime(x)+ k); v2 = ifactor(prime(x+m)+k); l1 = length(v1); l2 = length(v2); if(v1[l1] == v2[l2], print1(x",") ) ) } ifactor(n) = \Vector of the prime factors of n { local(f,j,k,flist); flist=[]; f=Vec(factor(n)); for(j=1,length(f[1]), for(k = 1,f[2][j],flist = concat(flist,f[1][j]) ); ); return(flist) }

%o (PARI) gpf(n)=if(n>1, my(f=factor(n)[,1]); f[#f], 1)

%o is(n,p=prime(n))=my(q=nextprime(p+1),g=gcd(p-1,q-1)); q\=g; p\=g; forprime(r=2,gpf(g), p/=r^valuation(p,r); q/=r^valuation(q,r)); p==1 && q==1

%o n=0;forprime(p=2,1e9,n++;if(is(0,p),print1(n", "))) \\ _Charles R Greathouse IV_, Aug 27 2015

%Y Cf. A023503.

%K hard,nonn

%O 1,1

%A _Cino Hilliard_, May 01 2005