Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A126712
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A126712 Height of steps in the Recaman sequence A064389. +0
2
0, 1, 1, 4, 4, 2, 2, 3, 3, 3, 3, 3, 3, 7, 5, 7, 7, 4, 4, 4, 4, 4, 4, 4, 4, 7, 5, 5, 5, 11, 11, 11, 11, 11, 11, 5, 11, 5, 5, 5, 5, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 11, 11, 11, 6, 6, 11, 9, 9, 6, 6, 11, 8, 8, 8, 6, 8, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 (list; graph; listen)
OFFSET

1,4

EXAMPLE

The heights to reach 1, 3, 6, 2, 7, 13, 20, 12, 21, 11, 22, 10 in A064389 are

b(1,2,3,...)= 0, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 5 etc., as

defined by b(n)=b(n-1)+sign[A064389(n)-A064389(n-1)].

Reshuffling sequence b while sorting A064489 into A078758 produces sequence a

here, a(n)=b[A078758(n)].

MAPLE

A064389 := proc(nmax) local a, n, adiff, newa ; a := [1] ; for n from 2 to nmax do adiff := n ; while true do newa := op(-1, a)-adiff ; if newa >0 and not newa in a then a := [op(a), newa] ; break ; fi ; newa := op(-1, a)+adiff ; if newa >0 and not newa in a then a := [op(a), newa] ; break ; fi ; adiff := adiff+1 ; od ; od ; RETURN(a) ; end: A064389b := proc(a) local n, hei ; hei := [0] ; for n from 2 to nops(a) do hei := [op(hei), op(-1, hei)+sign(op(n, a)-op(n-1, a))] ; od ; RETURN(hei) ; end: inList := proc(list, n) local i ; for i from 1 to nops(list) do if op(i, list) = n then RETURN(i) ; fi ; od ; RETURN(-1) ; end: A078758 := proc(a064389) local a, n, i ; a := [] ; n :=1 ; while true do i := inList(a064389, n) ; if i < 0 then RETURN(a) ; else a := [op(a), i] ; n := n+1 ; fi ; od ; end: nmax := 1800 : a064389 := A064389(nmax) : a078758 := A078758(a064389) : b := A064389b(a064389) : for n from 1 to nops(a078758) do printf("%d, ", op(op(n, a078758), b)) ; od;

CROSSREFS

Cf. A064389, A078758.

Sequence in context: A058888 A120438 A038800 this_sequence A029676 A105190 A002581

Adjacent sequences: A126709 A126710 A126711 this_sequence A126713 A126714 A126715

KEYWORD

easy,nonn

AUTHOR

R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Feb 12 2007

page 1

Search completed in 0.002 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 July 25 07:41 EDT 2008. Contains 142293 sequences.


AT&T Labs Research