OFFSET
1,1
COMMENTS
Consider the parity vectors of the Collatz iterations of n and n + 1. Consider the portions of the vectors before the Collatz iterations start to coincide. Then the condition to exclude n from the sequence is that these portions end in (0, 0, 1) and (1, 0, 0), in either order.
LINKS
Eric M. Schmidt, Table of n, a(n) for n = 1..10000
Marcus Elia and Amanda Tucker, Consecutive Integers and the Collatz Conjecture, INTEGERS, Electronic J. of Combinatorial Number Theory, Vol. 15, Paper A54, 2015. (But beware of errors.)
EXAMPLE
The Collatz iterations for 3067 and 3068 yield 1384 on the 27th iteration in both cases. For 3067, the three previous terms are (1844, 922, 461), with parities (0, 0, 1). For 3068, the three previous terms are (11072, 5536, 2768), with parities (0, 0, 0). Thus the condition fails to hold and 3067 is in the sequence.
PROG
(SageMath)
def collatz(n) : return 3*n+1 if n%2 else n//2
def isa(n) :
parityn = paritynp1 = [-1]*3
valn = n
valnp1 = n+1
while valn != valnp1 :
if valn==1 or valnp1==1 : return False
parityn = [parityn[1], parityn[2], valn%2]
paritynp1 = [paritynp1[1], paritynp1[2], valnp1%2]
valn = collatz(valn)
valnp1 = collatz(valnp1)
return [parityn, paritynp1] not in [ [[1, 0, 0], [0, 0, 1]], [[0, 0, 1], [1, 0, 0]] ]
CROSSREFS
KEYWORD
nonn
AUTHOR
Eric M. Schmidt, Jun 21 2016
STATUS
approved
