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.

A277708 a(n) = Least prime divisor of n with an odd exponent, or 1 if n is a perfect square.

This page as a plain text file.
%I A277708 #12 May 17 2017 17:54:17
%S A277708 1,2,3,1,5,2,7,2,1,2,11,3,13,2,3,1,17,2,19,5,3,2,23,2,1,2,3,7,29,2,31,
%T A277708 2,3,2,5,1,37,2,3,2,41,2,43,11,5,2,47,3,1,2,3,13,53,2,5,2,3,2,59,3,61,
%U A277708 2,7,1,5,2,67,17,3,2,71,2,73,2,3,19,7,2,79,5,1,2,83,3,5,2,3,2,89,2,7,23,3,2,5,2,97,2,11,1,101,2,103,2,3
%N A277708 a(n) = Least prime divisor of n with an odd exponent, or 1 if n is a perfect square.
%H A277708 Antti Karttunen, <a href="/A277708/b277708.txt">Table of n, a(n) for n = 1..10000</a>
%F A277708 a(n) = A008578(1+A277707(n)).
%F A277708 a(n) = A020639(A007913(n)).
%o A277708 (Scheme, two different implementations)
%o A277708 (define (A277708 n) (A008578 (+ 1 (A277707 n))))
%o A277708 (define (A277708 n) (A020639 (A007913 n)))
%o A277708 (PARI) a(n) = my(f = factor(core(n))); if (!#f~, 1, vecmin(f[,1])); \\ _Michel Marcus_, Oct 30 2016
%o A277708 (Python)
%o A277708 from sympy import primefactors
%o A277708 from sympy.ntheory.factor_ import core
%o A277708 def lpf(n): return 1 if n==1 else primefactors(n)[0]
%o A277708 def a(n): return lpf(core(n)) # _Indranil Ghosh_, May 17 2017
%Y A277708 Cf. A020639, A007913, A008578, A277707.
%Y A277708 Cf. A000290 (after its initial zero-term gives the positions of ones in this sequence).
%Y A277708 Cf. also A277698.
%K A277708 nonn
%O A277708 1,2
%A A277708 _Antti Karttunen_, Oct 28 2016