login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A249739 The smallest prime whose square divides n, 1 if n is squarefree. 7
1, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 2, 1, 3, 1, 2, 1, 1, 1, 2, 5, 1, 3, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 2, 7, 5, 1, 2, 1, 3, 1, 2, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 5, 2, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 2, 1, 3, 1, 2, 1, 1, 1, 2, 1, 7, 3, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
A249740 gives the corresponding largest prime.
If n belongs to A013929, then a(n)>1. - Robert G. Wilson v, Nov 16 2016
LINKS
FORMULA
a(n) = A020639(A003557(n)). - Amiram Eldar, Feb 11 2021
MATHEMATICA
Table[If[SquareFreeQ@ n, 1, p = 2; While[! Divisible[n, p^2], p = NextPrime@ p]; p], {n, 120}] (* Michael De Vlieger, Nov 15 2016 *)
PROG
(Scheme) (define (A249739 n) (let loop ((n n) (p (A020639 n))) (cond ((= 1 n) n) ((zero? (modulo n (* p p))) p) (else (loop (/ n p) (A020639 (/ n p)))))))
(PARI) a(n) = {f = factor(n/core(n)); vsq = select(x->((x%2) == 0), f[, 2], 1); if (#vsq, f[vsq[1], 1], 1); } \\ Michel Marcus, Mar 11 2017
CROSSREFS
Differs from A071773 and A249740 for the first time at n=36, where a(36) = 2, while A249740(36) = 3 and A071773(36) = 6.
Sequence in context: A285718 A205792 A370784 * A249740 A071773 A308993
KEYWORD
nonn
AUTHOR
Antti Karttunen, Nov 04 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 20:05 EDT 2024. Contains 371254 sequences. (Running on oeis4.)