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-6 of 6 results.

A347834 An array A of the positive odd numbers, read by antidiagonals upwards, giving the present triangle T.

Original entry on oeis.org

1, 3, 5, 7, 13, 21, 9, 29, 53, 85, 11, 37, 117, 213, 341, 15, 45, 149, 469, 853, 1365, 17, 61, 181, 597, 1877, 3413, 5461, 19, 69, 245, 725, 2389, 7509, 13653, 21845, 23, 77, 277, 981, 2901, 9557, 30037, 54613, 87381, 25, 93, 309, 1109, 3925, 11605, 38229, 120149, 218453, 349525
Offset: 1

Views

Author

Wolfdieter Lang, Sep 20 2021

Keywords

Comments

For the definition of this array A see the formula section.
The rows of A appear in a draft by Immmo O. Kerner in eqs. (1) and (2) as so-called horizontal sequences (horizontale Folgen). Thanks to Dr. A. Eckert for sending me this paper.
This array with entry A(k, n) becomes equal to the array T with T(n, k) given in A178415 by using a permutation of the rows, and changing the offset: A(k, n) = T(pe(k), n+1), with pe(3*(L+1)) = 4*(L+1), pe(1+3*L) = 1 + 2*L, pe(2+3*L) = 2*(1 + 2*L), for L >= 0. This permutation appears in A265667.
A proper sub-array is A238475(n, k) = A(1 + 3*(k-1), n-1), for k >= 1 and n >= 1.
In the directed Collatz tree with nodes labeled with only positive odd numbers (see A256598 for the paths), here called CTodd, the level L = 0 (on the top) has the node with label 1 as root. Because 1 -> 1 there is an arrow (a 1-cycle or loop) at the root. The level L = 1 consists of the nodes with labels A(1, n), for n >= 1, and each node is connected to 1 by a downwards directed arrow. The next levels for L >= 2 are obtained using the successor rule (used also by Kerner): S(u) = (4*u - 1)/3 if u == 1 (mod 3), (2*u - 1)/3 if u == 5 (mod 3), and there is no successor S(u) = empty if u = 3 (mod 6), that is, this node is a leaf.
However, each node with label u on level L >= 1, except a leaf, has as successors at level L + 1 not only the node with S(u) but all the nodes with labels A(S(u), n), for n >= 0.
In this way each node (also the root) of this CTodd has in-degree 1 and infinite out-degree (for L >= 2 there are infinitely many infinite outgoing arrows). All nodes with label A(k, n) with n >= 1, have the same precursor as the node A(k,0) in this tree for each k >= 1.
Except for the loop (1-cycle) for the root 1 there are no cycles in this directed tree CTodd.
That each number N = 5 + 8*K, for K >= 0 appears in array A for some column n >= 1 uniquely can be proved, using the fact of strictly increasing rows and columns, by showing that the columns n = 1, 2, ..., c contain all positive integers congruent to 5 modulo 8 except those of the positive congruence class A(1, c+1) modulo 2^(2*c+3) by induction on c. [added Dec 05 2021]
Row index k for numbers congruent to 5 modulo 8: Each number N = 5 + 8*K, for K >= 0, from A004770 is a member of row k of the array A starting with element A(k, 0) = (2*A065883(2 + 3*N) - 1)/3. For this surjective map see A347840. [simplified Dec 05 2021]
The Collatz conjecture can be reduced to the conjecture that in this rooted and directed tree CTodd each positive odd number appears as a label once, that is, all entries of the array A appear.

Examples

			The array A(k, n) begins:
k\n  0   1   2    3    4     5      6      7       8       9       10 ...
-------------------------------------------------------------------------
1:   1   5  21   85  341  1365   5461  21845   87381  349525  1398101
2:   3  13  53  213  853  3413  13653  54613  218453  873813  3495253
3:   7  29 117  469 1877  7509  30037 120149  480597 1922389  7689557
4:   9  37 149  597 2389  9557  38229 152917  611669 2446677  9786709
5:  11  45 181  725 2901 11605  46421 185685  742741 2970965 11883861
6:  15  61 245  981 3925 15701  62805 251221 1004885 4019541 16078165
7:  17  69 277 1109 4437 17749  70997 283989 1135957 4543829 18175317
8:  19  77 309 1237 4949 19797  79189 316757 1267029 5068117 20272469
9:  23  93 373 1493 5973 23893  95573 382293 1529173 6116693 24466773
10: 25 101 405 1621 6485 25941 103765 415061 1660245 6640981 26563925
...
--------------------------------------------------------------------
The triangle T(k, n) begins:
k\n  0  1   2    3    4     5     6      7      8      9 ...
------------------------------------------------------------
1:   1
2:   3  5
3:   7 13  21
4:   9 29  53   85
5:  11 37 117  213  341
6:  15 45 149  469 853   1365
7:  17 61 181  597 1877  3413  5461
8:  19 69 245  725 2389  7509 13653  21845
9:  23 77 277  981 2901  9557 30037  54613  87381
10: 25 93 309 1109 3925 11605 38229 120149 218453 349525
...
-------------------------------------------------------------
Row index k of array A, for entries 5 (mod 8).
213 = 5 + 8*26. K = 28 is even, (3*231+1)/16 = 40, A065883(40) = 10, hence A(k, 0) = N' = (10-1)/3 = 3, and k = 2. Moreover, n = log_4((3*213 + 1)/(3*A(2,0) + 1)) = log_4(64) = 3. 213 = A(2, 3).
85 = 5 + 8*10. K = 10 is even, (3*85 + 1)/16 = 16, A065883(16) = 1, N' = (1-1)/3 = 0 is even, hence A(k, 0) = 4*0 + 1 = 1, k = 1. 85 = A(1, 3).
61 = 5 + 8*7, K = 7 is odd, k = (7+1)/2 + ceiling((7+1)/4) = 6, and n = log_4((3*61 + 1)/(3*A(6,0) + 1)) = 1. 61 = A(6, 1).
----------------------------------------------------------------------------
		

Crossrefs

Row sequences of the array A, also diagonal sequences of the triangle T: -A007583 (k=0), A002450(n+1), A072197, A072261(n+1), A206374(n+1), A072262(n+1), A072262(n+1), A072201(n+1), A330246(n+1), ...
Column sequences of the array A, also of the triangle T (shifted): A047529, A347836, A347837, ...

Programs

  • Maple
    # Seen as an array:
    A := (n, k) -> ((3*(n + floor(n/3)) - 1)*4^(k+1) - 2)/6:
    for n from 1 to 6 do seq(A(n, k), k = 0..9) od;
    # Seen as a triangle:
    T := (n, k) -> 2^(2*k + 1)*(floor((n - k)/3) - k + n - 1/3) - 1/3:
    for n from 1 to 9 do seq(T(n, k), k = 0..n-1) od;
    # Using row expansion:
    gf_row := k -> (1 / (x - 1) - A047395(k)) / (4*x - 1):
    for k from 1 to 10 do seq(coeff(series(gf_row(k), x, 11), x, n), n = 0..10) od;
    # Peter Luschny, Oct 09 2021
  • Mathematica
    A347834[k_, n_] := (4^n*(6*(Floor[k/3] + k) - 2) - 1)/3;
    Table[A347834[k - n, n], {k, 10}, {n, 0, k - 1}] (* Paolo Xausa, Jun 26 2025 *)

Formula

Array A:
A(k, 0) = A047529(k) (the positive odd numbers {1, 3, 7} (mod 8));
A(k, n) = ((3* A(k, 0) + 1)*4^n - 1)/3, for k >= 1 and n >= 0.
Recurrence for rows k >= 1: A(k, n) = 4*A(k, n-1) + 1, for n >= 1, with A(k, 0) = 2*(k + floor(k/3)) - 1 = A047529(k).
Explicit form: A(k, n) = ((3*(k + floor(k/3)) - 1)*4^(n+1) - 2)/6, k >= 1, n >= 0. Here 3*(k + floor(k/3)) = A319451(k).
Hence A(k, n) = 5 + 8*(2*A(k, n-2)), for n >= 1, with A(k, 0) = 2*(k + floor(k/3)) - 1 = A047529(k), and 2*A(k, -1) = (A(k, 1) - 5)/8 = k - 1 + floor(k/3) (equals index n of A(k, 1) in the sequence (A004770(n+1))_{n >= 0}). A(k, -1) is half-integer if k = A007494(m) = m + ceiling(m/2), for m >= 1, and A(k, -1) = 2*K if k = 1 + 3*K = A016777(K), for K >= 0.
O.g.f.: expansion in z gives o.g.f.s for rows k, also for k = 0: -A007583; expansion in x gives o.g.f.s for columns n.
G(z, x) = (2*(-1 + 3*z + 3*z^2 + 7*z^3)*(1-x) - (1-4*x)*(1-z^3)) / (3*(1-x)*(1-4*x)*(1-z)*(1-z^3)).
Triangle T:
T(k, n) = A(k - n, n), for k >= 1 and n = 0..k-1.
A(k, n) = [x^n] (1/(x - 1) - A047395(k)) / (4*x - 1). - Peter Luschny, Oct 09 2021

A178415 Array T(n,k) of odd Collatz preimages read by antidiagonals.

Original entry on oeis.org

1, 3, 5, 9, 13, 21, 7, 37, 53, 85, 17, 29, 149, 213, 341, 11, 69, 117, 597, 853, 1365, 25, 45, 277, 469, 2389, 3413, 5461, 15, 101, 181, 1109, 1877, 9557, 13653, 21845, 33, 61, 405, 725, 4437, 7509, 38229, 54613, 87381, 19, 133, 245, 1621, 2901, 17749, 30037
Offset: 1

Views

Author

T. D. Noe, May 28 2010

Keywords

Comments

Every odd number occurs uniquely in this array. See A178414.

Examples

			Array T begins:
.    1    5   21    85   341   1365    5461   21845    87381   349525
.    3   13   53   213   853   3413   13653   54613   218453   873813
.    9   37  149   597  2389   9557   38229  152917   611669  2446677
.    7   29  117   469  1877   7509   30037  120149   480597  1922389
.   17   69  277  1109  4437  17749   70997  283989  1135957  4543829
.   11   45  181   725  2901  11605   46421  185685   742741  2970965
.   25  101  405  1621  6485  25941  103765  415061  1660245  6640981
.   15   61  245   981  3925  15701   62805  251221  1004885  4019541
.   33  133  533  2133  8533  34133  136533  546133  2184533  8738133
.   19   77  309  1237  4949  19797   79189  316757  1267029  5068117
- _L. Edson Jeffery_, Mar 11 2015
From _Bob Selcoe_, Apr 09 2015 (Start):
n=5, j=13: T(5,3) = 277 = (13*4^3 - 1)/3;
n=6, j=17: T(6,4) = 725 = (17*2^7 - 1)/3.
(End)
		

Crossrefs

Rows of array: -A007583(k-1) (n=0), A002450 (n=1), A072197(k-1) (n=2), A206374(n=3), A072261 (n=4), A323824 (n=5), A072262 (n=6), A330246 (n=7), A072201 (n=8), ...
Columns of array: A022998(n-1)/2 (k=0), A178414 (k=1), ...
Cf. A347834 (permuted rows of the array).

Programs

  • Mathematica
    t[n_,1] := t[n,1] = If[OddQ[n],4n-3,2n-1]; t[n_,k_] := t[n,k] = 4*t[n,k-1]+1; Flatten[Table[t[n-i+1,i], {n,20}, {i,n}]]

Formula

From Bob Selcoe, Apr 09 2015 (Start):
T(n,k) = 4*T(n,k-1) + 1.
T(n,k) = T(1,k) + 2^(2k+1)*(n-1)/2 when n is odd;
T(n,k) = T(2,k) + 4^k*(n-2)/2 when n >= 2 and n is even. So equivalently:
T(n,k) = T(n-2,k) + 2^(2k+1) when n is odd; and
T(n,k) = T(n-2,k) + 4^k when n is even.
Let j be the n-th positive odd number coprime with 3. Then:
T(n,k) = (j*4^k - 1)/3 when j == 1 (mod 3); and
T(n,k) = (j*2^(2k-1) - 1)/3 when j == 2 (mod 3).
(End)
From Wolfdieter Lang, Sep 18 2021: (Start)
T(n, k) = ((3*n - 1)*4^k - 2)/6 if n is even, and ((3*n - 2)*4^k - 1)/3 if n is odd, for n >= 1 and k >= 1. Also for n = 0: -A007583(k-1), with A007583(-1) = 1/2, and for k = 0: A022998(n-1)/2, with A022998(-1) = -1.
O.g.f. for array T (with row n = 0 and column k = 0; z for rows and x for columns): G(z, x) = (1/(2*(1-x)*(1-4*x)*(1-z^2)^2)) * ((2*x-4)*z^3 + (3-5*x)*z^2 + 2*x*z + 3*x - 1). (End)

A337238 Number k such that k and k+1 are both digitally balanced numbers in base 2 (A031443).

Original entry on oeis.org

9, 37, 41, 49, 141, 149, 153, 165, 169, 177, 197, 201, 209, 225, 541, 557, 565, 569, 589, 597, 601, 613, 617, 625, 653, 661, 665, 677, 681, 689, 709, 713, 721, 737, 781, 789, 793, 805, 809, 817, 837, 841, 849, 865, 901, 905, 913, 929, 961, 2109, 2141, 2157, 2165
Offset: 1

Views

Author

Amiram Eldar, Nov 21 2020

Keywords

Comments

All the terms are of the form 4*k + 1, where k is a digitally balanced number in base 2. Therefore, there are no 3 consecutive numbers that are digitally balanced in base 2.
The number of terms below 2^k is A079309(floor(k/2)-1) for k > 3.

Examples

			9 is a term since the binary representation of 9 is 1001, which contains 2 0's and 2 1's, and the binary representation of 9 + 1 = 10 is 1010, which also contains 2 0's and 2 1's.
		

Crossrefs

A206374 \ {2} is a subsequence.

Programs

  • Mathematica
    digBalQ[n_] := Module[{d = IntegerDigits[n, 2], m}, EvenQ@(m = Length@d) && Count[d, 1] == m/2]; Select[Range[2000], digBalQ[#] && digBalQ[# + 1] &]

Formula

a(n) = 4*A031443(n) + 1.

A097163 Expansion of (1+x-x^2)/((1-x)*(1-4*x^2)).

Original entry on oeis.org

1, 2, 5, 9, 21, 37, 85, 149, 341, 597, 1365, 2389, 5461, 9557, 21845, 38229, 87381, 152917, 349525, 611669, 1398101, 2446677, 5592405, 9786709, 22369621, 39146837, 89478485, 156587349, 357913941, 626349397, 1431655765, 2505397589
Offset: 0

Views

Author

Paul Barry, Jul 30 2004

Keywords

Comments

Interleave (4*4^n-1)/2 (see A002450) and (7*4^n-1)/3 (A206374).

Programs

  • Maple
    a[0]:=0:a[1]:=1:for n from 2 to 100 do a[n]:=4*a[n-2]+4 od: seq(a[n]/4, n=2..33); # Zerinvary Lajos, Mar 17 2008
  • Mathematica
    CoefficientList[Series[(1+x-x^2)/((1-x)(1-4x^2)),{x,0,40}],x] (* or *) LinearRecurrence[{1,4,-4},{1,2,5},41] (* or *) f[n_]:=(15*2^n-(-2)^n - 8)/24; Array[f, 40] (* Harvey P. Dale, Jun 17 2011 *)

Formula

G.f.: (1+x-x^2)/((1-x)*(1-4*x^2)).
a(n) = 5*2^n/4+(-2)^n/12-1/3.
a(n) = a(n-1)+4*a(n-2)-4*a(n-3).
a(2*n) = A002450(n+1).
a(n) = A097164(n+1)/4.
a(n) = (15*2^n-(-2)^n-8)/24. - Harvey P. Dale, Jun 17 2011

A255264 Total number of ON cells in the "Ulam-Warburton" two-dimensional cellular automaton of A147562 after A048645(n) generations.

Original entry on oeis.org

1, 5, 9, 21, 25, 37, 85, 89, 101, 149, 341, 345, 357, 405, 597, 1365, 1369, 1381, 1429, 1621, 2389, 5461, 5465, 5477, 5525, 5717, 6485, 9557, 21845, 21849, 21861, 21909, 22101, 22869, 25941, 38229, 87381, 87385, 87397, 87445, 87637
Offset: 1

Views

Author

Omar E. Pol, Feb 19 2015

Keywords

Comments

It appears that these are the terms of A147562, A162795, A169707, A255366, A256250, A256260, whose indices have binary weight 1 or 2.

Examples

			Also, written as an irregular triangle in which row lengths are the terms of A028310 the sequence begins:
      1;
      5;
      9,    21;
     25,    37,    85;
     89,   101,   149,   341;
    345,   357,   405,   597,  1365;
   1369,  1381,  1429,  1621,  2389,  5461;
   5465,  5477,  5525,  5717,  6485,  9557, 21845;
  21849, 21861, 21909, 22101, 22869, 25941, 38229, 87381;
  ...
Right border gives the positive terms of A002450.
It appears that the second leading diagonal gives the odd terms of A206374.
		

Crossrefs

Formula

a(n) = A147562(A048645(n)).
Conjecture 1: a(n) = A162795(A048645(n)).
Conjecture 2: a(n) = A169707(A048645(n)).
Conjecture 3: a(n) = A255366(A048645(n)).
Conjecture 4: a(n) = A256250(A048645(n)).
Conjecture 5: a(n) = A256260(A048645(n)).
a(n) = A032925(A209492(n-1)) (conjectured). - Jon Maiga, Dec 17 2021

A221049 Expansion of (1+2*x+3*x^2-x^3)/((1-x)*(1+x)*(1-2*x)*(1+2*x)).

Original entry on oeis.org

1, 2, 8, 9, 36, 37, 148, 149, 596, 597, 2388, 2389, 9556, 9557, 38228, 38229, 152916, 152917, 611668, 611669, 2446676, 2446677, 9786708, 9786709, 39146836, 39146837, 156587348, 156587349, 626349396, 626349397, 2505397588, 2505397589, 10021590356, 10021590357
Offset: 0

Views

Author

Philippe Deléham, Apr 14 2013

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0, 5, 0, -4}, {1, 2, 8, 9}, 40] (* T. D. Noe, Apr 17 2013 *)

Formula

a(n) = a(n-1)*4 if n even, a(n) = a(n-1)+1 if n odd.
a(2n) = (7*4^n-4)/3 = A083597(n).
a(2n+1) = (7*4^n-1)/3 = A206374(n).
a(n) = 5*a(n-2) - 4*a(n-4) with a(0)=1, a(1)=2, a(2)=8, a(3)=9.
Showing 1-6 of 6 results.