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.

Previous Showing 11-14 of 14 results.

A261702 a(1) = 1; for n>1, a(n) is the smallest positive integer not already present which is entailed by the rules (i) k present => 2k present; (ii) 3k+1 present and k odd => k present.

Original entry on oeis.org

1, 2, 4, 8, 16, 5, 10, 3, 6, 12, 20, 24, 32, 40, 13, 26, 48, 52, 17, 34, 11, 22, 7, 14, 28, 9, 18, 36, 44, 56, 64, 21, 42, 68, 72, 80, 84, 88, 29, 58, 19, 38, 76, 25, 50, 96, 100, 33, 66, 104, 112, 37, 74, 116, 128, 132, 136, 45, 90, 144, 148, 49, 98, 152
Offset: 1

Views

Author

Paul Tek, Aug 28 2015

Keywords

Comments

If the Collatz 3n+1 conjecture is true, then this is a permutation of all positive integers. See A261715 for putative inverse.

Crossrefs

Cf. A088975, A033491, A109732, A261690, A261715 (putative inverse).

Programs

  • Maple
    a:= proc() local a, b, s; b, s:= proc() true end,
          heap[new]((x, y)-> is(x>y), 1); a:=
          proc(n) option remember; local k, t;
            if n>1 then a(n-1) fi;
            t:= heap[extract](s); b(t):= false;
            k:= 2*t; if b(k) then heap[insert](k, s) fi;
            if irem(t-1, 3, 'k')=0 and (k::odd) and
              b(k) then heap[insert](k, s) fi; t
          end
        end():
    seq(a(n), n=1..80);  # Alois P. Heinz, Aug 29 2015
  • Perl
    See Links section.
    (C++) See Links section.

A171490 Numbers for which the smallest number of steps to reach 1 in "3x+1" (or Collatz) problem is a prime.

Original entry on oeis.org

1, 5, 7, 12, 14, 16, 29, 51, 56, 58, 60, 64, 65, 67, 74, 75, 78, 83, 87, 90, 100, 102, 104, 106, 109, 115, 118, 119, 122, 128, 130, 132, 134, 141, 142, 147, 161, 166, 173, 176, 187, 188, 200, 212, 219, 221, 231, 234, 239, 241, 251, 259, 264, 293, 313, 314, 316
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Dec 10 2009

Keywords

Comments

Positions of primes in A033491. [R. J. Mathar, Nov 01 2010]

Examples

			1st Collatz sequence with a(1)=1 step starts with 2=prime(1): 2-1;
1st Collatz sequence with a(3)=7 steps starts with 3=prime(2): 3-10-5-16-8-4-2-1;
prime(6)=13 has Collatz sequence with 9 steps: 13-40-20-10-5-16-8-4-2-1, so has the smaller composite 12 < 13: 12-6-3-10-5-16-8-4-2-1 => 9 not a term of sequence;
1st Collatz sequence with a(5)=14 steps starts with 11=prime(5): 11-34-17-52-26-13-40-20-10-5-16-8-4-2-1.
		

References

  • R. K. Guy, "Collatz's Sequence" in Unsolved Problems in Number Theory, 2nd ed. New York: Springer-Verlag, pp. 215-218, 1994
  • Clifford A. Pickover, Wonders of Numbers, Oxford University Press, pp. 116-118, 2001

Crossrefs

Extensions

Terms > 187 from R. J. Mathar, Nov 01 2010
Name edited by Michel Marcus, Jul 07 2018

A171619 Primes in A171490.

Original entry on oeis.org

5, 7, 29, 67, 83, 109, 173, 239, 241, 251, 293, 313, 337, 367, 571, 613, 769, 821, 877, 941, 947, 1031, 1069, 1103, 1511, 1693, 1759, 1901, 2011
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Dec 13 2009

Keywords

Comments

Terms of sequence are primes in growing order where smallest number of steps m to reach 1 in "3x+1" (or Collatz) problem is a prime too.

Examples

			(1) 1st Collatz sequence with 5=prime(3) steps starts with 5=prime(3): 5-16-8-4-2-1, gives a(1)=5.
(2) 1st Collatz sequence with 7=prime(4) steps starts with 3=prime(2): 3-10-5-16-8-4-2-1, gives a(2)=7.
(3) 1st Collatz sequence with 29=prime(10) steps starts with 43=prime(14): 43-130-65-196-98-49-148-74-37-112-56-28-14-7-22-11-34-17-52-26-13-40-20-10-5-16-8-4-2-1, gives a(3)=29.
(4) List of prime steps m for above a(n): 5, 3, 43, 167, 233, 41, 937, 14831, 9887, 7963, 73063, 45127, 78791, 225023, 6956969, 10998599, 126357223, 859130059, 2845683047, 322623647, 95592191, 8363817307, 28677246203, 38590505339, 35521451596571, 478672174364191, 1168778549494463, 6376392739978081, 103147916159472367.
		

References

  • R. K. Guy, "Collatz's Sequence" in Unsolved Problems in Number Theory, 2nd ed. New York: Springer-Verlag, pp. 215-218, 1994.
  • Clifford A. Pickover, Wonders of Numbers, Oxford University Press, pp. 116-118, 2001.
  • Guenther J. Wirsching, The Dynamical System Generated by the 3n+1 Function, Springer-Verlag, Berlin, 1998.

Crossrefs

Extensions

Missing term a(7)=173 inserted by Georg Fischer, Oct 26 2022
a(23)-a(29) (using Eric Roosendaal's data) by Tyler Busby, Feb 11 2023

A174539 Starting numbers n such that the number of halving and tripling steps to reach 1 under the Collatz 3x+1 map is a perfect square.

Original entry on oeis.org

1, 2, 7, 12, 13, 16, 44, 45, 46, 80, 84, 85, 98, 99, 100, 101, 102, 107, 129, 153, 156, 157, 158, 169, 272, 276, 277, 280, 282, 300, 301, 302, 350, 351, 512, 576, 592, 596, 597, 608, 616, 618, 625, 642, 643, 644, 645, 646, 648, 649, 650, 651, 652, 653, 654, 655, 662, 663
Offset: 1

Views

Author

Michel Lagneau, Mar 21 2010

Keywords

Comments

Numbers n such that A006577(n) is a perfect square.

Examples

			44, 45 and 46 are in the sequence because the number of steps as counted in A006577 for each of them is 16 = 4^2, a perfect square.
		

Crossrefs

Programs

  • Maple
    with(numtheory):for x from 1 to 200 do traj:=0: n1:=x: x1:=x: for p from 1 to 20 while(irem(x1,2)=0)do p1:=2^p: xx1:=x1: x1:=floor(n1/p1): traj:=traj+1:od:
    n:=x1: for q from 1 to 100 while(n<>1)do n1:=3*n+1: traj:=traj+1: x0:=irem(n1,2): for p from 1 to 20 while(x0=0)do p1:=2^p: xx1:=x1: x1:=floor(n1/p1): x0:=n1-p1*x1: traj:=traj+1: od: traj:=traj-1: n:=xx1:od:
    if(sqrt(traj))=floor(sqrt(traj)) then print(x):else fi:od:
  • Mathematica
    htsQ[n_]:=With[{len=Length[NestWhileList[If[EvenQ[#],#/2,3#+1]&,n,#!=1&]]-1},IntegerQ[Sqrt[len]]]; Select[Range[700],htsQ] (* Harvey P. Dale, Jan 01 2023 *)

Formula

{n: A006577(n) in A000290}.

Extensions

Unspecific references removed - R. J. Mathar, Mar 31 2010
Corrected and extended by Harvey P. Dale, Jan 01 2023
Previous Showing 11-14 of 14 results.