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!)
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
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
Sequence in context: A314665 A314666 A314667 * A141135 A363379 A194395
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 19 04:26 EDT 2024. Contains 370952 sequences. (Running on oeis4.)