cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A316942 a(n) = n - a(pi(n)) - a(n-pi(n)) with a(1) = a(2) = 1, where pi = A000720.

This page as a plain text file.
%I A316942 #12 Jul 20 2018 11:02:18
%S A316942 1,1,1,2,3,4,4,4,4,4,4,5,5,6,7,8,9,10,11,11,12,12,13,13,13,13,13,13,
%T A316942 14,15,16,16,17,17,18,19,19,20,21,22,23,23,23,23,23,24,24,24,25,25,25,
%U A316942 26,26,26,26,26,26,27,27,28,28,29,30,30,31,32,32,32,33,34,35,35,35,36,37
%N A316942 a(n) = n - a(pi(n)) - a(n-pi(n)) with a(1) = a(2) = 1, where pi = A000720.
%C A316942 This sequence hits every positive integer.
%F A316942 a(n) = n - a(A000720(n)) - a(A062298(n)) with a(1) = a(2) = 1.
%F A316942 a(n+1) - a(n) = 0 or 1 for all n >= 1.
%F A316942 Conjecture : lim_{n->infinity} a(n)/n = 1/2.
%t A316942 Nest[Append[#2, #1 - #2[[PrimePi[#1] ]] - #2[[#1 - PrimePi[#1] ]] ] & @@ {Length@ # + 1, #} &, {1, 1}, 73] (* _Michael De Vlieger_, Jul 20 2018 *)
%o A316942 (PARI) q=vector(75); for(n=1, 2, q[n] = 1); for(n=3, #q, q[n] = n - q[primepi(n)] - q[n-primepi(n)]); q
%Y A316942 Cf. A000720, A062298, A316434.
%K A316942 nonn
%O A316942 1,4
%A A316942 _Altug Alkan_, Jul 17 2018