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

%I #7 Mar 30 2012 17:26:09

%S 1,5,9,13,17,21,20,24,28,32,36,35,39,43,47,46,45,49,53,52,56,60,64,68,

%T 67,66,70,69,73,72,76,80,79,83,87,91,95,94,98,102,106,105,104,108,112,

%U 111,110,109,113,117,116,120,124,128,132,136,135,139,143,142,146,150

%N a[1]=1; a[n+1]=a[n]-1 if mod[prime[a[n]],6]=1, else a[n+1]=a[n]+4.

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

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

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

%Y Cf. A086407, A086409.

%K easy,nonn

%O 1,2

%A _Zak Seidov_, Jul 18 2003

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 23 02:23 EDT 2024. Contains 371906 sequences. (Running on oeis4.)