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.

A249739 The smallest prime whose square divides n, 1 if n is squarefree.

This page as a plain text file.
%I A249739 #25 Feb 11 2021 03:32:04
%S A249739 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,
%T A249739 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,
%U A249739 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
%N A249739 The smallest prime whose square divides n, 1 if n is squarefree.
%C A249739 A249740 gives the corresponding largest prime.
%C A249739 If n belongs to A013929, then a(n)>1. - _Robert G. Wilson v_, Nov 16 2016
%H A249739 Antti Karttunen, <a href="/A249739/b249739.txt">Table of n, a(n) for n = 1..10000</a>
%F A249739 a(n) = A020639(A003557(n)). - _Amiram Eldar_, Feb 11 2021
%t A249739 Table[If[SquareFreeQ@ n, 1, p = 2; While[! Divisible[n, p^2], p = NextPrime@ p]; p], {n, 120}] (* _Michael De Vlieger_, Nov 15 2016 *)
%o A249739 (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)))))))
%o A249739 (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
%Y A249739 Cf. A003557, A005117, A013929, A020639, A046027, A249717.
%Y A249739 Differs from A071773 and A249740 for the first time at n=36, where a(36) = 2, while A249740(36) = 3 and A071773(36) = 6.
%K A249739 nonn
%O A249739 1,4
%A A249739 _Antti Karttunen_, Nov 04 2014