%I #5 Jun 15 2016 14:22:36
%S 2,2,2,3,2,3,4,5,6,2,2,2,3,2,3,3,4,5,2,6,2,7,2,8,2,2,2,3,3,2,2,4,5,2,
%T 5,2,2,2,3,2,3,2,4,2,5,2,2,2,3,3,2,4,4,3,2,3,4,3,5,4,2,5,2,2,2,3,2,3,
%U 2,4,2,3,2,4,3,4,2,2,4,4,2,5,2,2,6,2,2
%N Length of chain starting 2n, iterating f(m) = m - (number of distinct representations of m as the sum of two primes).
%C We start at n=2 as the Goldbach Conjecture is for even integers starting from 4. There is no upper bound for a(n).
%F a(n) = number of steps k, including start A005843(n) = 2n and end (f^k(n) is odd), where f(2n) = 2n - A045917(n) = 2n - (number of ways of writing 2n as a sum of 2 primes when order does not matter).
%e a(2) = 2 because we have two integers in the chain starting 2*2 = 4, since there is 1 unique way to partition 4 into two primes (4=2+2), so f(4) = 4-1 = 3, which is a halting state, f(3)=3, since 3 is odd and not the sum of two primes. The chain is (4,3).
%e a(3) = 2, the chain being (6,5) since 6 is uniquely 3+3.
%e a(5) = 3 because 2*5 = 10 = 3+7 = 5+5 (two ways), 10-2 = 8, then 8 is uniquely 3+5 so the chain is (10,f(10),f(f(10))) = (10,8,7) which is of length 3.
%e a(10) = 6, the chain being (20,18,16,14,12,11).
%e a(23) = 7, the chain being (46,42,38,36,32,30,27).
%Y Cf. A000040, A005843, A045917.
%K easy,nonn
%O 2,1
%A _Jonathan Vos Post_, Apr 03 2006
%E More terms from _Giovanni Resta_, Jun 15 2016
|