OFFSET
1,2
COMMENTS
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.
The highest-order bits are on the left. Interpreting these as binary numbers we get A003159.
LINKS
Lars Blomberg, Table of n, a(n) for n = 1..10000
L. Carlitz, R. Scoville, and V. E. Hoggatt, Jr., Representations for a special sequence, Fibonacci Quarterly 10.5 (1972), 499-518, 550.
FORMULA
EXAMPLE
9 = 5+3+1 = J(4)+J(3)+J(1) = 1101.
MATHEMATICA
FromDigits[IntegerDigits[#, 2]] & /@ Select[Range[100], EvenQ[IntegerExponent[#, 2]] &] (* Amiram Eldar, Jul 14 2023 *)
PROG
(PARI) lista(kmax) = for(k = 1, kmax, if(!(valuation(k, 2)%2), print1(fromdigits(binary(k), 10), ", "))); \\ Amiram Eldar, Jul 14 2023
(Python)
from itertools import count, islice
def A280049_gen(): # generator of terms
return map(lambda n:int(bin(n)[2:]), filter(lambda n:(n&-n).bit_length()&1, count(1)))
(Python)
def A280049(n):
def f(x):
c, s = n+x, bin(x)[2:]
l = len(s)
for i in range(l&1^1, l, 2):
c -= int(s[i])+int('0'+s[:i], 2)
return c
m, k = n, f(n)
while m != k: m, k = k, f(k)
return int(bin(m)[2:]) # Chai Wah Wu, Jan 30 2025
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Dec 31 2016
EXTENSIONS
Corrected a(5), a(16) and more terms from Lars Blomberg, Jan 02 2017
STATUS
approved