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.

A081257 a(n) is the greatest prime factor of (n^3 - 1).

This page as a plain text file.
%I A081257 #34 Jun 24 2023 13:21:20
%S A081257 7,13,7,31,43,19,73,13,37,19,157,61,211,241,13,307,17,127,421,463,13,
%T A081257 79,601,31,37,757,271,67,29,331,151,1123,397,97,43,67,1483,223,547,
%U A081257 1723,139,631,283,109,103,61,181,43,2551,379,919,409,2971,79,103,3307,163
%N A081257 a(n) is the greatest prime factor of (n^3 - 1).
%C A081257 The record values here (as well as those for A081256) appear to match the terms of A002383 for n > 1. - _Bill McEachen_, Jun 19 2023
%H A081257 Jon E. Schoenfield, <a href="/A081257/b081257.txt">Table of n, a(n) for n = 2..10000</a> (first 999 terms from R. J. Mathar).
%F A081257 a(n) = A006530(A068601(n)). - _Michel Marcus_, Jun 19 2023
%e A081257 a(7)=19 because 7^3 - 1 = 342 = 2*3*3*19.
%p A081257 A081257 := proc(n)
%p A081257         A006530( n^3-1) ;
%p A081257 end proc: # _R. J. Mathar_, Jul 18 2015
%t A081257 FactorInteger[#][[-1,1]]&/@(Range[2,60]^3-1) (* _Harvey P. Dale_, Oct 09 2017 *)
%o A081257 (PARI) a(n)=my(f=factor(n^3-1)); f[#f~,1] \\ _Charles R Greathouse IV_, Mar 08 2017
%o A081257 (Python)
%o A081257 from sympy import primefactors
%o A081257 def A081257(n): return max(primefactors(n-1)+primefactors(n*(n+1)+1)) # _Chai Wah Wu_, Oct 15 2022
%Y A081257 Cf. A081256, A081258, A002383.
%Y A081257 Cf. A096175 (n^3-1 is an odd semiprime), A096176 ((n^3-1)/(n-1) is prime).
%K A081257 easy,nonn
%O A081257 2,1
%A A081257 _Jan Fricke_, Mar 14 2003
%E A081257 More terms from _Hugo Pfoertner_, Jun 21 2004