|
|
A245200
|
|
Smallest positive solution to k == 0 mod 3 and k == 1 mod prime(n).
|
|
1
|
|
|
6, 15, 12, 27, 18, 39, 24, 30, 63, 75, 42, 87, 48, 54, 60, 123, 135, 72, 147, 159, 84, 90, 195, 102, 207, 108, 219, 114, 255, 132, 138, 279, 150, 303, 315, 327, 168, 174, 180, 363, 192, 387, 198, 399, 423, 447, 228, 459, 234, 240, 483, 252, 258, 264, 270, 543
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
3,1
|
|
COMMENTS
|
Let Z_3p be the ring of integers {0,1,2,...,3p-1} under mod 3p addition and multiplication. Form a subring S from the multiples of 3 in Z_3p. a(n) is the multiplicative identity of S. For example, a(4) = 15 because 7 is the 4th prime and 15 is the multiplicative identity of the subring {0,3,6,9,12,15,18} of Z_21. - Geoffrey Critzer, Jul 03 2015
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 2*prime(n)+1 if prime(n)==1 mod 3 and prime(n)+1 otherwise.
|
|
MATHEMATICA
|
Drop[DeleteDuplicates[Flatten[Table[p = Prime[n]; Select[Table[Table[PowerMod[a, n, 3 p], {n, 1, p - 1}], {a, Range[3, 3 p - 2, 3]}], Length[Union[#]] == 1 &], {n, 1, 50}]]], 1] (* Geoffrey Critzer, Jul 03 2015 *)
sps[n_]:=Module[{k=3, pr=Prime[n]}, While[Mod[k, pr]!=1, k=k+3]; k]; Array[ sps, 60, 3] (* Harvey P. Dale, Aug 05 2016 *)
Table[ChineseRemainder[{0, 1}, {3, n}], {n, Prime[Range[3, 60]]}] (* Harvey P. Dale, Jul 31 2019 *)
|
|
PROG
|
(PARI) a(n) = my(p=prime(n)); if (p % 3 == 1, 2*p+1, p+1); \\ Michel Marcus, Jul 04 2015
(Python)
from sympy import prime, primerange
def f(p): return 2*p+1 if p%3 == 1 else p+1
def aupton(nn): return [f(p) for p in primerange(5, prime(nn)+1)]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|