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.

A301917 a(n) is the least k for which A301916(n) divides 3^k + 1.

Original entry on oeis.org

1, 2, 3, 8, 9, 14, 15, 9, 4, 21, 26, 5, 11, 6, 39, 44, 24, 50, 17, 56, 63, 68, 69, 74, 25, 39, 81, 86, 8, 98, 99, 105, 111, 116, 60, 128, 134, 15, 140, 141, 146, 17, 158, 165, 84, 87, 176, 61, 93, 189, 194, 99, 200, 102, 73, 224, 114, 230, 231, 243, 83, 254
Offset: 1

Views

Author

Luke W. Richards, Mar 28 2018

Keywords

Comments

This can be used to factor P-1 values for potential primes, P of the form 3^k+2.
A301915 can be used in conjunction with this sequence such that A301916 always divides 3^(a(n) + k*A301915(n)) + 1 for all nonnegative values of k.

Examples

			A301916(1) = 2 and the first value of k for which 3^k+1 is a multiple of 2 is k = 1, so a(1) = 1.
A301916(5) = 19 and the first value of k for which 3^k+1 is a multiple of 19 is k = 9, so a(5) = 9.
		

Crossrefs

Programs

  • Maple
    f:= proc(p) local t; t:= numtheory:-order(3,p); if t::even then t/2 else NULL fi end proc:
    f(2):= 1:
    map(f, [seq(ithprime(i),i=1..300)]); # Robert Israel, May 23 2018
  • Mathematica
    f[p_] := Module[{t = MultiplicativeOrder[3, p]}, If[EvenQ[t],  t/2, Nothing]];
    f[2] = 1;
    f /@ Table[Prime[i], {i, 1, 300}] (* Jean-François Alcover, Feb 02 2023, after Robert Israel *)
  • PARI
    lista(nn) = {for (n=1, nn, p = prime(n); if (p != 3, m = Mod(3, p); nb = znorder(m); for (k=1, nb, if (m^k == Mod(-1, p), print1(k, ", ")););););} \\ Michel Marcus, May 18 2018

Formula

a(n) = A301919(n+1) - 1 for n > 1.

A301918 Primes which divide numbers of the form 3^k+3.

Original entry on oeis.org

2, 3, 5, 7, 17, 19, 29, 31, 37, 41, 43, 53, 61, 67, 73, 79, 89, 97, 101, 103, 113, 127, 137, 139, 149, 151, 157, 163, 173, 193, 197, 199, 211, 223, 233, 241, 257, 269, 271, 281, 283, 293, 307, 317, 331, 337, 349, 353, 367, 373, 379, 389, 397, 401, 409, 439
Offset: 1

Views

Author

Luke W. Richards, Mar 28 2018

Keywords

Comments

Union of {3} and A301916, because 3^k + 3 = 3*(3^(k-1) + 1). [Comment edited by Jeppe Stig Nielsen, Jul 04 2020.]
Can be used to factor P+1 values where P is a potential prime of the form 3^k+2.
Is this 2 and 3 with A045318? - David A. Corneth, May 04 2018
No, it is not. Primes like 769, 1297, ... are also here but not in A045318. See A320481 for the explanation. - Jeppe Stig Nielsen, Jun 27 2020

Examples

			All values of 3^k+3 are multiples of 2, so 2 is in the sequence.
3^4+3 = 84, which is a multiple of 7, so 7 is in the sequence.
		

Crossrefs

Showing 1-2 of 2 results.