login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 1
3, 9, 10, 12, 13, 22, 23, 40, 42, 73, 88, 90, 92, 93, 114, 115, 118, 119, 144, 148, 149, 152, 154, 162, 163, 164, 165, 166, 192, 208, 212, 213, 226, 227, 251, 295, 318, 319, 350, 351, 576, 592, 596, 597, 608, 616, 618, 625, 640, 642, 643, 648, 650, 652, 653 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Or numbers m such that A078719(m) and A006666(m) are both prime.
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),...
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
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.
MAPLE
nn:=10^6:
for n from 1 to 500 do:
m:=n:i1:=1:i2:=0:
for i from 1 to nn while(m<>1) do:
if irem(m, 2)=0
then
m:=m/2:i2:=i2+1:
else
m:=3*m+1:i1:=i1+1:
fi:
od:
if isprime(i1) and isprime(i2)
then
printf(`%d, `, n):
else
fi:od:
PROG
(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
(Python)
from sympy import isprime
def a(n):
l=[n]
while True:
if n%2==0: n//=2
else: n = 3*n + 1
l.append(n)
if n<2: break
o=list(filter(lambda i: i%2==1, l))
e=list(filter(lambda i: i%2==0, l))
return [o, e]
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
CROSSREFS
Sequence in context: A024574 A119203 A115403 * A059012 A352317 A055063
KEYWORD
nonn
AUTHOR
Michel Lagneau, Feb 14 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 1 12:27 EDT 2024. Contains 374817 sequences. (Running on oeis4.)