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 A122780 #23 Apr 30 2023 11:20:38 %S A122780 1,6,66,91,121,286,561,671,703,726,949,1105,1541,1729,1891,2465,2665, %T A122780 2701,2821,3281,3367,3751,4961,5551,6601,7107,7381,8205,8401,8646, %U A122780 8911,10585,11011,12403,14383,15203,15457,15841,16471,16531,18721,19345 %N A122780 Nonprimes k such that 3^k == 3 (mod k). %C A122780 Theorem: If q!=3 and both numbers q and (2q-1) are primes then k=q*(2q-1) is in the sequence. 6, 91, 703, 1891, 2701, 12403, 18721, 38503, 49141, ... is the related subsequence. %C A122780 The terms > 1 and coprime to 3 of this sequence are the base-3 pseudoprimes, A005935. - _M. F. Hasler_, Jul 19 2012 [Corrected by _Jianing Song_, Feb 06 2019] %H A122780 Amiram Eldar, <a href="/A122780/b122780.txt">Table of n, a(n) for n = 1..10000</a> %e A122780 66 is composite and 3^66 = 66*468229611858069884271524875811 + 3 so 66 is in the sequence. %p A122780 isA122780 := proc(n) %p A122780 if isprime(n) then %p A122780 false; %p A122780 else %p A122780 modp( 3 &^ n,n) = modp(3,n) ; %p A122780 end if; %p A122780 end proc: %p A122780 for n from 1 do %p A122780 if isA122780(n) then %p A122780 print(n) ; %p A122780 end if; %p A122780 end do: # _R. J. Mathar_, Jul 15 2012 %t A122780 Select[Range[30000], ! PrimeQ[ # ] && Mod[3^#, # ] == Mod[3, # ] &] %t A122780 Join[{1},Select[Range[20000],!PrimeQ[#]&&PowerMod[3,#,#]==3&]] (* _Harvey P. Dale_, Apr 30 2023 *) %o A122780 (PARI) is_A122780(n)={n>0 & Mod(3, n)^n==3 & !ispseudoprime(n)} \\ _M. F. Hasler_, Jul 19 2012 %Y A122780 Cf. A001567, A005935, A122014. %Y A122780 Cf. A122781, A122782, A122783, A122784, A122785, A122786. %K A122780 easy,nonn %O A122780 1,2 %A A122780 _Farideh Firoozbakht_, Sep 11 2006