Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #30 Dec 19 2020 07:49:21
%S 1,1,2,3,3,3,5,4,6,5,6,8,8,6,9,8,8,11,11,10,10,14,12,11,16,15,12,17,
%T 14,17,16,18,14,19,19,16,21,22,19,21,25,18,22,25,23,24,25,25,23,31,28,
%U 22,33,28,29,32,28,29,30,30,33,35,29,33,32,28,41,36,35
%N a(n) = a(n-1-a(n-1)) + a(n-a(n-2)) for n>2; starting with a(1) = a(2) = 1.
%C {a(n)} is the Pinn F 1,0(n) sequence (see link section).
%H K. Pinn, <a href="https://arxiv.org/abs/cond-mat/9808031v1">A Chaotic Cousin Of Conway's Recursive Sequence</a>, arXiv:cond-mat/9808031 [cond-mat.stat-mech], 1998.
%e a(3)=2 because a(3) = a(3-1-a(3-1))+a(3-a(3-2)) = a(2-1)+a(3-1) = 1+1 = 2.
%t a[1] = a[2] = 1; a[n_] := a[n] = a[n - 1 - a[n - 1]] + a[n - a[n - 2]]; Table[ a[n], {n, 1, 40}]
%o (Python3)
%o a=[1,1]
%o for n in range(100):
%o i1=len(a)-1-a[len(a)-1]
%o i2=len(a)-a[len(a)-2]
%o if i1>=0 and i2>=0 :
%o a.append(a[i1]+a[i2])
%o else :
%o print("Sequence dies. Contains ", n+2, " terms.")
%o break
%o print(a)
%o (PARI) lista(nn) = {my(va = vector(nn)); va[1] = 1; va[2] = 1; for (n=3, nn, va[n]=va[n-1-va[n-1]]+va[n-va[n-2]];); va;} \\ _Michel Marcus_, Dec 07 2020
%Y Cf. A005185, A070867, A046699.
%K nonn
%O 1,3
%A _Pablo Hueso Merino_, Dec 02 2020