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.

Previous Showing 11-15 of 15 results.

A276971 Odd integers n such that 2^n == 2^11 (mod n).

Original entry on oeis.org

1, 3, 11, 15, 31, 35, 51, 121, 341, 451, 455, 671, 781, 1111, 1235, 1271, 1441, 1547, 1661, 1991, 2091, 2101, 2321, 2651, 2761, 2981, 3091, 3421, 3641, 3731, 3751, 4403, 4411, 4631, 4741, 5071, 5401, 5731, 5951, 6171, 6191, 6281, 6611, 6851, 6941, 7051, 7271, 7601, 7711, 8261, 8371, 8435, 8921
Offset: 1

Views

Author

Max Alekseyev, Sep 22 2016

Keywords

Comments

Also, integers n such that 2^(n-11) == 1 (mod n).
For all m, 2^A128124(m)-1 belongs to this sequence.

Crossrefs

The odd terms of A015935.
Odd integers n such that 2^n == 2^k (mod n): A176997 (k=1), A173572 (k=2), A276967 (k=3), A033984 (k=4), A276968 (k=5), A215610 (k=6), A276969 (k=7), A215611 (k=8), A276970 (k=9), A215612 (k=10), this sequence (k=11), A215613 (k=12).
Cf. A128124.

Programs

  • Mathematica
    m = 2^11; Join[Select[Range[1, m, 2], Divisible[2^# - m, #] &],
    Select[Range[m + 1, 10^6, 2], PowerMod[2, #, #] == m &]] (* Robert Price, Oct 12 2018 *)

A173138 Composite numbers k such that 2^(k-4) == 1 (mod k).

Original entry on oeis.org

4, 40369, 673663, 990409, 1697609, 2073127, 6462649, 7527199, 7559479, 14421169, 21484129, 37825753, 57233047, 130647919, 141735559, 179203369, 188967289, 218206489, 259195009, 264538057, 277628449, 330662479, 398321239, 501126487, 506958313, 612368311, 767983759
Offset: 1

Views

Author

Michel Lagneau, Feb 10 2010

Keywords

Comments

Besides the initial term, the sequence coincides with A033984 and consists of the odd terms > 7 of A015924.

Examples

			4 is a term: 2^(4 - 4) = 1 (mod 4).
		

References

  • A. E. Bojarincev, Asymptotic expressions for the n-th composite number, Univ. Mat. Zap. 6:21-43 (1967). - In Russian.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 2.

Crossrefs

Programs

  • Maple
    with(numtheory): for n from 1 to 100000000 do: a:= 2^(n-4)- 1; b:= a / n; c:= floor(b): if b = c and tau(n) <> 2 then print (n); else fi;od:
  • Mathematica
    Select[Range[500000000],!PrimeQ[#]&&PowerMod[2,#-4,#]==1&] (* Harvey P. Dale, Nov 23 2011 *)
  • PARI
    is(n)=!isprime(n) && n>1 && Mod(2,n)^(n-4)==1 \\ Charles R Greathouse IV, Nov 23 2011
    
  • Python
    from sympy import isprime, prime, nextprime
    def afind(k=4):
        while True:
            if pow(2, k-4, k) == 1 and not isprime(k): print(k, end=", ")
            k += 1
    afind() # Michael S. Branicky, Mar 21 2022

Extensions

Simplified the definition, added cross-reference to A033984 R. J. Mathar, May 18 2010
More terms from Harvey P. Dale, Nov 23 2011
Typo in a(13) corrected by Georg Fischer, Mar 19 2022
a(24) and beyond from Michael S. Branicky, Mar 21 2022

A242875 Numbers n such that (n^n+2^2)/(n+2) is an integer.

Original entry on oeis.org

2, 5, 8, 128, 2144, 4808, 12872, 14168, 33672, 40367, 45992, 116192, 185768, 186824, 271208, 426008, 524288, 601352, 612768, 673661, 755792, 990407, 996032, 1697607, 1878368, 2073125, 2262752, 4325960, 4810808, 6331808, 6462647, 6707352, 7527197, 7559477
Offset: 1

Views

Author

Derek Orr, May 25 2014

Keywords

Comments

Given S = (n^n+k^k)/(n+k) (here k = 2), when k = 2^m for some m > 0, there are significantly less values of n that make S an integer. For k=3, see A242883.
a(15) > 210000.
Equivalently, (-2)^n + 4 == 0 (mod n + 2). - Robert Israel, Jun 10 2014
Odd terms are A033984(2..infinity) - 2. - Robert Israel, Jun 10 2014

Examples

			(5^5+2^2)/(5+2) = 3129/7 = 447 is an integer. Thus 5 is a member of this sequence.
		

Crossrefs

Cf. A242883.

Programs

  • Maple
    filter:= proc(n) (-2)&^n + 4 mod (n+2) = 0 end proc;
    select(filter, [$1..10^6]); # Robert Israel, Jun 10 2014
  • PARI
    for(n=1,10^5,s=(n^n+2^2)/(n+2);if(floor(s)==s,print(n)))

Extensions

a(16)-a(34) from Robert Israel, Jun 10 2014

A294390 a(n) = 2^(n-4) mod n, for n >= 4.

Original entry on oeis.org

1, 2, 4, 1, 0, 5, 4, 7, 4, 5, 2, 8, 0, 15, 4, 12, 16, 11, 14, 3, 16, 2, 10, 5, 8, 11, 4, 4, 0, 17, 30, 23, 4, 14, 24, 20, 16, 36, 4, 27, 12, 32, 6, 6, 16, 8, 14, 26, 40, 20, 22, 13, 16, 29, 22, 37, 16, 23, 8, 32, 0, 2, 4, 42, 52, 35, 64, 9, 40, 64, 28, 23, 20, 30, 4
Offset: 4

Views

Author

Enrique Navarrete, Oct 29 2017

Keywords

Comments

Every nonnegative integer seems to appear in the sequence, and every integer seems to appear in the sequence of first differences (see link).
From Robert Israel, Dec 04 2017: (Start)
a(n) = 0 iff n>=8 is a power of 2.
a(n) = 1 iff n=4 or n is in A033984.
a(n) = 2 iff n>=4 is in A015925 and is not divisible by 4. (End)

Examples

			For n=9, 2^5 = 32 == 5 mod 9.
		

Crossrefs

Programs

Extensions

More terms from Michel Marcus, Oct 30 2017

A385073 a(n) = b^(n-1) mod n, where b = A053669(n) is the least integer greater than 1 and coprime to n.

Original entry on oeis.org

0, 1, 1, 3, 1, 5, 1, 3, 4, 3, 1, 5, 1, 3, 4, 11, 1, 11, 1, 7, 4, 3, 1, 5, 16, 3, 13, 27, 1, 7, 1, 11, 4, 3, 9, 29, 1, 3, 4, 27, 1, 17, 1, 27, 31, 3, 1, 29, 15, 33, 4, 27, 1, 11, 49, 3, 4, 3, 1, 43, 1, 3, 4, 43, 16, 23, 1, 27, 4, 13, 1, 29, 1, 3, 34, 27, 9, 5, 1, 27, 40, 3, 1, 17
Offset: 1

Views

Author

Robert G. Wilson v, Jun 16 2025

Keywords

Comments

Inspired by Fermat's Little Theorem.
a(n) > 0 for n > 1 since n and b are coprime.

Crossrefs

Programs

  • Maple
    f:= proc(n) local b;
      b:= 2;
      while n mod b = 0 do b:= nextprime(b) od;
      b &^ (n-1) mod n
    end proc:
    f(1):= 0:
    map(f, [$1..100]); # Robert Israel, Jun 18 2025
  • Mathematica
    a[n_] := Block[{b = 2}, While[GCD[n, b] > 1, b++]; PowerMod[b, n - 1, n]]; Array[a, 84]
  • PARI
    a(n) = forprime(p=2, , if(n%p, return(lift(Mod(p, n)^(n-1))))); \\ Michel Marcus, Jun 18 2025

Formula

a(n) = 0 iff n = 1.
a(n) = 1 iff n belongs to A000040, A001567, or A130433.
a(n) = 2 iff n>1 and belongs to A173572;
a(n) = 4 iff n belongs to A033553;
a(n) = 8 iff n>7 and belongs to either A033984 or A173138;
a(n) = 16 iff n>15 and belongs to A276968;
a(n) = 32 iff n>1 and belongs to A215610;
a(n) = 64 iff n>63 and belongs to A276969;
a(n) = 128 iff n>127 and belongs to A215611;
a(n) = 256 iff n>255 and belongs to A276970;
a(n) = 512 iff n>511 and belongs to A215612;
a(n) = 1024 iff n>1023 and belongs to A276971;
a(n) = 2048 iff n>2047 and belongs to A215613;
From Robert Israel, Jun 18 2025: (Start)
a(2*p) = 3 if p is a prime > 3.
a(3*p) = 4 if p is a prime > 2.
a(4*p) = 3^3 if p is a prime > 5.
a(6*p) = 5^5 if p is a prime > 509.
a(8*p) = 3^5 if p is a prime > 271.
a(10*p) = 3^9 if p is a prime > 1951.
a(12*p) = 5^11 if p is a prime > 4069003. (End)
Previous Showing 11-15 of 15 results.