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.

Showing 1-4 of 4 results.

A122780 Nonprimes k such that 3^k == 3 (mod k).

Original entry on oeis.org

1, 6, 66, 91, 121, 286, 561, 671, 703, 726, 949, 1105, 1541, 1729, 1891, 2465, 2665, 2701, 2821, 3281, 3367, 3751, 4961, 5551, 6601, 7107, 7381, 8205, 8401, 8646, 8911, 10585, 11011, 12403, 14383, 15203, 15457, 15841, 16471, 16531, 18721, 19345
Offset: 1

Views

Author

Farideh Firoozbakht, Sep 11 2006

Keywords

Comments

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.
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]

Examples

			66 is composite and 3^66 = 66*468229611858069884271524875811 + 3 so 66 is in the sequence.
		

Crossrefs

Programs

  • Maple
    isA122780 := proc(n)
        if isprime(n) then
            false;
        else
            modp( 3 &^ n,n) = modp(3,n) ;
        end if;
    end proc:
    for n from 1 do
        if isA122780(n) then
            print(n) ;
        end if;
    end do: # R. J. Mathar, Jul 15 2012
  • Mathematica
    Select[Range[30000], ! PrimeQ[ # ] && Mod[3^#, # ] == Mod[3, # ] &]
    Join[{1},Select[Range[20000],!PrimeQ[#]&&PowerMod[3,#,#]==3&]] (* Harvey P. Dale, Apr 30 2023 *)
  • PARI
    is_A122780(n)={n>0 & Mod(3, n)^n==3 & !ispseudoprime(n)} \\ M. F. Hasler, Jul 19 2012

A020138 Pseudoprimes to base 9.

Original entry on oeis.org

4, 8, 28, 52, 91, 121, 205, 286, 364, 511, 532, 616, 671, 697, 703, 946, 949, 1036, 1105, 1288, 1387, 1541, 1729, 1891, 2465, 2501, 2665, 2701, 2806, 2821, 2926, 3052, 3281, 3367, 3751, 4376, 4636, 4961, 5356, 5551, 6364, 6601, 6643, 7081, 7381, 7913, 8401
Offset: 1

Views

Author

Keywords

Comments

This sequence is a subsequence of A122786. In fact the terms are composite terms n of A122786 such that gcd(n,3)=1. Theorem: If both numbers q & 2q-1 are primes greater than 3 and n=q*(2q-1) then 9^(n-1)==1 (mod n) (n is in the sequence). So for n>2 A005382(n)* (2*A005382(n)-1) is in the sequence; 91,703,1891,2701,12403,18721,... is the related subsequence. - Farideh Firoozbakht, Sep 15 2006
Composite numbers n such that 9^(n-1) == 1 (mod n).

Crossrefs

Cf. A001567 (pseudoprimes to base 2), A005382, A122786.

Programs

  • Mathematica
    Select[Range[8500], ! PrimeQ[ # ] && PowerMod[9, (# - 1), # ] == 1 &] (* Farideh Firoozbakht, Sep 15 2006 *)

A122784 Nonprimes k such that 7^k == 7 (mod k).

Original entry on oeis.org

1, 6, 14, 21, 25, 42, 105, 133, 231, 301, 325, 525, 561, 703, 817, 1105, 1729, 1825, 2101, 2353, 2465, 2821, 3277, 3325, 3486, 3913, 4011, 4525, 4825, 5565, 5719, 5901, 6601, 6697, 7525, 8321, 8911, 9331, 10225, 10325, 10585, 10621, 11041, 11521
Offset: 1

Views

Author

Farideh Firoozbakht, Sep 12 2006

Keywords

Comments

Theorem: If both numbers q and 2q-1 are primes then q*(2q-1) is in the sequence iff q=2 or mod(q,14) is in the set {1, 5, 13}. 6, 703, 18721, 38503, 88831, 104653, 146611, 188191,... are such terms.

Crossrefs

Programs

  • Mathematica
    Select[Range[20000], ! PrimeQ[#] && PowerMod[7, #, #] == Mod[7, #] &]
    With[{nn=12000},Select[Complement[Range[nn],Prime[Range[PrimePi[ nn]]]], PowerMod[7,#,#]==Mod[7,#]&]] (* Harvey P. Dale, Jul 12 2012 *)

A290543 Composite numbers n such that A290542(n) >= 2.

Original entry on oeis.org

28, 65, 66, 85, 91, 105, 117, 121, 124, 133, 145, 153, 154, 165, 185, 186, 190, 205, 217, 221, 231, 244, 246, 247, 259, 273, 276, 280, 286, 292, 301, 305, 310, 325, 341, 343, 344, 357, 364, 366, 369, 370, 377, 385, 396, 418, 425, 427, 429, 430, 435, 451
Offset: 1

Views

Author

Arkadiusz Wesolowski, Aug 05 2017

Keywords

Comments

Is a(n) ~ n * log n as n -> infinity?

Crossrefs

Programs

  • Magma
    lst:=[]; for n in [4..451] do if not IsPrime(n) then r:=Floor(Sqrt(n)); for k in [2..r] do if Modexp(k, n, n) eq k then Append(~lst, n); break; end if; end for; end if; end for; lst;
  • Mathematica
    Select[Flatten@ Position[#, k_ /; k >= 2], CompositeQ] &@ Table[SelectFirst[Range[2, Sqrt@ n], PowerMod[#, n , n] == Mod[#, n] &], {n, 451}] (* Michael De Vlieger, Aug 09 2017 *)
Showing 1-4 of 4 results.