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

A191665 Dispersion of A042963 (numbers >1, congruent to 1 or 2 mod 4), by antidiagonals.

Original entry on oeis.org

1, 2, 3, 5, 6, 4, 10, 13, 9, 7, 21, 26, 18, 14, 8, 42, 53, 37, 29, 17, 11, 85, 106, 74, 58, 34, 22, 12, 170, 213, 149, 117, 69, 45, 25, 15, 341, 426, 298, 234, 138, 90, 50, 30, 16, 682, 853, 597, 469, 277, 181, 101, 61, 33, 19, 1365, 1706, 1194, 938, 554
Offset: 1

Views

Author

Clark Kimberling, Jun 11 2011

Keywords

Comments

Row 1: A000975
Row 2: A081254
Row 3: A081253
Row 4: A052997
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.

Examples

			Northwest corner:
1...2...5....10...21
3...6...13...26...53
4...9...18...37...74
7...14..29...58...117
8...17..34...69...138
		

Crossrefs

Programs

  • Mathematica
    (* Program generates the dispersion array T of the increasing sequence f[n] *)
    r = 40; r1 = 12;  c = 40; c1 = 12;
    a = 2; b = 5; 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}]  (* A042963: (2+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}]]
    (* A191665 *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]]
    (* A191665  *)

A340627 a(n) = (11*2^n - 2*(-1)^n)/3 for n >= 0.

Original entry on oeis.org

3, 8, 14, 30, 58, 118, 234, 470, 938, 1878, 3754, 7510, 15018, 30038, 60074, 120150, 240298, 480598, 961194, 1922390, 3844778, 7689558, 15379114, 30758230, 61516458, 123032918, 246065834, 492131670, 984263338, 1968526678, 3937053354, 7874106710, 15748213418, 31496426838
Offset: 0

Views

Author

Paul Curtz, Apr 25 2021

Keywords

Comments

Based on A112387.
Prepended with 0, 1, its difference table is
0, 1, 1, 2, 1, 4, 3, 8, ... = mix A001045(n), 2^n.
1, 0, 1, -1, 3, -1, 5, -3, ... = mix A001045(n+1), -A001045(n).
-1, 1, -2, 4, -4, 6, -8, 14, ... = mix -2^n, A084214(n+1).
2, -3, 6, -8, 10, -14, 22, -30, ... = mix 2*A001045(n+2), -a(n).

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1, 2}, {3, 8}, 35] (* Amiram Eldar, Apr 25 2021 *)
  • PARI
    a(n) = (11*2^n - 2*(-1)^n)/3 \\ Felix Fröhlich, Apr 25 2021

Formula

a(n) = 2^(n+2) - A078008(n), n>=0.
a(n) = (A062510(n) = 3*A001045(n)) + A001045(n+3), n>=0.
a(0)=3, a(2*n+1) = 2*a(2*n) + 2, a(2*n+2) = 2*a(2*n+1) - 2, n>=0.
a(n) = 4*A052997(n-1) + 2, n>=2. - Hugo Pfoertner, Apr 25 2021
a(n+1) = 11*2^n - a(n) for n>=0.
a(n+3) = 33*2^n - a(n) for n>=0.
a(n+5) = 121*2^n - a(n) for n>=0.
etc.
a(n+2) = a(n) + 11*2^n for n>=0.
a(n+4) = a(n) + 55*2^n for n>=0.
a(n+6) = a(n) + 231*2^n for n>=0.
etc.
G.f.: (3 + 5*x)/(1 - x - 2*x^2). - Stefano Spezia, Apr 26 2021
E.g.f: (11*exp(2*x) - 2*exp(-x))/3. - Jianing Song, Apr 26 2021

Extensions

More terms from Michel Marcus, Apr 25 2021
New name from Jianing Song, Apr 25 2021

A294523 Lexicographically earliest sequence of positive terms, such that, for any n > 0, the binary expansion of n, say of size k+1, is (1, a(n) mod 2, a^2(n) mod 2, ..., a^k(n) mod 2) (where a^i denotes the i-th iterate of the sequence).

Original entry on oeis.org

1, 2, 1, 2, 6, 5, 1, 2, 10, 6, 14, 9, 5, 13, 1, 2, 18, 10, 22, 12, 6, 14, 30, 17, 9, 5, 11, 25, 13, 29, 1, 2, 34, 18, 38, 20, 10, 22, 46, 24, 12, 6, 54, 28, 14, 30, 62, 33, 17, 9, 19, 41, 5, 11, 23, 49, 25, 13, 27, 57, 29, 61, 1, 2, 66, 34, 70, 36, 18, 38, 78
Offset: 1

Views

Author

Rémy Sigrist, Nov 01 2017

Keywords

Comments

More informally, the parity of the iterate of the sequence at n gives the binary expansion of n (beyond the leading 1).
Apparently, iterating the sequence always leads to one of these three loops:
- the fixed point (1) iff we start from 2^k-1 for some k > 0,
- the fixed point (2) iff we start from 2^k for some k > 0,
- or (5, 6) for any other starting value.
a(n) is even iff n belongs to A004754.
a(n) is odd iff n belongs to A004760.
If a(n) > n then a(n) = A080541(n).
If n < 2^k then a(n) < 2^k.
Apparently, if a(n) > 2, then A054429(a(n)) = a(A054429(n)); this accounts for the symmetry of the part connected to the loop (5,6) in the oriented graph of this sequence.

Examples

			For n=11:
- the binary representation of 11 is (1,0,1,1),
- a(11) = 14 has parity 0,
- a(14) = 13 has parity 1,
- a(13) = 5 has parity 1,
- we find the binary digits of 11 beyond the initial 1, in order: 0, 1, 1.
See also representations of first terms in Links section.
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

a(n) = 1 iff n = A000225(k) for some k > 0.
a(n) = 2 iff n = A000079(k) for some k > 0.
a(n) = 5 iff n = A081254(k) for some k > 2.
a(n) = 6 iff n = A000975(k) for some k > 2.
a(n) = 10 iff n = A081253(k) for some k > 2.
a(n) = 12 iff n = A266613(k) for some k > 3.
a(n) = 13 iff n = A052997(k) for some k > 2.
a(n) = 14 iff n = A266721(k) for some k > 2.
a(n) = 18 iff n = A267045(k) for some k > 3.
a(n) = 54 iff n = A266248(k) for some k > 4.
These formulas come from the fact that each sequence on the right side, say f, eventually satisfies: f(n) = floor(f(n+1)/2), and f(n) and f(n+2) have the same parity.

A383953 a(0) = 4, a(n) = 2*a(n-1) + (-1)^n.

Original entry on oeis.org

4, 7, 15, 29, 59, 117, 235, 469, 939, 1877, 3755, 7509, 15019, 30037, 60075, 120149, 240299, 480597, 961195, 1922389, 3844779, 7689557, 15379115, 30758229, 61516459, 123032917, 246065835, 492131669, 984263339, 1968526677, 3937053355, 7874106709, 15748213419, 31496426837
Offset: 0

Views

Author

Paul Curtz, Aug 19 2025

Keywords

Crossrefs

Bisections give A199210 and A072261.

Programs

  • Mathematica
    a[n_] := (11*2^n + (-1)^n)/3; Array[a, 34, 0] (* Amiram Eldar, Aug 20 2025 *)

Formula

a(n) = (11*2^n + (-1)^n)/3.
a(n) = A340627(n+1)/2.
a(n) = 2*A052997(n) + 1 for n >= 1.
a(n) = a(n-4) + 55*2^(n-4) for n >= 4.
G.f.: (3*x + 4)/((x + 1)*(1 - 2*x)).
E.g.f: (11*exp(2*x) + exp(-x))/3.
Showing 1-4 of 4 results.