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.

A252170 Smallest primitive prime factor of 12^n-1.

This page as a plain text file.
%I A252170 #19 Dec 28 2024 16:19:28
%S A252170 11,13,157,5,22621,7,659,89,37,19141,23,20593,477517,211,61,17,
%T A252170 2693651,1657,29043636306420266077,85403261,8177824843189,57154490053,
%U A252170 47,193,303551,79,306829,673,59,31,373,153953,886381,2551,71,73,3933841,3307
%N A252170 Smallest primitive prime factor of 12^n-1.
%C A252170 Also, smallest prime p such that 1/p has duodecimal period n.
%H A252170 Max Alekseyev, <a href="/A252170/b252170.txt">Table of n, a(n) for n = 1..310</a>
%e A252170 a(4) = 5 because 1/5 = 0.249724972497... and 5 is the smallest prime with period 4 in base 12.
%e A252170 a(5) = 22621 because 1/22621 = 0.0000100001... and 22621 is the smallest (in fact, the only one) prime with period 5 in base 12.
%p A252170 S:= {}:
%p A252170 for n from 1 to 72 do
%p A252170   F:= numtheory:-factorset(12^n-1) minus S;
%p A252170   A[n]:= min(F);
%p A252170   S:= S union F;
%p A252170 od:
%p A252170 seq(A[n], n=1..72);
%t A252170 prms={}; Table[f=First/@FactorInteger[12^n-1]; p=Complement[f, prms]; prms=Join[prms, p]; If[p=={}, 1, First[p]], {n, 72}]
%o A252170 (PARI) listap(nn) = {prf = []; for (n=1, nn, vp = (factor(12^n-1)[,1])~; f = setminus(Set(vp), Set(prf)); prf = concat(prf, f); print1(vecmin(Vec(f)), ", "););} \\ _Michel Marcus_, Dec 15 2014; after A007138
%Y A252170 Cf. A112927 (base 2), A143663 (base 3), A112092 (base 4), A143665 (base 5), A379639 (base 6), A379640 (base 7), A379641 (base 8), A379642 (base 9), A007138 (base 10), A379644 (base 11), A252170 (base 12).
%Y A252170 Cf. A246004, A246489.
%K A252170 nonn
%O A252170 1,1
%A A252170 _Eric Chen_, Dec 15 2014
%E A252170 Edited by _Max Alekseyev_, Aug 26 2021