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.

A216822 Numbers n such that 2^n == 2 (mod n*(n+1)).

Original entry on oeis.org

1, 5, 13, 29, 37, 61, 73, 157, 181, 193, 277, 313, 397, 421, 457, 541, 561, 613, 661, 673, 733, 757, 877, 997, 1093, 1153, 1201, 1213, 1237, 1289, 1321, 1381, 1453, 1621, 1657, 1753, 1873, 1905, 1933, 1993, 2017, 2137, 2341, 2473, 2557, 2593, 2797, 2857, 2917
Offset: 1

Views

Author

V. Raman, Sep 17 2012

Keywords

Comments

a(17) = 561 is the first composite number in the sequence. - Charles R Greathouse IV, Sep 19 2012
Intersection of { A015919(n) } and { A192109(n)-1 }. - Max Alekseyev, Apr 22 2013

Crossrefs

Cf. A069051 (prime n such that 2^n == 2 (mod n*(n-1))).
Cf. A217466 (prime terms of the sequence).
Cf. A217465 (composite terms of the sequence)

Programs

  • Mathematica
    Select[Range[1, 10000], Mod[2^# - 2, # (# + 1)] == 0 &] (* T. D. Noe, Sep 19 2012 *)
    Join[{1},Select[Range[3000],PowerMod[2,#,#(#+1)]==2&]] (* Harvey P. Dale, Oct 05 2022 *)
  • PARI
    is(n)=Mod(2,n*(n+1))^n==2; \\ Charles R Greathouse IV, Sep 19 2012
    
  • Python
    A216822_list = [n for n in range(1,10**6) if n == 1 or pow(2,n,n*(n+1)) == 2] # Chai Wah Wu, Mar 25 2021

Extensions

a(1)=1 prepended by Max Alekseyev, Dec 29 2017

A217465 Composite integers k such that 2^k == 2 (mod k*(k+1)).

Original entry on oeis.org

561, 1905, 4033, 4681, 5461, 6601, 8481, 11305, 13741, 13981, 16705, 23377, 30121, 31417, 41041, 49141, 52633, 57421, 88357, 88561, 101101, 107185, 121465, 130561, 162193, 196021, 196093, 204001, 208465, 219781, 266305, 276013, 278545, 282133, 285541, 314821, 334153, 341497, 390937, 399001
Offset: 1

Views

Author

V. Raman, Oct 04 2012

Keywords

Comments

Terms A019320(k) belongs to this sequence for k in A297415. - Max Alekseyev, Dec 29 2017

Crossrefs

Subsequence of A216822.
Contains A303531 as a subsequence.

Programs

  • Mathematica
    Select[Range[400000],!PrimeQ[#]&&PowerMod[2,#,#(#+1)]==2&] (* Harvey P. Dale, Oct 12 2012 *)
  • PARI
    for(n=1,10000,if((2^n)%(n*(n+1))==2&&isprime(n)==0,printf(n",")))
    
  • PARI
    forcomposite(n=4,10^6, if(Mod(2,n*(n+1))^n==2, print1(n", "))) \\ Charles R Greathouse IV, Aug 29 2024
    
  • Python
    from sympy import isprime
    A217465_list = [n for n in range(1,10**6) if pow(2,n,n*(n+1)) == 2 and not isprime(n)] # Chai Wah Wu, Mar 25 2021

A375793 Numbers m such that 2^m == 2 (mod m-th triangular number).

Original entry on oeis.org

1, 3, 5, 11, 13, 29, 37, 61, 73, 131, 157, 181, 193, 277, 313, 397, 421, 457, 541, 561, 613, 661, 673, 733, 757, 877, 997, 1093, 1153, 1201, 1213, 1237, 1289, 1321, 1381, 1453, 1621, 1657, 1753, 1873, 1905, 1933, 1993, 2017, 2137, 2341, 2473, 2557, 2593, 2797, 2857, 2917, 3061, 3217, 3253, 3313, 3389, 3457
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 29 2024

Keywords

Comments

a(19) = 561 is the first composite term of the sequence.

Crossrefs

Supersequence of A216822, A217465, A217466 and A375792.

Programs

  • Magma
    [1] cat [m: m in [2..3500] | Modexp(2, m, m*(m+1) div 2) eq 2];
  • Maple
    t:= n-> n*(n+1)/2:
    q:= m-> is(2&^m-2 mod t(m)=0):
    select(q, [$1..3457])[];  # Alois P. Heinz, Sep 21 2024
  • Mathematica
    Select[Range[3457],Mod[2^#-2,#(#+1)/2 ]==0&] (* James C. McMahon, Sep 23 2024 *)
Showing 1-3 of 3 results.