Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A087758
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A087758 Index of first occurrence of n in A005229. +0
2
1, 3, 4, 6, 7, 8, 10, 12, 13, 14, 16, 17, 19, 20, 21, 22, 24, 26, 27, 29, 31, 32, 33, 34, 36, 37, 39, 40, 41, 43, 46, 47, 48, 49, 50, 51, 53, 55, 56, 58, 59, 60, 61, 63, 64, 67, 69, 70, 71, 72, 73, 74, 75, 77, 80, 81, 82, 83, 85, 87, 88, 89, 90, 92, 94, 95, 98, 99, 100, 102 (list; graph; listen)
OFFSET

1,2

COMMENT

"Single term inverse function" of Mallows' sequence A005229.

FORMULA

a(n) = least k such that A005229(k) = n.

PROGRAM

(True Basic): 60 REM MALLOWS'S BATRACHION SEQUENCE 70 DIM q0(0 to 4000) 80 LET q0(1)=1 90 LET q0(2)=1 91 FOR n = 3 to 4000 92 LET q0(n)=q0(q0(n-2))+q0(n-q0(n-2)) 93 NEXT n 100 SET MODE "color" 110 SET WINDOW 0, 1024, 0, 750 301 PRINT" MALLOWS Inversion" 302 PRINT" by Roger L. Bagula 2 OCT. 2003" 303 DIM p(0 to 4000) 310 FOR x=1 to 4000 311 REM if p(q0(x)) hasn't been used already give p() a value 312 IF p(q0(x))=0 then LET p(q0(x))=x 380 NEXT x 381 OPEN #1: name "CM1:MI_data", create newold, org text 390 FOR x=1 to 200 391 PRINT #1: p(x); ", "; 392 PRINT p(x); 393 NEXT x 394 CLOSE #1 460 END

(PARI) {m=102; v5229=vector(m); v5229[1]=1; v5229[2]=1; for(k=3, m, v5229[k]=v5229[v5229[k-2]]+v5229[k-v5229[k-2]]); v=vector(m); for(j=1, m, if(v[v5229[j]]==0, v[v5229[j]]=j)); n=0; while(v[n++ ]>0, print1(v[n], ", "))}

CROSSREFS

Cf. A005229.

Sequence in context: A083922 A039042 A007378 this_sequence A105454 A127260 A089530

Adjacent sequences: A087755 A087756 A087757 this_sequence A087759 A087760 A087761

KEYWORD

nonn

AUTHOR

Roger L Bagula (rlbagulatftn(AT)yahoo.com), Oct 02 2003

EXTENSIONS

Edited by njas, Apr 7 2006

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 August 19 23:53 EDT 2008. Contains 142930 sequences.


AT&T Labs Research