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!)
A059981 Order of compositeness for the n-th composite number. 5
1, 1, 1, 2, 1, 2, 1, 2, 3, 2, 1, 3, 1, 2, 3, 4, 1, 3, 1, 2, 4, 2, 1, 3, 4, 5, 2, 4, 1, 2, 1, 3, 5, 3, 2, 4, 1, 5, 6, 3, 1, 5, 1, 2, 3, 2, 1, 4, 6, 4, 3, 5, 1, 2, 6, 7, 4, 2, 1, 6, 1, 2, 3, 4, 3, 2, 1, 5, 7, 5, 1, 4, 1, 6, 2, 3, 7, 8, 1, 5, 3, 2, 1, 7, 2, 3, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
Let c(k) = k-th composite number, let S(c) = S(c(k)) = k, the subscript of c; a(n) = order of compositeness of c(n) = 1+m where m is largest number such that S(S(..S(c(n))...)) with m S's is a composite.
Number of steps in the composite index chain for the n-th composite. - Daniel Forgues, Sep 28 2012
LINKS
EXAMPLE
16 is 9th composite number, so S(16)=9, 9 is 4th composite, so S(S(16))=4, 4 is first composite number, so S(S(S(16)))=1, not a composite number. Thus a(9)=3.
4 is the first composite number, so S(4)=1, not a composite number. Thus a(1)=1.
MATHEMATICA
Composite[ n_Integer ] := (k = n + PrimePi[ n ] + 1; While[ k != n + PrimePi[ k ] + 1, k++ ]; k); CompositePi[ n_Integer ] := (n - 1 - PrimePi[ n ]); Attributes[ Composite ] = Attributes[ CompositePi ] = Listable; Table[ c = 1; k = CompositePi[ Composite[ n ] ]; While[ ! (PrimeQ[ k ] || k == 1), k = CompositePi[ k ]; c++ ]; c, {n, 100} ]
CROSSREFS
Cf. A049076, A022449 (composites with compositeness 1).
Sequence in context: A366521 A348581 A124044 * A033676 A095165 A355366
KEYWORD
easy,nonn
AUTHOR
Robert G. Wilson v, Mar 06 2001
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 23 18:16 EDT 2024. Contains 371916 sequences. (Running on oeis4.)