login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A086408 a[1]=1; a[n+1]=a[n]-1 if mod[prime[a[n]],6]=1, else a[n+1]=a[n]+4. 2
1, 5, 9, 13, 17, 21, 20, 24, 28, 32, 36, 35, 39, 43, 47, 46, 45, 49, 53, 52, 56, 60, 64, 68, 67, 66, 70, 69, 73, 72, 76, 80, 79, 83, 87, 91, 95, 94, 98, 102, 106, 105, 104, 108, 112, 111, 110, 109, 113, 117, 116, 120, 124, 128, 132, 136, 135, 139, 143, 142, 146, 150 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

There is a cycle starting with a(117)=270: ...270,274,273,272,271,270,...

LINKS

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

EXAMPLE

a(3)=9 because a(2)=5, prime[5]=11=!=1 (mod 6) and a(3)=a(2)+4

MATHEMATICA

b=1; Prepend[Table[b+=If[Mod[Prime[b], 6]==1, -1, 4], {i, 152}], 1]

CROSSREFS

Cf. A086407, A086409.

Sequence in context: A314665 A314666 A314667 * A141135 A194395 A162502

Adjacent sequences:  A086405 A086406 A086407 * A086409 A086410 A086411

KEYWORD

easy,nonn

AUTHOR

Zak Seidov, Jul 18 2003

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 October 23 05:56 EDT 2019. Contains 328335 sequences. (Running on oeis4.)