login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A070847 Smallest prime == 1 mod (3n). 7

%I #19 Jun 11 2020 15:34:52

%S 7,7,19,13,31,19,43,73,109,31,67,37,79,43,181,97,103,109,229,61,127,

%T 67,139,73,151,79,163,337,349,181,373,97,199,103,211,109,223,229,937,

%U 241,739,127,1033,397,271,139,283,433,883,151,307,157,3181,163,331,337

%N Smallest prime == 1 mod (3n).

%H Robert Israel, <a href="/A070847/b070847.txt">Table of n, a(n) for n = 1..10000</a>

%p f:= proc(n) local k,d;

%p if n::even then d:= 3*n else d:= 6*n fi;

%p for k from 1 by d do if isprime(k) then return k fi od

%p end proc:

%p map(f, [$1..100]); # _Robert Israel_, Sep 19 2019

%t a[n_] := Module[{k, d}, If[EvenQ[n], d = 3n, d = 6n]; For[k = 1, True, k += d, If[PrimeQ[k], Return[k]]]];

%t Array[a, 100] (* _Jean-François Alcover_, Jun 11 2020, after Maple *)

%o (PARI) for(n=1,80,s=1; while((isprime(s)*s-1)%(3*n)>0,s++); print1(s,","))

%Y Cf. A070846, A070848, A070849, A070850, A070851, A070852, A070853.

%Y Cf. A034694.

%Y Cf. A024892 (n such that a(n)=3*n+1).

%Y Cf. A002476.

%K nonn,look

%O 1,1

%A _Amarnath Murthy_, May 15 2002

%E More terms from _Benoit Cloitre_, May 18 2002

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 30 07:52 EDT 2024. Contains 372127 sequences. (Running on oeis4.)