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!)
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
FORMULA
a(0) = 0; if n is odd then a(n) = 2, otherwise a(n) = A007814(n). - Andrey Zabolotskiy, Jan 08 2024
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
Sequence in context: A007302 A362028 A303401 * A099910 A213325 A043555
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 03:51 EDT 2024. Contains 371264 sequences. (Running on oeis4.)