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!)
A100298 Similar to Cald's sequence (A006509), but move by the n-th composite instead of by the n-th prime. 2
1, 5, 11, 3, 12, 2, 14, 28, 13, 29, 47, 27, 6, 0, 24, 49, 23, 50, 22, 52, 20, 53, 19, 54, 18, 56, 17, 57, 15, 59, 104, 58, 10, 0, 0, 51, 103, 157, 102, 46, 0, 0, 60, 122, 185, 121, 186, 120, 188, 119, 189, 117, 43, 118, 42, 0, 78, 158, 77, 159, 75, 160, 74, 161, 73, 163, 72 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
The 4th term is 3 and the 4th composite is 9.
3 - 9 is negative, so instead add 9 to 3 to get 12, which becomes the 5th term because 12 is not among the earlier terms of the sequence.
MATHEMATICA
composite[n_] := FixedPoint[ n + PrimePi[#] + 1 & , n + PrimePi[n] + 1]; lst = {1}; Do[b = Last[lst]; p = composite[Length[lst]]; If[b > p && ! MemberQ[lst, b - p], AppendTo[lst, b - p], If[ ! MemberQ[lst, b + p], AppendTo[lst, b + p], AppendTo[lst, 0]]], {100}]; lst (* Jean-François Alcover, Nov 15 2013, after A006509 and Robert G. Wilson v *)
CROSSREFS
Sequence in context: A125683 A125685 A098147 * A066461 A351654 A117069
KEYWORD
nonn
AUTHOR
Leroy Quet, Oct 13 2005
EXTENSIONS
More terms from Klaus Brockhaus, Oct 17 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:06 EDT 2024. Contains 371964 sequences. (Running on oeis4.)