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

A187787 Numbers k such that 2^(k+1) == 1 (mod k).

Original entry on oeis.org

1, 3, 15, 35, 119, 255, 455, 1295, 2555, 2703, 3815, 3855, 4355, 5543, 6479, 8007, 9215, 10439, 10619, 11951, 16211, 22895, 23435, 26319, 26795, 27839, 28679, 35207, 43055, 44099, 47519, 47879, 49679, 51119, 57239, 61919, 62567, 63167, 63935, 65535, 74447, 79055
Offset: 1

Views

Author

Franz Vrabec, Jan 06 2013

Keywords

Comments

Prime factorizations of the first ten terms: 3, 3*5, 5*7, 7*17, 3*5*17, 5*7*13, 5*7*37, 5*7*73, 3*17*53, 5*7*109.

Examples

			3 is in the sequence because 2^(3+1) mod 3 = 16 mod 3 = 1.
		

Crossrefs

Programs

  • Maple
    for n from 1 to 100000 do if 2&^(n+1) mod n = 1 then print(n) fi od;
  • Mathematica
    m = 1; Join[Select[Range[1, m], Divisible[2^(# + 1), #] &],
    Select[Range[m + 1, 10^5], PowerMod[2, # + 1, #] == m &]] (* Robert Price, Oct 11 2018 *)
    Join[{1},Select[Range[80000],PowerMod[2,#+1,#]==1&]] (* Harvey P. Dale, Aug 19 2019 *)
  • PARI
    for (n=1,10^7, if (Mod(2,n)^(n+1)==1,print1(n,", "))); /* Joerg Arndt, Jan 06 2013 */

Extensions

Term a(1)=1 prepended by Max Alekseyev, Nov 29 2014

A115976 Numbers k that divide 2^(k-2) + 1.

Original entry on oeis.org

1, 3, 49737, 717027, 9723611, 21335267, 32390921, 38999627, 43091897, 86071337, 101848553, 102361457, 228911411, 302948067, 370219467, 393664027, 455781089, 483464027, 1040406177, 1272206987, 2371678553, 2571052241, 2648052857, 3054713937, 3597613307, 3782971499, 3917903851, 4005163577, 5419912241
Offset: 1

Views

Author

Max Alekseyev, Mar 15 2006

Keywords

Comments

Some larger terms: 4465786944074559659, 1440261542571735083956640176981881665928575750093930787551969

Crossrefs

Programs

  • Mathematica
    lst = {}; Do[ If[ PowerMod[2, 2n - 3, 2n - 1] == 2n - 2, AppendTo[lst, 2n - 1]], {n, 10^9}]; lst (* Robert G. Wilson v, Apr 04 2006 *)

Extensions

More terms from Robert G. Wilson v, Apr 04 2006
Terms a(24) onward from Max Alekseyev, Feb 03 2015
b-file corrected and extended by Max Alekseyev, Oct 27 2018

A381010 Positive integers k such that 2^(k+2) - 1 is divisible by k.

Original entry on oeis.org

1, 7, 511, 713, 11023, 15553, 43873, 81079, 95263, 323593, 628153, 2275183, 6520633, 6955513, 7947583, 10817233, 12627943, 14223823, 15346303, 19852423, 27923663, 28529473, 29360527, 31019623, 39041863, 41007823, 79015273, 134217727, 143998193, 213444943, 227018383
Offset: 1

Views

Author

Keywords

Comments

7 is the only prime term.

Crossrefs

Programs

  • Maple
    q:= k-> 0=(2&^(k+2)-1) mod k:
    select(q, [$1..1000000])[];  # Alois P. Heinz, Apr 10 2025
  • PARI
    isok(k) = Mod(2, k)^(k+2) == 1; \\ Michel Marcus, Apr 10 2025
  • Python
    def in_sequence(n):
        return pow(2, n + 2, n) == 1 % n
    
Showing 1-3 of 3 results.