login
For p = prime(n), number of iterations of the function f(x) = 2*x^3-1 that leave p prime.
2

%I #6 Feb 27 2017 02:29:26

%S 0,1,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,

%T 0,0,0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,

%U 0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0

%N For p = prime(n), number of iterations of the function f(x) = 2*x^3-1 that leave p prime.

%H Charles R Greathouse IV, <a href="/A283020/b283020.txt">Table of n, a(n) for n = 1..10000</a>

%o (PARI) a(n) = my(p=prime(n), i=0); while(1, if(!ispseudoprime(2*p^3-1), return(i), p=2*p^3-1; i++))

%Y Cf. A177104, A282989.

%K nonn

%O 1

%A _Felix Fröhlich_, Feb 26 2017