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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A101635 Increasing primes of alternating congruences modulo 6. 0
5, 7, 11, 13, 17, 19, 23, 31, 41, 43, 47, 61, 71, 73, 83, 97, 101, 103, 107, 109, 113, 127, 131, 139, 149, 151, 167, 181, 191, 193, 197, 199, 227, 229, 233, 241, 251, 271, 281, 283, 293, 307, 311, 313, 317, 331, 347, 349, 353, 367, 383, 397, 401, 409, 419, 421 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Table of n, a(n) for n=1..56.

FORMULA

a(2n) == 1 (mod 6) & a(2n+1) == -1 (mod 6).

MATHEMATICA

a[1] = 5; a[n_] := a[n] = Block[{k = a[n - 1] + 3 + If[ Mod[a[n - 1], 3] == 1, 1, -1]}, While[ !PrimeQ[k], k += 6]; k]; Table[ a[n], {n, 60}]

PROG

(PARI) p=5; q=7; i=0; while(i++<99, if(p<q, print1(p", "); while((p=nextprime(p+6))%6!=5, ), print1(q", "); while((q=nextprime(q+6))%6!=1, ))) \\ Charles R Greathouse IV, May 15 2013

CROSSREFS

Cf. A100859.

Sequence in context: A020589 A216523 A230227 * A118941 A096547 A216524

Adjacent sequences:  A101632 A101633 A101634 * A101636 A101637 A101638

KEYWORD

nonn

AUTHOR

Ray Chandler and Robert G. Wilson v, Jan 25 2005

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 31 10:51 EDT 2021. Contains 346373 sequences. (Running on oeis4.)