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.

Showing 1-3 of 3 results.

A347840 A surjective map of the positive numbers congruent to 5 modulo 8 (A004770) to the positive numbers congruent to 1, 3, or 7 modulo 8 (A047529).

Original entry on oeis.org

1, 3, 1, 7, 9, 11, 3, 15, 17, 19, 1, 23, 25, 27, 7, 31, 33, 35, 9, 39, 41, 43, 11, 47, 49, 51, 3, 55, 57, 59, 15, 63, 65, 67, 17, 71, 73, 75, 19, 79, 81, 83, 1, 87, 89, 91, 23, 95, 97, 99, 25, 103, 105, 107, 27, 111, 113, 115, 7, 119, 121
Offset: 1

Views

Author

Wolfdieter Lang, Oct 30 2021

Keywords

Comments

This map is obtained from the array A(k, m) given in A347834. There all positive numbers congruent to 5 modulo 8 (A004770) appear uniquely in the columns for m >= 1, and the m = 0 column gives all numbers congruent to {1, 3, 7} (mod 8) (A047529). The surjective map is f: A004770 -> A047529, with b(n) = A004770(n) -> f(b(n)) = a(n).
See also the array A178415 which has permuted rows.
This maps all entries of each row k of the array A(k, m), given in A347834, with columns m >= 1 to the entry A(k, 0) = A047529(k), for k >= 1. The numbers b(n) appear once in the array A for columns m >= 1. Column A(k, 1) = A347836(k) gives the numbers congruent to {5, 32, 29} (mod 32), and each entry for columns m >= 2 is congruent to 21 (mod 32).
The surjective map of the numbers b(n) = 5 + 8*(n-1) = A004770(n), for n >= 1, to A047529 with element a(n), is computed by switching to the companion array A347839 of A347834, with the simple recurrence, removing all factors of 4, and then going back to array A347834. See the formula below. Thanks to Antti Karttunen for motivating me to simplify the prescription, and to add in A347834 the hint for the induction proof that all 5 (mod 8) numbers appear once in the columns n >= 1.
This map f is of interest in the context of the Collatz 3*n+1 conjecture. The (modified) rooted tree with only odd labeled nodes has for each row k of the array A(k, m) (A347834) the same precursor (or (modified) Collatz map given in A075677(n+1), for 2*n+1). Therefore, all nodes with labels b(n) == 5 (mod 8) can be represented by a(n). This leads to a further restricted Collatz tree with only node labels congruent to {1, 3, 7} (mod 8) (A047529).
An even further restricted Collatz tree has only node labels congruent to 1 (mod 8) (A017077), as any positive integer can be written as m*2^(v+1)+2^v-1 or (m,v) where v is the number of trailing 1-bits in binary, and for v > 1 the next odd Collatz successor of (m,v) is (3*m+1,v-1). - Ruud H.G. van Tol, Sep 13 2023

Examples

			The sequence a(n) begins: (b(n) = A004770(n))
-------------------------------------------------------------------------
n:     1  2  3  4  5  6  7  8  9 10 11 12  13  14  15  16  17  18  19  20
b(n):  5 13 21 29 37 45 53 61 69 77 85 93 101 109 117 125 133 141 149 157
a(n):  1  3  1  7  9 11  3 15 17 19  1 23  25  27   7  31  35  35   9  39
-------------------------------------------------------------------------
n:     21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37 ...
b(n): 165 173 181 189 197 205 213 221 229 237 245 253 261 269 277 285 293 ...
a(n):  41  43  11  47  49  51   3  55  57  59  15  63  65  67  17  71  73 ...
-----------------------------------------------------------------------------
n = 6, b(6) = 45 = 13 + 32*1, case a), a(6) = 3 + 8*1 = 11.
n = 7, b(7) = 53 = 21 + 32*1, case b)1), first instance, L(7) = 0, a(7) = 3 + 8*0 = 3.
n = 31, b(31) = 245 = 117 + 128*1, case b)1), second instance, L(31) = 1, a(31) = 7 + 8*1 = 15.
n = 11, b(11) = 85 = 21 + 64*1, A065883(1 + 3*1) = 1, c(11) = 1, case b)2)i), a(11) = 85 = A347834(1, 3).
n = 19, b(19) = 149 = 21 + 64*2, A065883(1 + 3*2) = 7, c(19) = (7 - 1)/3 = 2, case b)2)ii), a(n) = 4*2 + 1 = 9.
		

Crossrefs

Programs

  • Mathematica
    A347840[n_] := NestWhile[Quotient[#, 4] &, 2*n - 1, Mod[#, 8] == 5 &];
    Array[A347840, 100] (* Paolo Xausa, Jun 25 2025 *)
  • PARI
    a(n) = n=2*n-1; while(5==n%8, n>>=2); n; \\ Ruud H.G. van Tol, Sep 13 2023
    
  • PARI
    a(n) = (2*n-1)>>(valuation(3*n-1,2)\2*2); \\ Ruud H.G. van Tol, Sep 20 2023

Formula

a(n) = (2*A065883((3*b(n)+1)/2) - 1)/3, with b(n) = A004770(n), for n >= 1.
a(n) = A385109(8*(n-1)+5). - Ralf Stephan, Jun 18 2025

A350053 a(n) = (2^(3*n + 3 + (-1)^n) - (6 + (-1)^n))/9, for n >= 1.

Original entry on oeis.org

3, 113, 227, 7281, 14563, 466033, 932067, 29826161, 59652323, 1908874353, 3817748707, 122167958641, 244335917283, 7818749353073, 15637498706147, 500399958596721, 1000799917193443, 32025597350190193, 64051194700380387
Offset: 1

Views

Author

Wolfdieter Lang, Jan 20 2022

Keywords

Comments

Labels of nodes at level L = 1 of the Collatz tree with only odd numbers congruent to 1, 3, and 7 modulo 8, named here CToddr.
a(n) is given by the successor of the non-leaf node labels of the (reduced) Collatz tree with odd numbers (named here CTodd) at level 1 given by A198586(n), for n >= 1. See a comment in A347834 for the construction of CTodd. (For all labels of CTodd at level 1 see {A002450(k)}_{k>=2}.) The present sequence gives the labels of the (further) reduced rooted tree CToddr, at level L = 1. Level L = 0 has the root labeled 1, and this node has a directed 1-cycle.
The successor of a node label u of the tree CTodd is given by (4*u - 1)/3 if u == 1 (mod 6), (2*u - 1)/3 if u == 5 (mod 6), and there is no successor if the label u == 3 (mod 6) (a leaf).
This sequence is motivated by a draft of Immo O. Kerner (see A347834 and the link).
Sorted set of all A385109(A198584(i)), i>0 (conjectured but easy to see). - Ralf Stephan, Jun 18 2025

Crossrefs

Programs

  • Mathematica
    a[n_] := (2^(3*n + 3 + (-1)^n) - (6 + (-1)^n))/9; Array[a, 20] (* Amiram Eldar, Jan 21 2022 *) (* or *)
    LinearRecurrence[{0, 65, 0, -64}, {3, 113, 227, 7281}, 20] (* Georg Fischer, Sep 30 2022 *)
  • PARI
    a(n) = (2^(3*n + 3 + (-1)^n))\9 \\ Winston de Greef, Jan 28 2024

Formula

Bisection: a(2*k-1) = (2^(6*k-1) - 5)/9 = A228871(k), a(2*k) = (4^(3*k+2) - 7)/9 = A350054(k), for k >= 1.
a(n) = (2^(3*n+ 2 + b(n)) - (5 + b(n)))/9, with b(n) = 1 + (-1)^n = A010673(n-1), for n >= 1. See the name.
G.f.: Bisection: x*(3 + 32*x)/((1 - x)*(1 - 64*x)) and x*(113 - 64*x)/((1 - x)*(1 - 64*x)).
G.f.: x*(3 + 113*x + 32*x^2 - 64*x^3)/((1 - x^2)*(1 - 64*x^2)).

A385110 Terms of A198587 congruent {1, 3, 7} (mod 8).

Original entry on oeis.org

17, 35, 75, 151, 1137, 2275, 2417, 4835, 4849, 9699, 19417, 38833, 38835, 72817, 77667, 145635, 154737, 309475, 310385, 620771, 621377, 1242737, 1242755, 2485361, 2485475, 4660337, 4970723, 4971025, 9320675, 9903217, 9942051, 19806435, 19864689, 19884107, 39729379
Offset: 1

Views

Author

Ralf Stephan, Jun 18 2025

Keywords

Comments

Sorted set of all A385109(A198587(i)), i>0.

Crossrefs

Programs

  • PARI
    N=3;for(n=1, 1000000, s=n; t=0; while(s!=1, if(s%2==0, s=s/2, s=(3*s+1)/2; t++); if(s==1&&t==N&&(n%8==1||n%8==3||n%8==7), print1(n,", ") ); ))

Extensions

a(22)-a(31) from Michel Marcus, Jun 19 2025
a(32)-a(35) added using A198587 by Jinyuan Wang, Jun 26 2025
Showing 1-3 of 3 results.