|
|
A051135
|
|
a(n) = number of times n appears in the Hofstadter-Conway $10000 sequence A004001.
|
|
15
|
|
|
2, 2, 1, 3, 1, 1, 2, 4, 1, 1, 1, 2, 1, 2, 3, 5, 1, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 6, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 7, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 2, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
If the initial 2 is changed to a 1, the resulting sequence (A265332) has the property that if all 1's are deleted, the remaining terms are the sequence incremented. - Franklin T. Adams-Watters, Oct 05 2006
a(k)=1 for k = 3, 5, 6, 9, 10, 11, 13, 17, 18, 19, 20, 22, 23, 25, 28, ..., ; (A088359)
a(k)=2 for k = 1, 2, 7, 12, 14, 21, 24, 26, 29, 38, 42, 45, 47, 51, 53, ..., ; (1 followed by A266109)
a(k)=3 for k = 4, 15, 27, 30, 48, 54, 57, 61, 86, 96, 102, 105, 112, ..., ; (A267103)
a(k)=4 for k = 8, 31, 58, 62, 106, 116, 120, 125, 192, 212, 222, 226, ..., ;
a(k)=5 for k = 16, 63, 121, 126, 227, 242, 247, 253, 419, 454, 469, ..., ;
a(k)=6 for k = 32, 127, 248, 254, 475, 496, 502, 509, 894, 950, 971, ..., ;
a(k)=7 for k = 64, 255, 503, 510, 978, 1006, 1013, 1021, 1872, 1956, ..., ;
a(k)=8 for k = 128, 511, 1014, 1022, 1992, 2028, 2036, 2045, 3864, ..., ;
a(k)=9 for k = 256, 1023, 2037, 2046, 4029, 4074, 4083, 4093, 7893, ..., ;
a(k)=10 for k = 512, 2047, 4084, 4094, 8113, 8168, 8178, 8189, ..., . (End)
|
|
LINKS
|
|
|
FORMULA
|
Other identities:
(End)
|
|
MAPLE
|
a[1]:=1: a[2]:=1: for n from 3 to 300 do a[n]:=a[a[n-1]]+a[n-a[n-1]] od: A:=[seq(a[n], n=1..300)]:for j from 1 to A[nops(A)-1] do c[j]:=0: for n from 1 to 300 do if A[n]=j then c[j]:=c[j]+1 else fi od: od: seq(c[j], j=1..A[nops(A)-1]); # Emeric Deutsch, Jun 06 2006
|
|
MATHEMATICA
|
a[1] = 1; a[2] = 1; a[n_] := a[n] = a[a[n - 1]] + a[n - a[n - 1]]; t = Array[a, 250]; Take[ Transpose[ Tally[t]][[2]], 105] (* Robert G. Wilson v, Jun 07 2011 *)
|
|
PROG
|
(Haskell)
import Data.List (group)
a051135 n = a051135_list !! (n-1)
a051135_list = map length $ group a004001_list
(Magma)
nmax:=200;
h:=[n le 2 select 1 else Self(Self(n-1)) + Self(n - Self(n-1)): n in [1..5*nmax]]; // h = A004001
for j in [1..3*nmax+1] do
if h[j] eq n then return j; end if;
end for;
end function;
(SageMath)
@CachedFunction
def h(n): return 1 if (n<3) else h(h(n-1)) + h(n - h(n-1)) # h=A004001
for j in range(1, 2*n+1):
if h(j)==n: return j
|
|
CROSSREFS
|
Cf. A265332 (essentially the same sequence, but with a(1) = 1 instead of 2).
|
|
KEYWORD
|
easy,nonn,nice
|
|
AUTHOR
|
Robert Lozyniak (11(AT)onna.com)
|
|
EXTENSIONS
|
Added links (in parentheses) to recently submitted related sequences - Antti Karttunen, Jan 18 2016
|
|
STATUS
|
approved
|
|
|
|