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.

A361913 a(n) is the number of steps in the main loop of the Pollard rho integer factorization algorithm for n, with x=2, y=2 and g(x)=x^2-1.

This page as a plain text file.
%I A361913 #33 Jul 25 2023 22:43:40
%S A361913 2,2,2,1,2,4,2,2,1,2,2,3,2,1,2,4,2,3,1,2,2,8,2,1,2,2,2,4,1,4,2,2,2,1,
%T A361913 2,6,2,2,1,5,2,6,2,1,2,11,2,4,1,2,2,5,2,1,2,2,2,7,1,3,2,2,2,1,2,4,2,2,
%U A361913 1,3,2,8,2,1,2,2,2,10,1,2,2,12,2,1,2,2
%N A361913 a(n) is the number of steps in the main loop of the Pollard rho integer factorization algorithm for n, with x=2, y=2 and g(x)=x^2-1.
%C A361913 x=2 and y=2 are the minimum effective values for Pollard rho, but any x = y > 2 would give the same answer.
%C A361913 n is in A217562 if gcd(n, a(n)) > 1.
%C A361913 n is in A047201 if gcd(phi(n), a(n)) > 1, where phi is Euler's totient function.
%H A361913 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PollardRhoFactorizationMethod.html">Pollard rho Factorization Method</a>.
%H A361913 Wikipedia, <a href="https://en.wikipedia.org/wiki/Pollard%27s_rho_algorithm">Pollard's rho algorithm</a>
%o A361913 (Python)
%o A361913 from gmpy2 import *
%o A361913 def a(n):
%o A361913   c,d,x,y,g = 0,1,2,2,lambda x:pow(x,2,n)-1
%o A361913   while d == 1:
%o A361913     c,x,y =c+1,g(x),g(g(y))
%o A361913     d = gcd(abs(x-y), n)
%o A361913   return c
%Y A361913 Cf. A005563.
%K A361913 nonn
%O A361913 2,1
%A A361913 _DarĂ­o Clavijo_, Mar 29 2023