%I #21 Jul 13 2020 21:24:32
%S 1,0,1,1,1,1,1,1,0,1,1,2,1,0,0,1,1,1,2,1,1,0,1,1,1,2,1,1,0,0,1,1,1,1,
%T 2,1,1,1,0,1,1,1,1,1,1,1,1,1,2,1,1,1,0,0,1,1,1,1,1,1,0,1,1,1,1,1,2,1,
%U 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
%N a(n) = f(n) - f(Sum_{k=1..n-1} a(k)) with a(1) = 1, where f = A000006.
%t f[n_] := IntegerPart[Sqrt[Prime[n]]]; a[1] = 1; a[n_] := a[n] = f[n] - f[Sum[a[k], {k, 1, n - 1}]]; Array[a, 100] (* _Amiram Eldar_, Jul 09 2020 *)
%o (PARI) a=vector(10^2); a[1] = 1; for(n=2, #a, a[n] = sqrtint(prime(n)) - sqrtint(prime(sum(k=1, n-1, a[k])))); a
%Y Cf. A000006, A335294.
%K nonn,easy
%O 1,12
%A _Altug Alkan_, Jul 09 2020
|