login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A097927
If a(n-1) is divisible by 2 then a(n) = a(n-1)/2. If a(n-1) is not divisible by 2 then a(n) = 47-(a(n-1)+1)/2; a(0)=1.
0
1, 46, 23, 35, 29, 32, 16, 8, 4, 2, 1, 46, 23, 35, 29, 32, 16, 8, 4, 2, 1, 46, 23, 35, 29, 32, 16, 8, 4, 2, 1, 46, 23, 35, 29, 32, 16, 8, 4, 2, 1, 46, 23, 35, 29, 32, 16, 8, 4, 2, 1, 46, 23, 35, 29, 32, 16, 8, 4, 2, 1, 46, 23, 35, 29, 32, 16, 8, 4, 2, 1, 46, 23, 35, 29, 32, 16, 8, 4, 2, 1, 46, 23
OFFSET
0,2
COMMENTS
The old entry with this sequence number was a duplicate of A097945.
Periodic, with period = 10. - Harvey P. Dale, Sep 30 2016
FORMULA
Periodic with period of length 10.
MAPLE
a:=proc(n) option remember; local k; k:=47;
if n=0 then RETURN(1); fi;
if a(n-1) mod 2 = 0 then RETURN(a(n-1)/2); fi;
RETURN(k-(a(n-1)+1)/2); end;
MATHEMATICA
NestList[If[EvenQ[#], #/2, 47-(#+1)/2]&, 1, 90] (* or *) PadRight[{}, 90, {1, 46, 23, 35, 29, 32, 16, 8, 4, 2}] (* Harvey P. Dale, Sep 30 2016 *)
CROSSREFS
Sequence in context: A051161 A260512 A033366 * A033978 A216840 A060958
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Sep 25 2008, based on email from Zak Seidov, May 12 2008
EXTENSIONS
Definition corrected by Harvey P. Dale, Sep 30 2016
STATUS
approved