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.

A280720 For p = prime(n), number of iterations of the function f(x) = 5x + 2 that leave p prime.

This page as a plain text file.
%I A280720 #15 Mar 29 2017 08:57:17
%S A280720 0,1,0,1,0,2,0,3,0,0,2,0,0,0,0,0,0,1,1,0,1,2,0,0,2,0,0,0,1,0,0,0,0,0,
%T A280720 0,1,1,0,0,0,0,1,0,1,0,2,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,2,0,
%U A280720 0,2,0,0,0,4,0,0,0,1,0,0,0,0,0,0,0,0,0
%N A280720 For p = prime(n), number of iterations of the function f(x) = 5x + 2 that leave p prime.
%C A280720 Records are a(1) = 0 [p = 2], a(2) = 1 [p = 3], a(6) = 2 [p = 13], a(8) = 3 [p = 19], a(74) = 4 [p = 373], a(12656) = 6 [p = 135859], a(1165346) = 7 [p = 18235423], a(1659004) = 8 [p = 26588257], a(5386789) = 9 [p = 93112729], .... - _Charles R Greathouse IV_, Jan 12 2017
%H A280720 John Cerkan, <a href="/A280720/b280720.txt">Table of n, a(n) for n = 1..10001</a>
%t A280720 Table[Length@ NestWhileList[5 # + 2 &, Prime@ n, PrimeQ] - 2, {n, 120}] (* _Michael De Vlieger_, Jan 09 2017 *)
%o A280720 (PARI) a016873(n) = 5*n+2
%o A280720 a(n) = my(p=prime(n), i=0); while(1, if(!ispseudoprime(a016873(p)), return(i), p=a016873(p); i++))
%Y A280720 Cf. A016873, A023217, A023252, A023283, A023313, A023341, A084958, A249573.
%K A280720 nonn
%O A280720 1,6
%A A280720 _Felix Fröhlich_, Jan 07 2017