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.

A181666 Numbers whose odd part is of the form (4^k-1)/3.

This page as a plain text file.
%I A181666 #56 Sep 01 2024 09:37:23
%S A181666 1,2,4,5,8,10,16,20,21,32,40,42,64,80,84,85,128,160,168,170,256,320,
%T A181666 336,340,341,512,640,672,680,682,1024,1280,1344,1360,1364,1365,2048,
%U A181666 2560,2688,2720,2728,2730,4096,5120,5376,5440,5456,5460,5461,8192,10240
%N A181666 Numbers whose odd part is of the form (4^k-1)/3.
%C A181666 Also numbers that need at most one (3x+1) operation to reach 1 in the Collatz conjecture.
%C A181666 Also, terms of A023758 divisible by 3, divided by 3 (conjectured).
%H A181666 Amiram Eldar, <a href="/A181666/b181666.txt">Table of n, a(n) for n = 1..10000</a>
%H A181666 Andreas M. Hinz and Paul K. Stockmeyer, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL25/Hinz/hinz5.html">Precious Metal Sequences and Sierpinski-Type Graphs</a>, J. Integer Seq., Vol 25 (2022), Article 22.4.8.
%H A181666 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>.
%F A181666 a(n) = (4 * 2^A055086(n-1) - 2^A082375(n-1))/3. - _André Hallqvist_, Jul 17 2019
%F A181666 Sum_{n>=1} 1/a(n) = 2 * A321873 = 2.5265861162... . - _Amiram Eldar_, Jul 19 2022
%t A181666 Select[Range[2600], IntegerQ@ Log[4, 3 # + 1] &@ NestWhile[#/2 &, #, IntegerQ[#/2] &] &] (* _Michael De Vlieger_, May 12 2017 *)
%t A181666 seq[max_] := Module[{kmax = Floor[Log[4, 3*max+1]], s = {}, s1, odd},Do[odd = (4^k-1)/3; s1 = 2^Range[0, Floor[Log2[max/odd]]] * odd; s = Join[s, s1], {k, 1, kmax}]; Union[s]]; seq[10240] (* _Amiram Eldar_, Aug 31 2024 *)
%o A181666 (PARI) for(n=2, 2000, o=3*n/2^valuation(n,2)+1; b=ispower(o); if(b&&round(sqrtn(o,b\2))==4, print1(n, ", ")))
%o A181666 (Python)
%o A181666 for a in range(2, 17):
%o A181666     print()
%o A181666     for b in range(a - 2, -1, -2):
%o A181666         print(((1 << a) - (1 << b)) // 3, end=", ")
%o A181666 # _André Hallqvist_, Jul 25 2019
%o A181666 # This script shows the sequence as an irregular table whose main diagonal is A000975, called the "Lichtenberg sequence" by _Andreas M. Hinz_. - _Peter Luschny_, Jul 10 2022
%Y A181666 Cf. A000265, A023758, A055086, A082375, A000975, A321873.
%K A181666 nonn
%O A181666 1,2
%A A181666 _Ralf Stephan_, Nov 18 2010