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.

A180060 a(n) = 2^(2^n mod n) mod n.

Original entry on oeis.org

0, 1, 1, 1, 4, 4, 4, 1, 4, 6, 4, 4, 4, 2, 1, 1, 4, 16, 4, 16, 4, 16, 4, 16, 3, 16, 13, 16, 4, 16, 4, 1, 25, 16, 29, 16, 4, 16, 22, 16, 4, 16, 4, 20, 32, 16, 4, 16, 22, 16, 1, 16, 4, 52, 8, 32, 28, 16, 4, 16, 4, 16, 4, 1, 61, 16, 4, 52, 49, 46, 4, 16, 4, 16, 31, 24, 36, 16, 4, 16
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 14 2011

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Mod[2^(Mod[2^n, n]), n], {n, 50}] (* Alonso del Arte, Jan 14 2011 *)
    Table[PowerMod[2,PowerMod[2,n,n],n],{n,80}] (* Harvey P. Dale, Oct 09 2019 *)

Formula

a(n) = 2^A015910(n) mod n.

Extensions

Entries corrected by R. J. Mathar, Jan 14 2011

A180061 Numbers k such that (2^(2^k mod k) mod k) = 4.

Original entry on oeis.org

5, 6, 7, 9, 11, 12, 13, 17, 19, 21, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 63, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 121, 127, 131, 133, 137, 139, 149, 151, 157, 163, 167, 172, 173, 179, 181, 190, 191, 193, 196, 197, 199, 211
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 14 2011

Keywords

Comments

The composite terms in this sequence start 6, 9, 12, 21, 63, 121, 133, 172, 190, 196, ... - R. J. Mathar, Jan 14 2011

Crossrefs

Programs

  • Mathematica
    Select[Range[300],PowerMod[2,PowerMod[2,#,#],#]==4&] (* Harvey P. Dale, Sep 08 2016 *)
  • PARI
    s=[]; for(n=1, 1000, if((2^(2^n%n)%n)==4, s=concat(s, n))); s \\ Colin Barker, Jun 27 2014

Formula

A180060(a(n)) = 4.

Extensions

Terms corrected by R. J. Mathar, Jan 14 2011

A180074 Squarefree semiprimes s=p*q, p

Original entry on oeis.org

6, 10, 14, 15, 21, 22, 26, 33, 34, 38, 39, 46, 51, 57, 58, 62, 65, 69, 74, 82, 85, 86, 87, 93, 94, 106, 111, 118, 122, 123, 129, 133, 134, 141, 142, 145, 146, 158, 159, 166, 177, 178, 183, 185, 194, 201, 202, 205, 206, 213, 214, 217, 218, 219, 226, 237
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 14 2011

Keywords

Comments

It may seem that this is a subsequence of A162730, but it is not so, 131801 being the first counterexample. - Michel Marcus, Sep 19 2018

Crossrefs

Programs

  • Mathematica
    f[n_]:=With[{f=FactorInteger[n][[All,1]]},PowerMod[ 2,Times@@f,Times@@f] == 2^f[[1]]]; Select[Range[250],PrimeOmega[#]==2&&SquareFreeQ[#]&&f[#]&] (* Harvey P. Dale, Jun 06 2017 *)
  • PARI
    isok(n) = {if ((bigomega(n) == 2) && (omega(n) == 2), my(p = factor(n)[1, 1]); lift(Mod(2, n)^n) == 2^p);} \\ Michel Marcus, Sep 19 2018

Extensions

Definition and terms corrected by R. J. Mathar, Jan 14 2011

A355858 a(n) = n^(2*n-1) mod (2*n-1).

Original entry on oeis.org

0, 2, 3, 4, 8, 6, 7, 2, 9, 10, 8, 12, 18, 26, 15, 16, 29, 2, 19, 5, 21, 22, 8, 24, 18, 32, 27, 32, 50, 30, 31, 8, 63, 34, 26, 36, 37, 32, 30, 40, 80, 42, 8, 11, 45, 32, 35, 22, 49, 35, 51, 52, 8, 54, 55, 14, 57, 87, 8, 2, 94, 77, 68, 64, 113, 66, 53, 107, 69
Offset: 1

Views

Author

Jonas Kaiser, Jul 20 2022

Keywords

Comments

If a(n) = n then 2*n-1 is prime or Fermat pseudoprime to base 2.

Crossrefs

Programs

  • Mathematica
    a[n_] := PowerMod[n, 2*n - 1, 2*n - 1]; Array[a, 100] (* Amiram Eldar, Jul 23 2022 *)
  • PARI
    a(n)=n^(2*n-1)%(2*n-1)
    
  • PARI
    a(n)=lift(Mod(n, 2*n-1)^(2*n-1)) \\ Rémy Sigrist, Jul 21 2022
    
  • Python
    def a(n): return pow(n, 2*n-1, 2*n-1)
    print([a(n) for n in range(1, 70)]) # Michael S. Branicky, Jul 23 2022
Showing 1-4 of 4 results.