Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A046901
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
%I A046901
%S A046901 1,3,6,2,7,1,8,16,7,17,6,18,5,19,4,20,3,21,2,22,1,23,46,22,47,21,
%T A046901 48,20,49,19,50,18,51,17,52,16,53,15,54,14,55,13,56,12,57,11,58,
%U A046901 10,59,9,60,8,61,7,62,6,63,5,64,4,65,3,66,2,67,1,68,136,67,137
%N A046901 a(n) = a(n-1)-n if a(n-1)>n, else a(n) = a(n-1)+n.
%C A046901 Variation (1) on Recaman's sequence A005132.
%H A046901 N. J. A. Sloane, <a href="b046901.txt">First 10000 terms</a>
%H A046901 <a href="Sindx_Rea.html#Recaman">Index entries for sequences related 
               to Recaman's sequence</a>
%H A046901 Nick Hobson, <a href="a046901.py.txt">Python program for this sequence</
               a>
%F A046901 This is a concatenation S_0, S_1, S_2, ... where S_i = [b_0, b_1, ..., 
               b_{k-1}], k=5*3^i, with b_0 = 1, b_{2j} = k+j, b_{2j+1} = (k+1)/2-j. 
               E.g. S_0 = [1, 3, 6, 2, 7].
%F A046901 For any m>=1, for k such that 5*3^k+3>12m, a((5*3^k+3-12*m)/6)= m. For 
               example, for k>=1, a((5*3^k-9)/6) = 1. - Benoit Cloitre Oct 31, 2002
%p A046901 A046901 := proc(n) option remember; if n = 1 then 1 else if A046901(n-1)>
               n then A046901(n-1)-n else A046901(n-1)+n; fi; fi; end;
%o A046901 (PARI) a(n)=if(n<2,1,a(n-1)-if(sign(n-a(n-1))+1,-1,1)*n)
%Y A046901 Cf. A008344, A005132.
%Y A046901 Cf. A076039, A076040, A076041, A076042, A057198.
%Y A046901 Sequence in context: A068466 A118453 A021969 this_sequence A105332 A072007 
               A078783
%Y A046901 Adjacent sequences: A046898 A046899 A046900 this_sequence A046902 A046903 
               A046904
%K A046901 easy,nonn,nice
%O A046901 1,2
%A A046901 N. J. A. Sloane (njas(AT)research.att.com).

    
page 1

Search completed in 0.010 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 23 17:09 EST 2009. Contains 167438 sequences.


AT&T Labs Research