OFFSET
2,3
COMMENTS
a(n)=0 if and only if n is in A105403.
It is an open question whether there are infinitely many zeros in this sequence. Are there infinitely many terms below some fixed upper bound?
LINKS
Robert Israel, Table of n, a(n) for n = 2..10000
FORMULA
EXAMPLE
n=4: The prime factors of prime(4)-1 are 2,3 and the prime factors of prime(5)-1 are 2,5. The largest are 3 and 5, so a(4)=2.
MAPLE
B:= [seq(max(numtheory:-factorset(ithprime(i)-1)), i=2..101)]:
seq(abs(B[n+1]-B[n]), n=1..99); # Robert Israel, Aug 06 2015
MATHEMATICA
Table[Abs[FactorInteger[Prime[n] - 1][[-1, 1]] - FactorInteger[Prime[n + 1] - 1][[-1, 1]]], {n, 2, 86}] (* Michael De Vlieger, Jul 24 2015 *)
Rest[Abs[Differences[Table[FactorInteger[p-1][[-1, 1]], {p, Prime[ Range[ 90]]}]]]] (* Harvey P. Dale, Aug 08 2021 *)
PROG
(PARI) gpf(n) = if(n>1, vecmax(factor(n)[, 1]), 1);
a(n) = gpf(prime(n)-1) - gpf(prime(n+1)-1); \\ Michel Marcus, Aug 05 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved