The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 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 Michael S. Branicky, Table of n, a(n) for n = 3..10002 (terms 3..1000 from Harvey P. Dale) Eric Weisstein's World of Mathematics, Chinese Remainder Theorem 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)] print(aupton(58)) # Michael S. Branicky, Jun 15 2021 CROSSREFS Sequence in context: A215739 A161397 A145257 * A070555 A265388 A334352 Adjacent sequences:  A245197 A245198 A245199 * A245201 A245202 A245203 KEYWORD nonn AUTHOR Jon Perry, Jul 17 2014 EXTENSIONS More terms from Michel Marcus, Jul 04 2015 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 25 20:01 EDT 2021. Contains 347659 sequences. (Running on oeis4.)