cp's OEIS Frontend

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.

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.

This page as a plain text file.
%I A275584 #23 Feb 16 2025 08:33:36
%S A275584 2,3,5,17,257,59393,65537,331777,534529,1299457
%N 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.
%C A275584 Primes p such that A213909(p-1)/A213916(p-1) is an integer.
%C A275584 Primes of the form A274796 + 1.
%C A275584 Fermat primes (A019434) are terms. Also supersequence of A092506 (primes of the form 2^n+1).
%C A275584 Corresponding values of S_e/o(a(n)-1): 0, 2, 6, 30, 510, 1567, 131070, ...
%H A275584 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/CollatzProblem.html">Collatz Problem</a>
%H A275584 Wikipedia, <a href="http://en.wikipedia.org/wiki/Collatz_conjecture">Collatz conjecture</a>
%F A275584 S_e/o(A092506(n)-1) = A033493(A092506(n))-1.
%e A275584 Prime 59393 is a term because S_e/o(59392) = A213909(59392)/A213916(59392) = 119092/76 = 1567.
%t A275584 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 *)
%o A275584 (Magma) [n+1: n in [A274796(m)] | IsPrime(n+1)]
%o A275584 (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]
%Y A275584 Cf. A033493, A213909, A213916, A274796.
%K A275584 nonn,more
%O A275584 1,1
%A A275584 _Jaroslav Krizek_, Aug 04 2016
%E A275584 More terms from _Michael De Vlieger_, Oct 15 2018.