login
A105403
Numbers n such that prime(n)-1 and prime(n+1)-1 have the same largest prime factor.
6
2, 30, 53, 217
OFFSET
1,1
COMMENTS
The PARI program below is a generalization of this type of sequence. These numbers are rare. Are they finite? Proof?
No more terms between 217 and 3090000. - R. J. Mathar, Feb 14 2008
No more terms < 5760000. - David Wasserman, May 02 2008
No more terms < 11078936. - Otis Tweneboah, Pratik Koirala, Eugene Fiorini, Nathan Fox, Jun 30 2015
No more terms < 50000000 (~40 minutes computation time). - Manfred Scheucher, Jul 25 2015
No more terms < 100000000. Conjecture: sequence is full. - Jon E. Schoenfield, Jul 25 2015
LINKS
FORMULA
{i: A023503(i) = A023503(i+1)}. - R. J. Mathar, Feb 14 2008
EXAMPLE
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.
MATHEMATICA
Select[Range@ 1000000, FactorInteger[Prime[#] - 1][[-1, 1]] == FactorInteger[Prime[# + 1] - 1][[-1, 1]] &] (* Michael De Vlieger, Jul 25 2015 *)
PROG
(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) }
(PARI) gpf(n)=if(n>1, my(f=factor(n)[, 1]); f[#f], 1)
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
n=0; forprime(p=2, 1e9, n++; if(is(0, p), print1(n", "))) \\ Charles R Greathouse IV, Aug 27 2015
CROSSREFS
Cf. A023503.
Sequence in context: A184238 A285220 A078208 * A134644 A244379 A189100
KEYWORD
hard,nonn
AUTHOR
Cino Hilliard, May 01 2005
STATUS
approved