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.

A179078 a(n) = ((3^p - 3)/p) mod p where p is n-th prime.

Original entry on oeis.org

1, 2, 3, 4, 0, 11, 13, 16, 5, 16, 20, 17, 22, 6, 33, 16, 5, 39, 45, 25, 5, 4, 26, 72, 21, 53, 43, 80, 85, 12, 53, 94, 54, 135, 113, 132, 125, 32, 34, 163, 100, 147, 52, 61, 84, 46, 54, 80, 122, 103, 83, 43, 109, 87, 127, 125, 239, 129, 63, 98, 160, 223, 29, 82, 3, 68, 288, 322
Offset: 1

Views

Author

Artur Jasinski, Jun 28 2010

Keywords

Comments

a(n) = 0 where n=5 (p=11) and n=78940 (p=1006003) see A014127.

Crossrefs

Programs

  • Maple
    f:= p -> (3&^p-3 mod p^2)/p:
    seq(f(ithprime(i)),i=1..100); # Robert Israel, Nov 03 2024
  • Mathematica
    aa = {}; Do[AppendTo[aa, Mod[(3^Prime[n] - 3)/Prime[n], Prime[n]]], {n, 1, 100}]; aa (* Artur Jasinski *)

A377655 a(n) is the least prime p such that (2^p - 2)/p == n (mod p), or -1 if there is no such prime p.

Original entry on oeis.org

1093, 2, 3, 30577, 7, 41, 13, 43, 2633, 17, 11, 23, 31, 83, 233, 103, 59, 97, 25037, 53, 67, 3323, 14717
Offset: 0

Views

Author

Robert Israel, Nov 03 2024

Keywords

Comments

For n = 23, 27, 37, 40, 42, ..., a(n) > 5 * 10^9 if not -1.
a(23) > 2*10^11 if it is not -1. - Michael S. Branicky, Nov 04 2024

Examples

			a(4) = 7 because (2^7 - 2)/7 = 18 == 4 (mod 7), and 7 is the first prime that works.
		

Crossrefs

Programs

  • Maple
    f:= p -> (2&^p-2 mod p^2)/p:
    V:= Array(0..22): count:= 0:
    p:= 1:
    for i from 1 while count < 23 do
      p:= nextprime(p);
      v:= f(p);
      if v <= 22 and V[v] = 0 then V[v]:= i; count:= count+1 fi;
    od:
    convert(V,list);

Formula

a(n) = prime(i) where A179077(i) = n, if such i exists.
Showing 1-2 of 2 results.