cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A100298 Similar to Cald's sequence (A006509), but move by the n-th composite instead of by the n-th prime.

This page as a plain text file.
%I A100298 #15 Mar 11 2014 01:32:14
%S A100298 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,
%T A100298 56,17,57,15,59,104,58,10,0,0,51,103,157,102,46,0,0,60,122,185,121,
%U A100298 186,120,188,119,189,117,43,118,42,0,78,158,77,159,75,160,74,161,73,163,72
%N A100298 Similar to Cald's sequence (A006509), but move by the n-th composite instead of by the n-th prime.
%e A100298 The 4th term is 3 and the 4th composite is 9.
%e A100298 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.
%t A100298 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_ *)
%Y A100298 Cf. A006509, A002808.
%K A100298 nonn
%O A100298 1,2
%A A100298 _Leroy Quet_, Oct 13 2005
%E A100298 More terms from _Klaus Brockhaus_, Oct 17 2005