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.

A285706 a(n) = number of iterations x -> A064216(x) needed to reach a nonprime number when starting from prime(n), a(1) = a(2) = 1.

This page as a plain text file.
%I A285706 #16 Apr 26 2017 21:49:12
%S A285706 1,1,1,2,1,1,1,3,1,1,2,2,1,1,1,1,1,1,1,1,1,2,1,1,2,1,1,1,1,1,1,1,1,3,
%T A285706 1,1,2,1,1,1,1,1,1,1,1,2,2,1,1,2,1,1,1,1,1,1,1,2,1,1,1,1,3,1,1,1,2,3,
%U A285706 1,1,1,1,3,1,2,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,2,1,1,1,1,2,1,1,1,2,2,1,1,2,1,1,1,1,1,1
%N A285706 a(n) = number of iterations x -> A064216(x) needed to reach a nonprime number when starting from prime(n), a(1) = a(2) = 1.
%C A285706 Length (or size for the closed cycles: [2] and [3]) of the complete "slipping Cunningham chain of the second kind" starting with prime(n). That is, at the end of every step, the next prime q = 2p-1 "slips" by one step towards smaller primes as A064989(q).
%C A285706 After n = 1, 2 (primes 2 & 3) differs from A181715 for the first time at n=22, where a(22) = 2, while A181715(22) = 3, prime(22) = 79.
%H A285706 Antti Karttunen, <a href="/A285706/b285706.txt">Table of n, a(n) for n = 1..10000</a>
%F A285706 a(n) = A285701(A000040(n)).
%e A285706 See examples in A285701.
%t A285706 Table[If[n <= 2, 1, -1 + Length@ NestWhileList[Apply[Times, FactorInteger[2 # - 1] /. {p_, e_} /; p > 2 :> NextPrime[p, -1]^e] &, Prime@ n, PrimeQ@ # &]], {n, 120}] (* _Michael De Vlieger_, Apr 26 2017 *)
%o A285706 (PARI) A285706(n) = A285701(prime(n)); \\ The rest of code in A285701.
%o A285706 (Scheme) (define (A285706 n) (A285701 (A000040 n)))
%Y A285706 Cf. A000040, A064216, A064989, A181715, A246373, A285701.
%Y A285706 Cf. A137288 (gives the positions of terms > 1 after its two initial terms).
%K A285706 nonn
%O A285706 1,4
%A A285706 _Antti Karttunen_, Apr 26 2017