A275584 Primes p such that S_e(p-1)/S_o(p-1) is an integer, where S_e(x) is the sum of the even numbers and S_o(x) is the sum of the odd numbers in the Collatz iteration of x.
2, 3, 5, 17, 257, 59393, 65537, 331777, 534529, 1299457
Offset: 1
Examples
Prime 59393 is a term because S_e/o(59392) = A213909(59392)/A213916(59392) = 119092/76 = 1567.
Links
- Eric Weisstein's World of Mathematics, Collatz Problem
- Wikipedia, Collatz conjecture
Programs
-
Magma
[n+1: n in [A274796(m)] | IsPrime(n+1)]
-
Magma
e:= [&+[not IsOdd(h) select h else 0: h in [k eq 1 select n else IsOdd(Self(k-1)) and not IsOne(Self(k-1)) select 3*Self(k-1)+1 else Self(k-1) div 2: k in [1..5*n]]]: n in [1..1000]]; o:= [&+[IsOdd(h) select h else 0: h in [k eq 1 select n else IsOdd(Self(k-1)) and not IsOne(Self(k-1)) select 3*Self(k-1)+1 else Self(k-1) div 2: k in [1..5*n]]]: n in [1..1000]]; [n+1: n in [1..1000] | IsPrime(n+1) and e[n] mod o[n] eq 0]
-
Mathematica
Select[Prime@ Range[10^5], IntegerQ[Divide @@ Map[Total, TakeDrop[#, LengthWhile[#, EvenQ]]]] &@ SortBy[#, OddQ] &@ NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, # - 1, # > 1 &] &] (* Michael De Vlieger, Oct 15 2018 *)
Extensions
More terms from Michael De Vlieger, Oct 15 2018.
Comments