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.
%I A277962 #8 Nov 11 2016 21:51:13 %S A277962 2,6,12,3,34,49,9,72,98,18,25,28,33,39,36,7,57,406,65,11,72,86,98,114, %T A277962 114,129,913,153,153,171,27,172,203,33,39,270,270,295,270,290,290,305, %U A277962 361,57,57,386,73,78,481,481,78,72,514,20174,609,641,641,641,641 %N A277962 Least k such that A006577(k) = A006577(n) + A006577(n+1). %C A277962 A006577(n) is the number of halving and tripling steps to reach 1 in the '3x+1' problem. %C A277962 The distinct squares in the sequence are 9, 25, 36, 49, 169, 361, ... %C A277962 The distinct primes in the sequence are 2, 3, 7, 11, 31, 41, 47, 71, 73, 97, 103, ... %H A277962 Michel Lagneau, <a href="/A277962/b277962.txt">Table of n, a(n) for n = 1..10000</a> %H A277962 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a> %e A277962 a(5)=34 because A006577(34) = 13 = A006577(5) + A006577(6) = 5 + 8. %p A277962 nn:=3*10^6:U:=array(1..nn):V:=array(1..nn): %p A277962 for i from 1 to nn do: %p A277962 m:=i:it0:=0: %p A277962 for j from 1 to nn while(m<>1) do: %p A277962 if irem(m, 2)=0 %p A277962 then %p A277962 m:=m/2:it0:=it0+1: %p A277962 else %p A277962 m:=3*m+1:it0:=it0+1: %p A277962 fi: %p A277962 od: %p A277962 U[i]:=it0: %p A277962 od: %p A277962 for n from 1 to 60 do: %p A277962 ii:=0: %p A277962 for k from 1 to nn while(ii=0) do: %p A277962 if U[k]=U[n]+ U[n+1] %p A277962 then %p A277962 ii:=1:printf(`%d, `, k): %p A277962 else %p A277962 fi: %p A277962 od: %p A277962 od: %t A277962 f:=Table[Length[NestWhileList[If[EvenQ[#],#/2,3#+1]&,n,#!=1&]]-1,{n,3*10^6}];Do[k=1;While[f[[k]]!=f[[m]]+f[[m+1]],k++];Print[m," ",k],{m,1,60}] %Y A277962 Cf. A006577. %K A277962 nonn %O A277962 1,1 %A A277962 _Michel Lagneau_, Nov 06 2016