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!)
A075341 a(1) = 1, a(2n) is the smallest composite number == 1 mod (a(2n-1)) and a(2n+1) is the smallest prime == 1 (mod a(2n)). 1

%I #8 Dec 05 2013 19:55:37

%S 1,4,5,6,7,8,17,18,19,20,41,42,43,44,89,90,181,182,547,548,1097,1098,

%T 7687,7688,15377,15378,30757,30758,276823,276824,553649,553650,

%U 2768251,2768252,8304757,8304758,99657097,99657098,199314197,199314198

%N a(1) = 1, a(2n) is the smallest composite number == 1 mod (a(2n-1)) and a(2n+1) is the smallest prime == 1 (mod a(2n)).

%C a(k) = b(k-5) for k > 8 where b(r) is the r-th term of A075340.

%t a[1] = 1; a[2] = 4; a[n_] := a[n] = Block[{k = a[n - 1] + 1, m = a[n - 1]}, If[OddQ@n, While[ !PrimeQ@k || Mod[k, m] != 1, k += m]; k, While[PrimeQ@k || Mod[k, m] != 1, k += m]; k]]; Array[a, 40] (* _Robert G. Wilson v_ Sep 21 2006 *)

%Y Cf. A075340.

%Y See also: Always look for prime: A061092. Always look for composite: A061766.

%K nonn

%O 1,2

%A _Amarnath Murthy_, Sep 18 2002

%E More terms from _David Wasserman_, Jan 16 2005

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 25 07:53 EDT 2024. Contains 371964 sequences. (Running on oeis4.)