login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A327491 a(0) = 0. If 4 divides n then a(n) = valuation(n, 2) else a(n) = (n mod 2) + 1. 6
0, 2, 1, 2, 2, 2, 1, 2, 3, 2, 1, 2, 2, 2, 1, 2, 4, 2, 1, 2, 2, 2, 1, 2, 3, 2, 1, 2, 2, 2, 1, 2, 5, 2, 1, 2, 2, 2, 1, 2, 3, 2, 1, 2, 2, 2, 1, 2, 4, 2, 1, 2, 2, 2, 1, 2, 3, 2, 1, 2, 2, 2, 1, 2, 6, 2, 1, 2, 2, 2, 1, 2, 3, 2, 1, 2, 2, 2, 1, 2, 4, 2, 1, 2, 2, 2, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

LINKS

Table of n, a(n) for n=0..87.

EXAMPLE

Seen as an irregular table for n >= 1:

2,

1, 2,

2, 2, 1, 2,

3, 2, 1, 2, 2, 2, 1, 2,

4, 2, 1, 2, 2, 2, 1, 2, 3, 2, 1, 2, 2, 2, 1, 2,

5, 2, 1, 2, 2, 2, 1, 2, 3, 2, 1, 2, 2, 2, 1, 2, 4, 2, 1, 2, ....

MAPLE

A327491 := n -> if n = 0 then 0

elif 0 = irem(n, 4) then padic[ordp](n, 2)

elif 0 = irem(n, 2) then 1 else 2 fi:

seq(A327491(n), n=0..87);

PROG

(SageMath)

def A327491(n):

    if n == 0: return 0

    if 4.divides(n): return valuation(n, 2)

    return n % 2 + 1

print([A327491(n) for n in (0..87)])

(PARI) a(n)={if(n==0, 0, if(n%4, n%2 + 1, valuation(n, 2)))} \\ Andrew Howroyd, Sep 28 2019

CROSSREFS

Cf. A327492, A327493, A327494, A327495.

Sequence in context: A055718 A007302 A303401 * A099910 A213325 A043555

Adjacent sequences:  A327488 A327489 A327490 * A327492 A327493 A327494

KEYWORD

nonn

AUTHOR

Peter Luschny, Sep 27 2019

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 September 21 16:31 EDT 2021. Contains 347598 sequences. (Running on oeis4.)