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.

A260360 The absolute difference between the largest prime factors of prime(n)-1 and prime(n+1)-1.

Original entry on oeis.org

0, 1, 2, 2, 1, 1, 8, 4, 2, 2, 2, 2, 16, 10, 16, 24, 6, 4, 4, 10, 28, 30, 8, 2, 12, 36, 50, 4, 0, 6, 4, 6, 14, 32, 8, 10, 80, 40, 46, 84, 14, 16, 4, 4, 4, 30, 76, 94, 10, 12, 12, 0, 3, 129, 64, 62, 18, 16, 40, 26, 56, 14, 18, 66, 68, 4, 166, 144, 18, 168, 118, 30, 24, 184, 94, 86, 6, 12, 2, 12, 36, 40, 70, 56, 10
Offset: 2

Views

Author

Keywords

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?

Examples

			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.
		

Crossrefs

Programs

  • 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 *)
  • 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

Formula

a(n) = abs(A023503(n+1) - A023503(n)). - Robert Israel, Aug 06 2015