login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A122786 Nonprimes n such that 9^n == 9 (mod n). 5

%I #25 Mar 12 2020 20:32:48

%S 1,4,6,8,9,12,15,18,24,28,36,45,52,66,72,91,121,153,205,276,286,364,

%T 366,369,396,435,511,532,561,616,671,697,703,726,804,946,949,1035,

%U 1036,1105,1128,1288,1387,1541,1729,1737,1845,1854,1891,2196,2465,2501,2556,2665

%N Nonprimes n such that 9^n == 9 (mod n).

%C Theorem: If both numbers q and 2q-1 are primes and n=q*(2q-1) then 9^n==9 (mod n) (n is in the sequence). So A005382*(2*A005382-1)= 6,15,91,703,1891,2701,12403,18721,... is the related subsequence. A020138 is a subsequence of this sequence.

%H Alois P. Heinz, <a href="/A122786/b122786.txt">Table of n, a(n) for n = 1..10000</a>

%p q:= n-> is(not isprime(n) and (9 &^ n mod n) = (9 mod n)):

%p select(q, [$1..3000])[]; # _Alois P. Heinz_, Mar 06 2019

%t Select[Range[4000], ! PrimeQ[ # ] && Mod[9^#, # ] == Mod[9, # ] &]

%t Join[{1,4,6,8,9},Select[Range[3000],CompositeQ[#]&&PowerMod[9,#,#]==9&]] (* _Harvey P. Dale_, Jul 17 2014 *)

%o (PARI) isok(n) = !isprime(n) && (Mod(9,n)^n == Mod(9, n)); \\ _Michel Marcus_, Mar 06 2019

%Y Cf. A005382, A020138.

%K nonn

%O 1,2

%A _Farideh Firoozbakht_, Sep 12 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 05:18 EDT 2024. Contains 371964 sequences. (Running on oeis4.)