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!)
A086407 a[1]=1; a[n+1]=a[n]-1 if mod[prime[a[n]],6]=5, else a[n+1]=a[n]+4. 2
1, 5, 4, 8, 12, 16, 15, 14, 18, 22, 26, 25, 29, 33, 32, 31, 35, 34, 38, 42, 46, 50, 54, 53, 57, 56, 55, 54, 53, 57, 56, 55, 54, 53, 57, 56, 55, 54, 53, 57, 56, 55, 54, 53, 57, 56, 55, 54, 53, 57, 56, 55, 54 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
There is a cycle ...54,53,57,56,55,54,...
LINKS
EXAMPLE
a(3)=4 because a(2)=5, prime[5]=11=1 (mod 6) and a(3)=a(2)-1
MATHEMATICA
b=1; Prepend[Table[b+=If[Mod[Prime[b], 6]\[Equal]5, -1, 4], {i, 32}], 1]
nxt[a_]:=If[Mod[Prime[a], 6]==5, a-1, a+4]; NestList[nxt, 1, 60] (* Harvey P. Dale, May 29 2013 *)
CROSSREFS
Sequence in context: A051555 A309543 A187891 * A160427 A343244 A215337
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 18 22:56 EDT 2024. Contains 370952 sequences. (Running on oeis4.)