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

A191664 Dispersion of A014601 (numbers >2, congruent to 0 or 3 mod 4), by antidiagonals.

Original entry on oeis.org

1, 3, 2, 7, 4, 5, 15, 8, 11, 6, 31, 16, 23, 12, 9, 63, 32, 47, 24, 19, 10, 127, 64, 95, 48, 39, 20, 13, 255, 128, 191, 96, 79, 40, 27, 14, 511, 256, 383, 192, 159, 80, 55, 28, 17, 1023, 512, 767, 384, 319, 160, 111, 56, 35, 18, 2047, 1024, 1535, 768, 639
Offset: 1

Views

Author

Clark Kimberling, Jun 11 2011

Keywords

Comments

Row 1: A000225 (-1+2^n)
Row 2: A000079 (2^n)
Row 3: A055010
Row 4: 3*A000079
Row 5: A153894
Row 6: 5*A000079
Row 7: A086224
Row 8: A005009
Row 9: A052996
For a background discussion of dispersions, see A191426.
...
Each of the sequences (4n, n>2), (4n+1, n>0), (3n+2, n>=0), generates a dispersion. Each complement (beginning with its first term >1) also generates a dispersion. The six sequences and dispersions are listed here:
...
A191663=dispersion of A042948 (0 or 1 mod 4 and >1)
A054582=dispersion of A005843 (0 or 2 mod 4 and >1; evens)
A191664=dispersion of A014601 (0 or 3 mod 4 and >1)
A191665=dispersion of A042963 (1 or 2 mod 4 and >1)
A191448=dispersion of A005408 (1 or 3 mod 4 and >1, odds)
A191666=dispersion of A042964 (2 or 3 mod 4)
...
EXCEPT for at most 2 initial terms (so that column 1 always starts with 1):
A191663 has 1st col A042964, all else A042948
A054582 has 1st col A005408, all else A005843
A191664 has 1st col A042963, all else A014601
A191665 has 1st col A014601, all else A042963
A191448 has 1st col A005843, all else A005408
A191666 has 1st col A042948, all else A042964
...
There is a formula for sequences of the type "(a or b mod m)", (as in the Mathematica program below):
If f(n)=(n mod 2), then (a,b,a,b,a,b,...) is given by
a*f(n+1)+b*f(n), so that "(a or b mod m)" is given by
a*f(n+1)+b*f(n)+m*floor((n-1)/2)), for n>=1.
This sequence is a permutation of the natural numbers. - L. Edson Jeffery, Aug 13 2014

Examples

			Northwest corner:
1...3...7....15...31
2...4...8....16...32
5...11..23...47...95
6...12..24...48...96
9...19..39...79...159
		

Crossrefs

Programs

  • Mathematica
    (* Program generates the dispersion array T of the increasing sequence f[n] *)
    r = 40; r1 = 12;  c = 40; c1 = 12;
    a = 3; b = 4; m[n_] := If[Mod[n, 2] == 0, 1, 0];
    f[n_] := a*m[n + 1] + b*m[n] + 4*Floor[(n - 1)/2]
    Table[f[n], {n, 1, 30}]  (* A014601(n+2): (4+4k,5+4k) *)
    mex[list_] := NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1, Length[Union[list]]]
    rows = {NestList[f, 1, c]};
    Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}];
    t[i_, j_] := rows[[i, j]];
    TableForm[Table[t[i, j], {i, 1, 10}, {j, 1, 10}]] (* A191664 *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A191664  *)
    (* Clark Kimberling, Jun 11 2011 *)
    Grid[Table[2^k*(2*Floor[(n + 1)/2] - 1) - Mod[n, 2], {n, 12}, {k, 12}]] (* L. Edson Jeffery, Aug 13 2014 *)

A241957 Rectangular array A read by upward antidiagonals in which the entry in row n and column k is defined by A(n,k) = 2^n*(2*k - 1) - 1, n,k >= 1.

Original entry on oeis.org

1, 3, 5, 7, 11, 9, 15, 23, 19, 13, 31, 47, 39, 27, 17, 63, 95, 79, 55, 35, 21, 127, 191, 159, 111, 71, 43, 25, 255, 383, 319, 223, 143, 87, 51, 29, 511, 767, 639, 447, 287, 175, 103, 59, 33, 1023, 1535, 1279, 895, 575, 351, 207, 119, 67, 37
Offset: 1

Views

Author

L. Edson Jeffery, Aug 09 2014

Keywords

Comments

The sequence is a permutation of the odd natural numbers, since A(n,k) = 2*A054582(n-1,k-1) - 1 and A054582 is a permutation of the natural numbers.
For j a natural number, 2*j - 1 appears in row A001511(j) of A.
This is the square array A075300 with the first row omitted. - Peter Bala, Feb 07 2017

Examples

			Array begins:
.      1     5     9    13    17     21     25     29     33     37
.      3    11    19    27    35     43     51     59     67     75
.      7    23    39    55    71     87    103    119    135    151
.     15    47    79   111   143    175    207    239    271    303
.     31    95   159   223   287    351    415    479    543    607
.     63   191   319   447   575    703    831    959   1087   1215
.    127   383   639   895  1151   1407   1663   1919   2175   2431
.    255   767  1279  1791  2303   2815   3327   3839   4351   4863
.    511  1535  2559  3583  4607   5631   6655   7679   8703   9727
.   1023  3071  5119  7167  9215  11263  13311  15359  17407  19455
		

Crossrefs

Cf. A016813, A017101 (rows 1 and 2).
Cf. A000225, A083329, A153894, A086224, A052996, etc. (columns 1-5).
Cf. A005408 (odd natural numbers), A054582.
Cf. A075300.

Programs

  • Mathematica
    (* Array: *)
    Grid[Table[2^n*(2*k - 1) - 1, {n, 10}, {k, 10}]]
    (* Array antidiagonals flattened: *)
    Flatten[Table[2^(n - k + 1)*(2*k - 1) - 1, {n, 10}, {k, n}]]

Formula

A(n,k) = 2*A054582(n-1,k-1) - 1.

A277215 a(n) is the smallest even number not congruent to 1 modulo 3 that starts a (2n+1)-element alternating sequence of x/2 and (3x+1) iterations ending in the maximum of its Collatz trajectory.

Original entry on oeis.org

0, 26, 6, 14, 30, 1214, 1662, 254, 510, 1022, 2046, 28670, 40958, 180222, 32766, 65534, 131070, 1835006, 5767166, 1048574, 2097150, 4194302, 8388606, 16777214, 33554430, 469762046, 671088638, 268435454, 536870910, 7516192766, 2147483646, 4294967294, 8589934590, 17179869182, 34359738366, 755914244094
Offset: 0

Views

Author

Hartmut F. W. Hoft, Nov 03 2016

Keywords

Comments

a(n) starts a maximal alternating Collatz sequence v_0, ..., v_2n of 2n+1 elements and must have the form v_0 = 2*(q*2^n - 1) where q is the smallest odd number not a multiple of 3 such that v_(2n) = 2*(q*3^n - 1) is the maximum of its Collatz trajectory.
The intermediate elements of the sequence for 1 <= j <= n are v_(2j-1) = q * 2^(n-j+1) * 3^(j-1) - 1, which is odd, and v_(2j) = 2 * (q * 2^(n-j) * 3^j - 1), which is congruent to 2 modulo 4 except for j=n.
A277875(n) is the odd multiplier q in the expression for a(n).
Subsequences of a(n) are related to subsequences of the following sequences depending on the value of q:
a(n) = 2*A000225(n) = A000918(n+1) when A277875(n) = 1;
a(n) = 2*A153894(n) = A131051(n+3) when A277875(n) = 5;
a(n) = 2*A086224(n) = A086224(n+1)-1 = A176448(n+1) when A277875(n) = 7;
a(n) = A086225(n+1)-1 when A277875(n) = 11;
a(n) = A198274(n+1)-1 when A277875(n) = 13;
a(n) = A198276(n+1)-1 when A277875(n) = 19;
For small q > 1, the positions of 2*(q*2^n - 1) among the first 200 numbers in the sequence are:
q = 5: 12, 26, 36, 46, 58, 62, 174;
q = 7: 1, 11, 17, 25, 29, 45, 49, 53, 57, 61, 65, 77, 93, 103, 109, 113, 117, 125, 139, 141, 145, 157, 165, 173, 187, 189, 193;
q = 11: 13, 18, 35, 59, 69, 75, 83, 114, 133, 179;
q = 13: 6, 118;
q = 19: 5;
and among the first 400 numbers are:
q = 17: 222, 229, 230, 268;
(see A277875).
Conjecture: For every n there is an odd number q such that the alternating sequence ends in v_(2n), the maximum of the Collatz trajectory of a(n)=v_0.

Examples

			a(0) = 0 = 2*(1*2^0 - 1) since it is the start and end of the first alternating sequence of 1 element and the maximum of its trajectory.
a(1) = 26 = 2*(7*2^1 - 1) since sequence 26, 13, 40 has 3 elements and ends in the maximum of its trajectory and since 2, 10 and 18 do not satisfy the conditions for a(1).
a(5) = 1214 = 2*(19*2^5 - 1) starts the alternating sequence of 11 elements - 1214, 607, 1822, 911, 2734, 1367, 4102, 2051, 6154, 3077, 9232 - that ends in the trajectory maximum 9232 while the 11-element alternating sequences starting at 2*(q*2^5 - 1) with odd q<19 either do not end at the trajectory maximum or are congruent to 1 modulo 3 and therefore do not have maximal length.
		

Crossrefs

Programs

  • Mathematica
    collatz[n_] := If[OddQ[n], 3n+1, n/2]
    altdata[low_, high_] := Module[{n, q, notDone, v, a, m, list={}}, For[n=low, n<=high, n++, q=-1; notDone=True; While[notDone, q+=2; v=2*(q*2^n-1); If[Mod[v, 3]!=1, a=NestWhile[collatz, v, Mod[#,4]!=0&]; m=Max[NestWhileList[collatz, a, #!=1&]]; notDone=(a!=m)]]; AppendTo[list, {n, q, v, a}]]; list]/;(low>1)
    a277215[n_]:=Map[#[[3]]&, altdata[2,n]]
    Join[{0,26}, a277215[35]] (* sequence data *)

A054135 a(n) = T(n,1), array T as in A054134.

Original entry on oeis.org

2, 4, 9, 19, 39, 79, 159, 319, 639, 1279, 2559, 5119, 10239, 20479, 40959, 81919, 163839, 327679, 655359, 1310719, 2621439, 5242879, 10485759, 20971519, 41943039, 83886079, 167772159, 335544319, 671088639, 1342177279
Offset: 1

Views

Author

Keywords

Comments

From Jianing Song, May 25 2025: (Start)
As Ely Golden noted in A153894, a(n) is the total number of symbols required in the fully-expanded von Neumann definition of ordinal n - 1, where the string "{}" is used to represent the empty set and spaces are ignored. First examples:
0 = {};
1 = {0} = {{}};
2 = {0,1} = {{},{{}}};
3 = {0,1,2} = {{},{{}},{{},{{}}}};
4 = {0,1,2,3} = {{},{{}},{{},{{}}},{{},{{}},{{},{{}}}}}.
(End)

Crossrefs

Identical to A052549 and A153894 except for initial term.
Cf. A267524.

Programs

  • Python
    print([2]+[(5*2**(n-2) - 1) for n in range(2, 50)]) # Karl V. Keller, Jr., Jun 12 2022

Formula

For n > 2, a(n) = 10*A000225(n-3) + 9 = 10*(2^(n-3) - 1) + 9 = 10*2^(n-3) - 1. - Gerald McGarvey, Aug 25 2004
a(1)=1, a(n) = n + Sum_{i=1..n-1} a(i) for n > 1. - Gerald McGarvey, Sep 06 2004
a(n) = 5*2^(n-2) - 1 for n > 1. - Karl V. Keller, Jr., Jun 12 2022

A291557 a(n) = 23*2^n - 1.

Original entry on oeis.org

22, 45, 91, 183, 367, 735, 1471, 2943, 5887, 11775, 23551, 47103, 94207, 188415, 376831, 753663, 1507327, 3014655, 6029311, 12058623, 24117247, 48234495, 96468991, 192937983, 385875967, 771751935, 1543503871, 3087007743, 6174015487, 12348030975, 24696061951, 49392123903, 98784247807, 197568495615, 395136991231, 790273982463, 1580547964927
Offset: 0

Views

Author

Enrique Navarrete, Aug 26 2017

Keywords

Comments

An easy description is: starting from a(0)=22, a(n)=number of integers to be skipped to get a(n+1); i.e., from a(0)=22, skip 22 integers to get a(1)=45; then skip 45 integers to get a(2)=91, etc.
Note that if the initial condition is a(0)=0, a(n)=A000225; if a(0)=2, a(n)=A083329; if a(0)=4, a(n)=A153894, etc.

Crossrefs

Programs

Formula

From Chai Wah Wu, Mar 04 2018: (Start)
a(n) = 3*a(n-1) - 2*a(n-2) for n > 1.
G.f.: (22 - 21*x)/((1 - x)*(1 - 2*x)). (End)

A345401 a(n) is the unique odd number h such that BCR(h*2^m-1) = 2n (except for BCR(0) = 1) where BCR is bit complement and reverse per A036044.

Original entry on oeis.org

1, 3, 7, 5, 15, 11, 13, 9, 31, 23, 27, 19, 29, 21, 25, 17, 63, 47, 55, 39, 59, 43, 51, 35, 61, 45, 53, 37, 57, 41, 49, 33, 127, 95, 111, 79, 119, 87, 103, 71, 123, 91, 107, 75, 115, 83, 99, 67, 125, 93, 109, 77, 117, 85, 101, 69, 121, 89, 105, 73, 113, 81, 97, 65, 255, 191
Offset: 0

Views

Author

Bernard Schott, Jun 18 2021

Keywords

Comments

This sequence is a permutation of the odd numbers.
We have BCR(a(n)*2^m-1) = 2n when n = 0 for m >= 1, and BCR(a(n)*2^m-1) = 2n when n >= 1 for m >= 0.
Why this exception when n = 0? As a(0) = 1, we have BCR(1*2^m-1) = 2*0 = 0 only for m >= 1, because, for m = 0, we have BCR(1*2^0-1) = BCR(0) = 1 <> 2*0 = 0.

Examples

			a(0) = 1 because BCR(1*2^m-1) = 2*0 = 0 for m >= 1 (A000225).
a(1) = 3 because BCR(3*2^m-1) = 2*1 = 2 for m >= 0 (A153893).
a(2) = 7 because BCR(7*2^m-1) = 2*2 = 4 for m >= 0 (A086224).
Indeed, a(1) = 3 because 3*2^m-1 = 1011..11_2 (i.e., 10 followed by m 1's), whose bit complement is 0100..00, which reverses to 10_2 = 2 = 2*1.
Also, a(43) = 75 because 75*2^m-1 = 100101011..11_2 (i.e., 1001010 followed by m 1's), whose bit complement is 011010100..00, which reverses to 1010110_2 = 86 = 2*43.
		

Crossrefs

Cf. A036044 (BCR), A059894.
When BCR(n) = 0, 2, 4, 6, 8, 10, 12, then corresponding a(n) = h = 1, 3, 7, 5, 15, 11, 13 and numbers h*2^m-1 are respectively in A000225, A153893, A086224, A153894, A196305, A086225, A198274.

Formula

a(n) = BCR(2*n) + 1 for n >= 1.
a(n) = 2*A059894(n) + 1 for n >= 1. - Hugo Pfoertner, Jun 18 2021
Previous Showing 11-16 of 16 results.