cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A280049 Canonical representation of n as a sum of distinct Jacobsthal numbers J(n) (A001045) (see Comments for details); also binary numbers that end in an even number of zeros.

This page as a plain text file.
%I A280049 #43 Jan 30 2025 15:28:01
%S A280049 1,11,100,101,111,1001,1011,1100,1101,1111,10000,10001,10011,10100,
%T A280049 10101,10111,11001,11011,11100,11101,11111,100001,100011,100100,
%U A280049 100101,100111,101001,101011,101100,101101,101111,110000,110001,110011,110100,110101,110111
%N A280049 Canonical representation of n as a sum of distinct Jacobsthal numbers J(n) (A001045) (see Comments for details); also binary numbers that end in an even number of zeros.
%C A280049 Every positive integer has a unique expression as a sum of distinct Jacobsthal numbers in which the index of the smallest summand is odd, with J(1) = 1 and J(2) = 1 both allowed. [Carlitz-Scoville-Hoggatt, 1972]. - Based on a comment in A001045 from _Ira M. Gessel_, Dec 31 2016.
%C A280049 The highest-order bits are on the left. Interpreting these as binary numbers we get A003159.
%H A280049 Lars Blomberg, <a href="/A280049/b280049.txt">Table of n, a(n) for n = 1..10000</a>
%H A280049 L. Carlitz, R. Scoville, and V. E. Hoggatt, Jr., <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Scanned/10-5/carlitz3-a.pdf">Representations for a special sequence</a>, Fibonacci Quarterly 10.5 (1972), 499-518, 550.
%F A280049 a(n) = A007088(A003159(n)). - _Amiram Eldar_, Jul 14 2023
%e A280049 9 = 5+3+1 = J(4)+J(3)+J(1) = 1101.
%t A280049 FromDigits[IntegerDigits[#, 2]] & /@ Select[Range[100], EvenQ[IntegerExponent[#, 2]] &] (* _Amiram Eldar_, Jul 14 2023 *)
%o A280049 (PARI) lista(kmax) = for(k = 1, kmax, if(!(valuation(k, 2)%2), print1(fromdigits(binary(k), 10), ", "))); \\ _Amiram Eldar_, Jul 14 2023
%o A280049 (Python)
%o A280049 from itertools import count, islice
%o A280049 def A280049_gen(): # generator of terms
%o A280049     return map(lambda n:int(bin(n)[2:]),filter(lambda n:(n&-n).bit_length()&1,count(1)))
%o A280049 A280049_list = list(islice(A280049_gen(),20)) # _Chai Wah Wu_, Mar 19 2024
%o A280049 (Python)
%o A280049 def A280049(n):
%o A280049     def f(x):
%o A280049         c, s = n+x, bin(x)[2:]
%o A280049         l = len(s)
%o A280049         for i in range(l&1^1,l,2):
%o A280049             c -= int(s[i])+int('0'+s[:i],2)
%o A280049         return c
%o A280049     m, k = n, f(n)
%o A280049     while m != k: m, k = k, f(k)
%o A280049     return int(bin(m)[2:]) # _Chai Wah Wu_, Jan 30 2025
%Y A280049 Cf. A001045, A003159, A007088.
%K A280049 nonn,base
%O A280049 1,2
%A A280049 _N. J. A. Sloane_, Dec 31 2016
%E A280049 Corrected a(5), a(16) and more terms from _Lars Blomberg_, Jan 02 2017