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.
%I A112037 #26 May 26 2019 16:07:54 %S A112037 2,3,5,11,7,23,13,29,41,17,53,37,83,43,89,19,113,131,67,47,73,31,79, %T A112037 173,179,61,191,97,233,239,251,127,139,281,71,293,101,103,107,163,59, %U A112037 359,193,199,137,419,431,443,151,491,509,181,109,277,593,149,307,641,653 %N A112037 Go through all of the primes p and for each one, factor p-1 into primes. List the primes in order of their first appearance in the p-1 factorizations. %C A112037 The length of this list of distinct prime factors of p-1 encountered through p=prime(n) is given by A055768. - _Ray Chandler_, Nov 30 2005 %C A112037 If "p-1" is changed to "p+1" we get A236388. - _N. J. A. Sloane_, Jan 24 2014 %C A112037 A permutation of the primes by Dirichlet's theorem on arithmetic progressions: for any pair (r,s) of integers such that gcd(r,s)=1 there are infinitely many primes in the sequence r + k*s; choose r=1 and s=p. - _Joerg Arndt_, Mar 20 2016 %H A112037 Alois P. Heinz, <a href="/A112037/b112037.txt">Table of n, a(n) for n = 2..10000</a> %H A112037 Wikipedia, <a href="https://en.wikipedia.org/wiki/Dirichlet%27s_theorem_on_arithmetic_progressions">Dirichlet's theorem on arithmetic progressions</a> %e A112037 We start with the second prime, 3. 3-1 = 2, so 2 is the first term. %e A112037 5-1 = 2*2, nothing new. %e A112037 7-1 = 2*3 and 3 is new, so that is the second term. %e A112037 11-1 = 2*5 and we get 5; etc. %t A112037 lst = {}; r[n_] := (len = Length@lst; lst = Flatten@ Join[lst, Select[First /@ FactorInteger[Prime@n - 1], ! MemberQ[lst, # ] &]]; If[l < Length@lst, 1, 0]); Do[ r[n], {n, 214}]; lst (* _Robert G. Wilson v_, Nov 30 2005 *) %t A112037 DeleteDuplicates[Rest[Flatten[FactorInteger[#][[All,1]]&/@ (Prime[ Range[ 250]]-1)]]] (* _Harvey P. Dale_, May 26 2019 *) %o A112037 (PARI) g=1;forprime(p=2,299,f=factorint(p-1)[,1];z=factorback(f); r=z/gcd(z,g);g*=r;if(r>1,print(r," ",p))); \\ _Jack Brennen_, Nov 28 2005 %o A112037 (GAP) Set(Flat(List(Filtered([3..1500],IsPrime),i->Factors(i-1)))); # _Muniru A Asiru_, Dec 06 2018 %Y A112037 Cf. A055768, A112038, A114461, A236388. %K A112037 easy,nonn %O A112037 2,1 %A A112037 Michel Dauchez (mdzdm(AT)yahoo.fr), Nov 28 2005 %E A112037 Better description from _Jack Brennen_, Nov 28 2005 %E A112037 Extended by _Ray Chandler_ and _Robert G. Wilson v_, Nov 30 2005