The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A268384 Characteristic function of A001317. 5
0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0
COMMENTS
a(k) = 1 iff k is in A001317, and 0 for all other values.
The recursive formula is based on the fact that only from the terms of A001317 we can reach all the way down to 1 when repeatedly applying the map k -> A006068(k)/2 as long as it is possible to iterate (before A006068(k) is odd).
This sequence is not multiplicative. The smallest counterexample is for n = A000215(6) = 4294967297 which is the first composite Fermat number. In this case a(n) = 1 which is not the product of a(641) and a(6700417) which are both zero. - Andrew Howroyd, Aug 08 2018
LINKS
FORMULA
a(0) = 0, a(1) = 1, and for n > 1, a(n) = 0 if A006068(n) is odd, otherwise a(A006068(n)/2).
a(n) = A209229(A193231(n)).
PROG
(Scheme, two variants)
(definec (A268384 n) (cond ((<= n 1) n) ((odd? (A006068 n)) 0) (else (A268384 (/ (A006068 n) 2))))) ;; Uses the memoization-macro definec
(define (A268384 n) (A209229 (A193231 n)))
(Python)
from itertools import count, islice
def A268384_gen(): # generator of terms
a = -1
for n in count(0):
b = int(''.join(str(int(not(~n&k))) for k in range(n+1)), 2)
yield from (0, )*(b-a-1)
yield 1
a = b
A268384_list = list(islice(A268384_gen(), 30)) # Chai Wah Wu, Jun 30 2022
CROSSREFS
Cf. also A000215, A268389, A268391.
Sequence in context: A309752 A209355 A141743 * A358670 A288524 A112416
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 10 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 17 19:01 EDT 2024. Contains 372603 sequences. (Running on oeis4.)