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-8 of 8 results.

A129521 Numbers of the form p*q, p and q prime with q=2*p-1.

Original entry on oeis.org

6, 15, 91, 703, 1891, 2701, 12403, 18721, 38503, 49141, 79003, 88831, 104653, 146611, 188191, 218791, 226801, 269011, 286903, 385003, 497503, 597871, 665281, 721801, 736291, 765703, 873181, 954271, 1056331, 1314631, 1373653, 1537381
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 19 2007

Keywords

Comments

All terms are Fermat 4-pseudoprimes, i.e., satisfy 4^n == 4 (mod n). See A020136 and A122781.

Crossrefs

Subsequence of A006881, A129510, and A122781.
Intersection of A000384 and A001358, "hexagonal semiprimes". - Wesley Ivan Hurt, Jul 04 2013

Programs

  • Haskell
    a129521 n = p * (2 * p - 1) where p = a005382 n
    -- Reinhard Zumkeller, Nov 10 2013
  • Magma
    [2*n^2-n: n in [0..1000]|IsPrime(n) and IsPrime(2*n-1)]; // Vincenzo Librandi, Dec 27 2010
    
  • Mathematica
    p = Select[Prime[Range[155]], PrimeQ[2# - 1] &]; p (2p - 1) (* Robert G. Wilson v, Sep 11 2011 *)
  • PARI
    forprime(p=2,10000,q=2*p-1;if(isprime(q),print1(p*q,", ")))
    

Formula

a(n) = A005382(n)*A005383(n).

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

A020136 Fermat pseudoprimes to base 4.

Original entry on oeis.org

15, 85, 91, 341, 435, 451, 561, 645, 703, 1105, 1247, 1271, 1387, 1581, 1695, 1729, 1891, 1905, 2047, 2071, 2465, 2701, 2821, 3133, 3277, 3367, 3683, 4033, 4369, 4371, 4681, 4795, 4859, 5461, 5551, 6601, 6643, 7957, 8321, 8481, 8695, 8911, 9061, 9131
Offset: 1

Views

Author

Keywords

Comments

If q and 2q-1 are odd primes, then n=q*(2q-1) is in the sequence. So for n>1, A005382(n)*(2*A005382(n)-1) form a subsequence (cf. A129521). - Farideh Firoozbakht, Sep 12 2006
Primes q and 2q-1 are a Cunningham chain of the second kind. - Walter Nissen, Sep 07 2009
Composite numbers n such that 4^(n-1) == 1 (mod n). - Michel Lagneau, Feb 18 2012

Crossrefs

Subsequence of A122781.
Contains A001567 (Fermat pseudoprimes to base 2) as a subsequence.

Programs

  • Mathematica
    Select[Range[9200], ! PrimeQ[ # ] && PowerMod[4, # - 1, # ] == 1 &] (* Farideh Firoozbakht, Sep 12 2006 *)
  • PARI
    isok(n) = (Mod(4, n)^(n-1)==1) && !isprime(n) && (n>1); \\ Michel Marcus, Apr 27 2018

A129494 Composite numbers k such that 4^k mod k is a power of 4 greater than 1.

Original entry on oeis.org

6, 12, 15, 20, 22, 24, 26, 28, 30, 34, 38, 40, 46, 48, 56, 58, 60, 62, 66, 69, 72, 74, 77, 80, 82, 84, 85, 86, 87, 88, 91, 93, 94, 96, 102, 104, 105, 106, 111, 117, 118, 120, 122, 123, 126, 129, 132, 134, 140, 141, 142, 144, 146, 158, 159, 166, 168, 170, 177, 178, 182
Offset: 1

Views

Author

Robert G. Wilson v, Apr 17 2007

Keywords

Comments

Complement to composite numbers: 4, 8, 9, 10, 14, 16, 18, 21, 25, 27, 32, 33, 35, 36, 39, 42, 44, 45, 49, 50, 51, 52, 54, 55, 57, ... - R. J. Mathar, May 16 2008

Examples

			22 is a term since 4^22 mod 22 = 16.
		

Crossrefs

Contains A122781 except for 1 and 4.

Programs

  • Magma
    [k:k in [2..200]| not IsPrime(k)  and  not IsZero(a)  and (PrimeDivisors(a) eq [2]) and  &+[j[1]*j[2]: j in Factorization(a) ] mod 4 eq 0 where a is 4^k mod k]; // Marius A. Burtea, Dec 04 2019
  • Maple
    filter:= proc(n) local k,j;
      if isprime(n) then return false fi;
      k:= 4 &^ n mod n;
      j:= padic:-ordp(k,2);
      k>1 and j::even and k = 2^j
    end proc:
    select(filter, [$4..1000]); # Robert Israel, Dec 03 2019
  • Mathematica
    Select[ Range@ 161, IntegerQ@ Log[4, PowerMod[4, #, # ]] &]

Extensions

Corrected and extended by R. J. Mathar, May 16 2008

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 *)

A175942 Odd numbers k such that 4^k == 4 (mod 3*k) and 2^(k-1) == 4 (mod 3*(k-1)).

Original entry on oeis.org

5, 11, 23, 47, 59, 83, 107, 167, 179, 227, 263, 347, 359, 383, 467, 479, 503, 563, 587, 683, 719, 839, 863, 887, 983, 1019, 1187, 1283, 1307, 1319, 1367, 1439, 1487, 1523, 1619, 1823, 1907, 2027, 2039, 2063, 2099, 2207, 2447, 2459, 2543, 2579, 2819, 2879
Offset: 1

Views

Author

Alzhekeyev Ascar M, Oct 27 2010

Keywords

Comments

Equivalently, integers k == 5 (mod 6) such that 4^k == 4 (mod k) and 2^(k-1) == 4 (mod k-1).
Equivalently, integers k == 5 (mod 6) such that both k and (k-1)/2 are primes or (odd or even) Fermat 4-pseudoprimes (A122781).
Contains terms k of A175625 such that k == 5 (mod 6).
Contains terms k of A303448 such that k == 5 (mod 6).
Many composite terms of this sequence are of the form A007583(m) = (2^(2m+1) + 1)/3 (for m in A303009). It is unknown if there exist composite terms not of this form.
Numbers k such that 2^(k-1) == 3k+1 (mod 3(k-1)k). This sequence contains all safe primes except 7. The term a(20) = 683 = 2*341+1 is the smallest prime that is not safe. - Thomas Ordowski, Jun 07 2021

Crossrefs

Cf. A005385.

Programs

  • Mathematica
    Select[Range[1,3001,2],PowerMod[4,#,3#]==4&&PowerMod[2,#-1,3(#-1)]==4&] (* Harvey P. Dale, Aug 04 2018 *)

Extensions

Edited by Max Alekseyev, Apr 24 2018

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 *)

A247307 Numbers of the form (4^k - 4)/k.

Original entry on oeis.org

0, 6, 20, 63, 204, 682, 2340, 381300, 1398101, 5162220, 71582788, 1010580540, 14467258260, 3059510616420, 2573485501354569, 9938978487990060, 148764065110560900, 510526106256177860940, 117943982401427236556700, 1799331452449680632120820
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Sep 11 2014

Keywords

Comments

Subsequence of A246445.
Generated by k = 1, 2, 3, 4, 5, 6, 7, 11, 12, 13, 15, 17, 19, 23, 28, 29, 31,. ..
This set of k contains all terms of A122781 and all primes. [It contains the primes because j^p == j (mod p) for every integer j if p is prime; see e.g. the corollary 4.4 to the Lagrange theorem in Jones et al.]

Examples

			a(9) = 1398101 because (4^12 - 4)/12 = 1398101 for k = 12.
		

Crossrefs

Programs

  • PARI
    lista(nn) = {for (k=1, nn, va = (4^k - 4)/k; if (type(va) == "t_INT", print1(va, ", ")););} \\ Michel Marcus, Sep 12 2014
Showing 1-8 of 8 results.