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.

A166133 After initial 1,2,4, a(n+1) is the smallest divisor of a(n)^2-1 that has not yet appeared in the sequence.

This page as a plain text file.
%I A166133 #104 May 30 2023 12:00:26
%S A166133 1,2,4,3,8,7,6,5,12,11,10,9,16,15,14,13,21,20,19,18,17,24,23,22,69,28,
%T A166133 27,26,25,39,38,37,36,35,34,33,32,31,30,29,40,41,42,43,44,45,46,47,48,
%U A166133 49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,201,80,79
%N A166133 After initial 1,2,4, a(n+1) is the smallest divisor of a(n)^2-1 that has not yet appeared in the sequence.
%C A166133 The initial 1,2,4 provides the smallest example with this rule that is not simply the integers in order, nor (apparently) ends with all divisors of a(n)^2-1 already present.
%C A166133 Apparently the sequence is infinite and includes every positive integer.
%C A166133 Apr 05 2015: _John Mason_ has computed the first ten million terms. See link to zipped file. - _N. J. A. Sloane_, Apr 06 2015
%C A166133 The sequence contains many runs of incrementing and decrementing values. In the 1200 steps following the 4, there are 136 increments, 706 decrements, and 358 larger steps. What is the limiting distribution for these steps? [Click the "listen" button to appreciate these runs. - _N. J. A. Sloane_, Apr 03 2015]
%C A166133 After 3, 198, 270, 570, 522, 600, 822, and 882, we have a(n+1) = a(n)^2-1. Does this happen infinitely often? Cf. A256406, A256407.
%C A166133 A256543 gives numbers m such that a(m+1) = a(m)-1 or a(m+1) = a(m)+1. - _Reinhard Zumkeller_, Apr 01 2015
%C A166133 If this is a permutation, then A255833 is the inverse permutation. - _M. F. Hasler_, Apr 01 2015
%C A166133 a(A256703(n)+1) = a(A256703(n))^2 - 1. - _Reinhard Zumkeller_, Apr 08 2015
%C A166133 For n > 3: a(n) = A027750(a(n-1)^2-1, A256751(n)). - _Reinhard Zumkeller_, Apr 09 2015
%H A166133 Franklin T. Adams-Watters and N. J. A. Sloane, <a href="/A166133/b166133.txt">Table of n, a(n) for n = 1..20000</a> (first 1203 terms from Franklin T. Adams-Watters)
%H A166133 Hans Havermann, <a href="/A166133/a166133.png">Log plot of 450000+ terms</a> [Produced by Mathematica's ListLogPlot command]
%H A166133 Hans Havermann, <a href="http://chesswanks.com/num/oddlybehaved.png">Over-sized point-joined (over 250000 terms) graph of the sequence</a> [Heavily clipped, which explains the strange appearance. - _N. J. A. Sloane_, Apr 01 2015]
%H A166133 John Mason, <a href="/A166133/a166133_1.txt">Table of n, a(n) for n = 1..711888</a> [10 megabytes]
%H A166133 John Mason, <a href="/A166133/a166133_2.txt">Table of n, a(n) for n = 1..2000000</a> [32 megabytes]
%H A166133 John Mason, <a href="https://oeis.org/A166133/a166133-10M.zip">Ten million terms (zipped file)</a>
%H A166133 John Mason, <a href="/A166133/a166133.java.txt">Java program to generate this sequence, used to generate 10M terms, and some other associated sequences</a>; it requires splitting into single classes for use.
%H A166133 N. J. A. Sloane and others, <a href="/A166133/a166133.txt">"Blog" about A166133</a>
%e A166133 After a(24) = 22, the divisors of 22^2-1 = 483 are 1, 3, 7, 21, 23, 69, 161, and 483; 1, 3, 7, 21, and 23 have already occurred, so a(25) = 69.
%t A166133 s = {1, 2, 4}; e = 4; Do[d = Divisors[e^2 - 1]; i = 1;
%t A166133 While[MemberQ[s, d[[i]]], i++]; e = d[[i]]; AppendTo[s, e], {19997}]; s (* _Hans Havermann_, Apr 03 2015 *)
%o A166133 (PARI) al(n,m=4,u=6)={local(ds,db);
%o A166133 u=bitor(u,1<<m);print1(m);
%o A166133 for(i=1,n,
%o A166133 ds=divisors(m^2-1);
%o A166133 for(k=2,#ds,m=ds[k];db=1<<m;if(!bitand(u,db),break));
%o A166133 u=bitor(u,db);print1(","m))}
%o A166133 /* This prints the sequence without the initial 1,2. */
%o A166133 (Haskell)
%o A166133 import Data.List (delete); import Data.List.Ordered (isect)
%o A166133 a166133 n = a166133_list !! (n-1)
%o A166133 a166133_list = 1 : 2 : 4 : f (3:[5..]) 4 where
%o A166133    f zs x = y : f (delete y zs) y where
%o A166133             y = head $ isect (a027750_row' (x ^ 2 - 1)) zs
%o A166133 -- _Reinhard Zumkeller_, Apr 01 2015
%Y A166133 Cf. A166134, A000027, A122280, A005563, A256406, A256407, A027750, A005563, A256557, A256559.
%Y A166133 For records see A256403, A256404.
%Y A166133 Smallest missing numbers: A256405, A256408, A256409.
%Y A166133 Cf. A256541 (first differences), A256543.
%Y A166133 Inverse (conjectured): A255833.
%Y A166133 Cf. A256564 (smallest prime factors), A244080 (largest prime factors), A256578 (largest proper divisors), A256542 (number of divisors).
%Y A166133 Upper envelope: the sequence of pairs (A256422(n),A256423(n)).
%Y A166133 Cf. A256703.
%Y A166133 Cf. A256751.
%K A166133 nonn,nice,hear
%O A166133 1,2
%A A166133 _Franklin T. Adams-Watters_, Oct 07 2009