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!)
A317686 a(1) = a(2) = 1; for n >= 3, a(n) = a(t(n)) + a(n-t(n)) where t = A063882. 9

%I #18 Mar 02 2022 06:15:01

%S 1,1,2,3,3,4,5,5,6,7,7,8,8,9,10,11,12,12,12,13,14,15,15,16,16,17,18,

%T 19,20,20,21,21,22,22,23,24,25,26,27,27,27,27,28,29,29,30,31,32,33,33,

%U 34,35,36,36,36,37,38,38,39,40,41,41,42,42,43,44,45,46,46,47,48,49,49,49,49,50,51

%N a(1) = a(2) = 1; for n >= 3, a(n) = a(t(n)) + a(n-t(n)) where t = A063882.

%C This sequence hits every positive integer and it has a fractal-like structure, see scatterplot of 2*n-3*a(n) in Links section.

%C Let b(1) = b(2) = b(3) = b(4) = 1; for n >= 5, b(n) = b(t(n)) + b(n-t(n)) where t = A063882. Observe the symmetric relation between this sequence (a(n)) and b(n) thanks to plots of a(n)-2*n/3 and b(n)-n/3 in Links section. Note that a(n) + b(n) = n for n >= 2.

%H Altug Alkan, <a href="/A317686/a317686_1.png">Scatterplot of 2*n-3*a(n) for n <= 36000</a>

%H Altug Alkan, <a href="/A317686/a317686.png">Scatterplots of a(n)-2*n/3 and b(n)-n/3 for n <= 36000</a>

%F a(n+1) - a(n) = 0 or 1 for all n >= 1.

%p b:= proc(n) option remember; `if`(n<5, 1,

%p b(n-b(n-1)) +b(n-b(n-4)))

%p end:

%p a:= proc(n) option remember; `if`(n<3, 1,

%p a(b(n)) +a(n-b(n)))

%p end:

%p seq(a(n), n=1..100); # _Alois P. Heinz_, Aug 05 2018

%t b[n_] := b[n] = If[n < 5, 1, b[n - b[n - 1]] + b[n - b[n - 4]]];

%t a[n_] := a[n] = If[n < 3, 1, a[b[n]] + a[n - b[n]]];

%t Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, Mar 02 2022, after _Alois P. Heinz_ *)

%o (PARI) t=vector(99); t[1]=t[2]=t[3]=t[4]=1; for(n=5, #t, t[n] = t[n-t[n-1]]+t[n-t[n-4]]); a=vector(99); a[1]=a[2]=1; for(n=3, #a, a[n] = a[t[n]]+a[n-t[n]]); a

%Y Cf. A063882, A317648.

%K nonn

%O 1,3

%A _Altug Alkan_, Aug 04 2018

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 April 25 09:49 EDT 2024. Contains 371967 sequences. (Running on oeis4.)