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.

A097249 a(n) is the number of times we must iterate A097246, starting at n, before the result is squarefree.

This page as a plain text file.
%I A097249 #15 Nov 18 2021 11:06:13
%S A097249 0,0,0,1,0,0,0,1,1,0,0,2,0,0,0,2,0,1,0,1,0,0,0,2,1,0,1,1,0,0,0,2,0,0,
%T A097249 0,1,0,0,0,1,0,0,0,1,2,0,0,2,1,1,0,1,0,1,0,1,0,0,0,3,0,0,1,2,0,0,0,1,
%U A097249 0,0,0,1,0,0,1,1,0,0,0,3,2,0,0,2,0,0,0,1,0,2,0,1,0,0,0,2,0,1,1,1,0,0,0,1,0
%N A097249 a(n) is the number of times we must iterate A097246, starting at n, before the result is squarefree.
%C A097249 a(n) = Min{k: r(n,k)=r(n,k+1)}, where r(n,k)=A097246(r(n,k-1)), r(n,0)=n;
%C A097249 a(A005117(n))=0; a(A097250(n))=n and a(m)<n for m < A097250(n).
%H A097249 Antti Karttunen, <a href="/A097249/b097249.txt">Table of n, a(n) for n = 1..65537</a>
%F A097249 If A008966(n) = 1 [when n is in A005117], a(n) = 0, otherwise a(n) = 1 + a(A097246(n)). - _Antti Karttunen_, Jul 29 2018
%t A097249 f[n_] := Product[{p, e} = pe; NextPrime[p]^Quotient[e, 2] p^Mod[e, 2], {pe, FactorInteger[n]}];
%t A097249 a[n_] := (NestWhileList[f, n, !SquareFreeQ[#]&] // Length) - 1;
%t A097249 Array[a, 105] (* _Jean-François Alcover_, Nov 18 2021 *)
%o A097249 (PARI)
%o A097249 A097246(n) = { my(f=factor(n)); prod(i=1, #f~, (nextprime(f[i,1]+1)^(f[i,2]\2))*((f[i,1])^(f[i,2]%2))); };
%o A097249 A097249(n) = if(issquarefree(n),0,1+A097249(A097246(n))); \\ _Antti Karttunen_, Jul 29 2018
%Y A097249 Cf. A005117, A097246, A097248, A097250, A277899.
%K A097249 nonn
%O A097249 1,12
%A A097249 _Reinhard Zumkeller_, Aug 03 2004
%E A097249 Edited by _Sam Alexander_, Jan 05 2005