login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A272800 Flavius Josephus factor of n. 1
0, 2, 0, 2, 3, 2, 0, 2, 4, 2, 3, 2, 0, 2, 5, 2, 3, 2, 0, 2, 4, 2, 3, 2, 6, 2, 0, 2, 3, 2, 7, 2, 4, 2, 3, 2, 5, 2, 0, 2, 3, 2, 8, 2, 4, 2, 3, 2, 0, 2, 6, 2, 3, 2, 5, 2, 4, 2, 3, 2, 9, 2, 0, 2, 3, 2, 10, 2, 4, 2, 3, 2, 7, 2, 5, 2, 3, 2, 0, 2, 4, 2, 3, 2, 6, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

This sequence is analogous to the smallest prime factor of n. If n is a member of A000960, a(n) = 0, otherwise a(n) = the (k+1)-st step that rejects n from Flavius Josephus' sieve.

The n-values of records of this sequence are given by A100287 (see 2004 comment by Sloane).

LINKS

Danny Rorabaugh, Table of n, a(n) for n = 1..1000

PROG

(Sage) # Function that returns an array of the first n terms.

def A272800(n):

    A, B, k = [0]*n, range(n), 1

    while k<len(B):

        for i in range(floor(len(B)/(k + 1))):

            A[B.pop(k*(i + 1))] = k + 1

        k += 1

    return A

# Danny Rorabaugh, May 13 2016

CROSSREFS

Cf. A000960, A100002, A100287.

Sequence in context: A246752 A246650 A264940 * A104513 A305610 A220455

Adjacent sequences:  A272797 A272798 A272799 * A272801 A272802 A272803

KEYWORD

nonn

AUTHOR

Max Barrentine, May 06 2016

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 20 09:12 EDT 2019. Contains 324234 sequences. (Running on oeis4.)