%I #36 Jul 25 2021 02:40:23
%S 6,34,643,1431,2023,2245,3136,5215,6061,6601,10121,12361,16123,20032,
%T 25345,33155,41545,42601,42652,44122,45406,50026,54561,56035,66522,
%U 66666,105403,110254,112612,113345,113356,123616,135206,140011,151142,151354,153022,153101,153352,155554
%N Pseudoprimes to base 7, written in base 7.
%H Amiram Eldar, <a href="/A262104/b262104.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = A007093(A005938(n)).
%t base = 7; t = {}; n = 1;
%t While[Length[t] < 40, n++;
%t If[! PrimeQ[n] && PowerMod[base, n - 1, n] == 1,
%t AppendTo[t, FromDigits@IntegerDigits[n, 7]]]]; t
%t FromDigits[IntegerDigits[#,7]]&/@Select[Range[40000],CompositeQ[#] && PowerMod[ 7,#-1,#]==1&] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Feb 24 2018 *)
%o (PARI) lista(nn, b=7) = {for (n=1, nn, if (Mod(b, n)^(n-1)==1 && !ispseudoprime(n) && n>1, print1(subst(Pol(digits(n,b), x), x, 10), ", ");););} \\ _Michel Marcus_, Sep 30 2015
%Y Cf. A005938 (pseudoprimes to base 7), A007093 (numbers in base 7).
%Y Cf. A258189, A262101, A262102, A262103, A262105, A262154.
%K nonn,base
%O 1,1
%A _Abdul Gaffar Khan_, Sep 11 2015