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.

A081412 Largest prime divisors of differences between consecutive primes.

This page as a plain text file.
%I A081412 #15 Mar 04 2025 07:35:04
%S A081412 2,2,2,2,2,2,2,3,2,3,2,2,2,3,3,2,3,2,2,3,2,3,2,2,2,2,2,2,7,2,3,2,5,2,
%T A081412 3,3,2,3,3,2,5,2,2,2,3,3,2,2,2,3,2,5,3,3,3,2,3,2,2,5,7,2,2,2,7,3,5,2,
%U A081412 2,3,2,3,3,2,3,2,2,2,5,2,5,2,3,2,3,2,2,2,2,3,2,2,2,2,3,3,2,3,3,5,3,3,2,3,5
%N A081412 Largest prime divisors of differences between consecutive primes.
%C A081412 If a(n)=2, then corresponding prime-difference is a power of 2.
%C A081412 a(n)=2 for twin-prime differences.
%H A081412 Robert Israel, <a href="/A081412/b081412.txt">Table of n, a(n) for n = 2..10000</a>
%F A081412 a(n) = A006530(A001223(n)).
%p A081412 lpf:= t -> max(numtheory:-factorset(t)):
%p A081412 P:= [seq(ithprime(i),i=1..200)]:
%p A081412 G:= P[2..-1]-P[1..-2]:
%p A081412 A:= map(lpf,G[2..-1]): # _Robert Israel_, Mar 03 2025
%t A081412 Table[FactorInteger[Prime[w+1]-Prime[w]][[ -1, 1]], {w, 2, 256}]
%t A081412 FactorInteger[#][[-1,1]]&/@Differences[Prime[Range[2,110]]] (* _Harvey P. Dale_, Sep 24 2017 *)
%o A081412 (PARI) a(n) = vecmax(factor(prime(n+1)-prime(n))[, 1]); \\ _Michel Marcus_, Mar 27 2020
%Y A081412 Cf. A001223, A006530, A081413, A000230.
%K A081412 nonn
%O A081412 2,1
%A A081412 _Labos Elemer_, Apr 02 2003