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

A289382 a(n) = 2^n mod triangular(n).

Original entry on oeis.org

0, 1, 2, 6, 2, 1, 16, 4, 17, 34, 2, 40, 2, 4, 8, 120, 104, 1, 78, 46, 134, 70, 140, 16, 132, 121, 134, 30, 2, 94, 64, 400, 206, 429, 158, 334, 2, 4, 8, 616, 494, 1, 690, 346, 692, 142, 848, 64, 912, 1024, 8, 796, 797, 379, 1528, 4, 350, 178, 1418, 916, 2, 4, 512, 1056, 32, 2011
Offset: 1

Views

Author

Alex Ratushnyak, Jul 04 2017

Keywords

Examples

			a(6) = 2**6 mod (6*7/2) = 64 mod 21 = 1.
		

Crossrefs

Programs

  • Maple
    seq(2^n mod n*(n+1)/2, n=1..100); # Robert Israel, Jul 04 2017
  • Mathematica
    Table[Mod[2^n, n (n + 1)/2], {n, 66}] (* Michael De Vlieger, Jul 04 2017 *)
    PowerMod[2,#,(#(#+1))/2]&/@Range[70] (* Harvey P. Dale, Oct 12 2018 *)
  • PARI
    a(n) = lift(Mod(2, n*(n+1)/2)^n); \\ Michel Marcus, Jul 04 2017
  • Python
    for n in range(1,99): print(str(int(2**n % (n*(n+1)/2))), end=', ')
    

Formula

a(n) = A000079(n) mod A000217(n) = 2^n mod n*(n+1)/2.
a(n) = 1 for n>1 in A272934. - Michel Marcus, Jul 04 2017

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