OFFSET
1,4
COMMENTS
A249739 gives the corresponding smallest prime.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
FORMULA
MATHEMATICA
a[n_] := If[(f = Select[FactorInteger[n], Last[#] > 1 &]) == {}, 1, f[[-1, 1]]]; Array[a, 100] (* Amiram Eldar, Feb 11 2021 *)
Table[If[SquareFreeQ[n], 1, Select[FactorInteger[n], #[[2]]>1&][[-1, 1]]], {n, 120}] (* Harvey P. Dale, Feb 28 2021 *)
PROG
(Scheme)
(define (A249740 n) (let loop ((n n) (p (A006530 n))) (cond ((= 1 n) n) ((zero? (modulo n (* p p))) p) (else (loop (/ n p) (A006530 (/ n p)))))))
;; Alternative version which is based on the given recurrence, and utilizes the memoizing definec-macro from Antti Karttunen's IntSeq-library:
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Nov 04 2014
STATUS
approved