A137607 a(0)=361, a(n+1)=a(n)/2 if a(n) is even, else a(n+1)=a(0)-(a(n)+1)/2.
361, 180, 90, 45, 338, 169, 276, 138, 69, 326, 163, 279, 221, 250, 125, 298, 149, 286, 143, 289, 216, 108, 54, 27, 347, 187, 267, 227, 247, 237, 242, 121, 300, 150, 75, 323, 199, 261, 230, 115, 303, 209, 256, 128, 64, 32, 16, 8, 4, 2, 1, 360, 180, 90, 45, 338, 169, 276, 138, 69, 326, 163, 279, 221, 250, 125, 298, 149, 286, 143, 289, 216, 108, 54, 27, 347, 187, 267, 227, 247, 237, 242, 121, 300, 150, 75, 323, 199, 261, 230, 115, 303, 209, 256, 128, 64, 32, 16, 8, 4, 2, 1, 360
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1).
Crossrefs
Cf. A096259.
Programs
-
Mathematica
NestList[If[Mod[#,2]==0,#/2,361-(#+1)/2]&,361,110] (* Harvey P. Dale, Mar 31 2024 *)
-
PARI
A137607(n) = if( !n,361, for( i=0,n%51, n=if( i, if( n%2, 360-n\2, n\2), 360)); n) \\ M. F. Hasler, Apr 28 2008
Extensions
Clarified & extended by Vladeta Jovovic and M. F. Hasler, Apr 28 2008
The initial term, 361, seems anomalous. This sequence violates the rule that entries in the OEIS should not depend on an arbitrary but large parameter. - N. J. A. Sloane, May 17 2008
Comments