login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A302779 Restricted growth sequence transform of ordered pair [Q(n-Q(n-1)), Q(n-Q(n-2))], the left & right summand of Hofstadter Q-sequence A005185. 2
1, 1, 2, 3, 3, 4, 5, 5, 6, 6, 6, 7, 8, 7, 9, 10, 9, 11, 11, 12, 12, 12, 12, 13, 14, 15, 13, 13, 13, 13, 16, 17, 18, 16, 19, 20, 21, 22, 19, 22, 23, 23, 24, 24, 24, 24, 24, 25, 26, 27, 28, 29, 30, 31, 28, 32, 25, 28, 25, 25, 25, 25, 33, 34, 35, 36, 37, 38, 39, 33, 40, 36, 41, 42, 43, 39, 44, 43, 45, 46, 47, 48, 48, 49, 50, 51, 52, 52, 49, 53, 53, 53, 53, 53, 53 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

Restricted growth sequence transform of A286559.

LINKS

Antti Karttunen, Table of n, a(n) for n = 1..65537

Index entries for Hofstadter-type sequences

PROG

(PARI)

up_to = 65537;

first_n_of_A005185(n) = { my(v=vector(n)); v[1]=v[2]=1; for(k=3, n, v[k]=v[k-v[k-1]]+v[k-v[k-2]]); (v); };

v005185 = first_n_of_A005185(up_to);

A005185(n) = v005185[n];

Aux302779(n) = if(n<3, 0, [A005185(n-A005185(n-1)), A005185(n-A005185(n-2))]);

rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om, invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om, invec[i], i); outvec[i] = u; u++ )); outvec; };

write_to_bfile(start_offset, vec, bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }

write_to_bfile(1, rgs_transform(vector(up_to, n, Aux302779(n))), "b302779.txt");

CROSSREFS

Cf. A005185, A286559, A302780.

Sequence in context: A187112 A094606 A080595 * A296020 A266350 A123579

Adjacent sequences:  A302776 A302777 A302778 * A302780 A302781 A302782

KEYWORD

nonn

AUTHOR

Antti Karttunen, Apr 27 2018

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 10 06:08 EDT 2022. Contains 356029 sequences. (Running on oeis4.)