OFFSET
1,1
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Edd Mann, Mystery Calculator.
FORMULA
From Robert Israel, Nov 14 2016: (Start)
a(n + 32) = a(n) + 64.
O.g.f.: (31 + (1 - x^33)/(1 - x))*x/((1 - x)*(1 - x^32)). (End)
EXAMPLE
a(1) = 32 = 100000 in binary.
MAPLE
a:= n-> n+31 + 32*iquo(n-1, 32):
seq(a(n), n=1..100); # Alois P. Heinz, Aug 22 2011
MATHEMATICA
Select[Range[256], BitAnd[#, 32] == 32 &] (* Alonso del Arte, Nov 14 2016 *)
PROG
(Python)
def A115421(n): return ((n-1<<1)&-31|32)+(n-1&31) # Chai Wah Wu, Mar 28 2024
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Jeremy Gardiner, Jan 22 2006
STATUS
approved