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 A282409 #17 May 10 2021 02:36:31 %S A282409 3,9,10,12,13,22,23,40,42,73,88,90,92,93,114,115,118,119,144,148,149, %T A282409 152,154,162,163,164,165,166,192,208,212,213,226,227,251,295,318,319, %U A282409 350,351,576,592,596,597,608,616,618,625,640,642,643,648,650,652,653 %N A282409 Numbers n for which the number of odd members and the number of even members in the Collatz (3x+1) trajectory are both prime. %C A282409 Or numbers m such that A078719(m) and A006666(m) are both prime. %C A282409 The distinct pairs of primes in the order of appearance are: (3, 5), (7, 13), (2, 5), (3, 7), (5, 11), (2, 7), (43, 73), (5, 13), (11, 23), (7, 17), (41, 71), (3, 11), (23, 43), (19, 37),... %H A282409 Charles R Greathouse IV, <a href="/A282409/b282409.txt">Table of n, a(n) for n = 1..10000</a> %H A282409 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a> %e A282409 13 is in the sequence because its Collatz trajectory is 13 -> 40 -> 20 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1 which contains 3 odd members and 7 even members. %p A282409 nn:=10^6: %p A282409 for n from 1 to 500 do: %p A282409 m:=n:i1:=1:i2:=0: %p A282409 for i from 1 to nn while(m<>1) do: %p A282409 if irem(m,2)=0 %p A282409 then %p A282409 m:=m/2:i2:=i2+1: %p A282409 else %p A282409 m:=3*m+1:i1:=i1+1: %p A282409 fi: %p A282409 od: %p A282409 if isprime(i1) and isprime(i2) %p A282409 then %p A282409 printf(`%d, `,n): %p A282409 else %p A282409 fi:od: %o A282409 (PARI) is(n)=my(e,o=1); while(n>1, n=if(n%2, o++; 3*n+1, e++; n/2)); isprime(e) && isprime(o) \\ _Charles R Greathouse IV_, Feb 14 2017 %o A282409 (Python) %o A282409 from sympy import isprime %o A282409 def a(n): %o A282409 l=[n] %o A282409 while True: %o A282409 if n%2==0: n//=2 %o A282409 else: n = 3*n + 1 %o A282409 l.append(n) %o A282409 if n<2: break %o A282409 o=list(filter(lambda i: i%2==1, l)) %o A282409 e=list(filter(lambda i: i%2==0, l)) %o A282409 return [o, e] %o A282409 print([n for n in range(2, 1001) if isprime(len(a(n)[0])) and isprime(len(a(n)[1]))]) # _Indranil Ghosh_, Apr 14 2017 %Y A282409 Cf. A078719, A006666, A006667. %K A282409 nonn %O A282409 1,1 %A A282409 _Michel Lagneau_, Feb 14 2017