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.
2, 3, 5, 11, 7, 23, 13, 29, 41, 17, 53, 37, 83, 43, 89, 19, 113, 131, 67, 47, 73, 31, 79, 173, 179, 61, 191, 97, 233, 239, 251, 127, 139, 281, 71, 293, 101, 103, 107, 163, 59, 359, 193, 199, 137, 419, 431, 443, 151, 491, 509, 181, 109, 277, 593, 149, 307, 641, 653
Offset: 2
Examples
We start with the second prime, 3. 3-1 = 2, so 2 is the first term. 5-1 = 2*2, nothing new. 7-1 = 2*3 and 3 is new, so that is the second term. 11-1 = 2*5 and we get 5; etc.
Links
- Alois P. Heinz, Table of n, a(n) for n = 2..10000
- Wikipedia, Dirichlet's theorem on arithmetic progressions
Programs
-
GAP
Set(Flat(List(Filtered([3..1500],IsPrime),i->Factors(i-1)))); # Muniru A Asiru, Dec 06 2018
-
Mathematica
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 *) DeleteDuplicates[Rest[Flatten[FactorInteger[#][[All,1]]&/@ (Prime[ Range[ 250]]-1)]]] (* Harvey P. Dale, May 26 2019 *)
-
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
Extensions
Better description from Jack Brennen, Nov 28 2005
Extended by Ray Chandler and Robert G. Wilson v, Nov 30 2005
Comments