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

A191670 Dispersion of A042968 (>1 and congruent to 1 or 2 or 3 mod 4), by antidiagonals.

Original entry on oeis.org

1, 2, 4, 3, 6, 8, 5, 9, 11, 12, 7, 13, 15, 17, 16, 10, 18, 21, 23, 22, 20, 14, 25, 29, 31, 30, 27, 24, 19, 34, 39, 42, 41, 37, 33, 28, 26, 46, 53, 57, 55, 50, 45, 38, 32, 35, 62, 71, 77, 74, 67, 61, 51, 43, 36, 47, 83, 95, 103, 99, 90, 82, 69, 58, 49, 40, 63
Offset: 1

Views

Author

Clark Kimberling, Jun 11 2011

Keywords

Comments

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:
...
A191452=dispersion of A008586 (4k, k>=1)
A191667=dispersion of A016813 (4k+1, k>=1)
A191668=dispersion of A016825 (4k+2, k>=0)
A191669=dispersion of A004767 (4k+3, k>=0)
A191670=dispersion of A042968 (1 or 2 or 3 mod 4 and >=2)
A191671=dispersion of A004772 (0 or 1 or 3 mod 4 and >=2)
A191672=dispersion of A004773 (0 or 1 or 2 mod 4 and >=2)
A191673=dispersion of A004773 (0 or 2 or 3 mod 4 and >=2)
...
EXCEPT for at most 2 initial terms (so that column 1 always starts with 1):
A191452 has 1st col A042968, all else A008486
A191667 has 1st col A004772, all else A016813
A191668 has 1st col A042965, all else A016825
A191669 has 1st col A004773, all else A004767
A191670 has 1st col A008486, all else A042968
A191671 has 1st col A016813, all else A004772
A191672 has 1st col A016825, all else A042965
A191673 has 1st col A004767, all else A004773
...
Regarding the dispersions A191670-A191673, there is a formula for sequences of the type "(a or b or c mod m)", (as in the Mathematica program below):
If f(n)=(n mod 3), then (a,b,c,a,b,c,a,b,c,...) is given by
a*f(n+2)+b*f(n+1)+c*f(n), so that "(a or b or c mod m)" is given by
a*f(n+2)+b*f(n+1)+c*f(n)+m*floor((n-1)/3)), for n>=1.

Examples

			Northwest corner:
1....2....3....5....7
4....6....9....13...18
8....11...15...21...29
12...17...23...31...42
16...22...30...41...55
		

Crossrefs

Row 1: A155167, Row 2: A171861.

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 = 3; c2 = 5; m[n_] := If[Mod[n, 3] == 0, 1, 0];
    f[n_] := a*m[n + 2] + b*m[n + 1] + c2*m[n] + 4*Floor[(n - 1)/3]
    Table[f[n], {n, 1, 30}] (* A042968 *)
    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}]] (* A191670 *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A191670 *)

A279075 Maximum starting value of X such that repeated replacement of X with X-ceiling(X/5) requires n steps to reach 0.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 8, 11, 14, 18, 23, 29, 37, 47, 59, 74, 93, 117, 147, 184, 231, 289, 362, 453, 567, 709, 887, 1109, 1387, 1734, 2168, 2711, 3389, 4237, 5297, 6622, 8278, 10348, 12936, 16171, 20214, 25268, 31586, 39483, 49354, 61693, 77117, 96397, 120497
Offset: 0

Views

Author

Jon E. Schoenfield, Dec 06 2016

Keywords

Comments

Inspired by A278586.
Limit_{n->oo} a(n)/(5/4)^n = 2.68723058270145442816383476567331957329199286146873...

Examples

			8 -> 8-ceiling(8/5) = 6,
6 -> 6-ceiling(6/5) = 4,
4 -> 4-ceiling(4/5) = 3,
3 -> 3-ceiling(3/5) = 2,
2 -> 2-ceiling(2/5) = 1,
1 -> 1-ceiling(1/5) = 0,
so reaching 0 from 8 requires 6 steps;
9 -> 9-ceiling(9/5) = 7,
7 -> 7-ceiling(7/5) = 5,
5 -> 5-ceiling(5/5) = 4,
4 -> 4-ceiling(4/5) = 3,
3 -> 3-ceiling(3/5) = 2,
2 -> 2-ceiling(2/5) = 1,
1 -> 1-ceiling(1/5) = 0,
so reaching 0 from 9 (or more) requires 7 (or more) steps;
thus, 8 is the largest starting value from which 0 can be reached in 6 steps, so a(6) = 8.
		

Crossrefs

Cf. A278586.
See the following sequences for maximum starting value of X such that repeated replacement of X with X-ceiling(X/k) requires n steps to reach 0: A000225 (k=2), A006999 (k=3), A155167 (k=4, apparently; see Formula entry there), (this sequence) (k=5), A279076 (k=6), A279077 (k=7), A279078 (k=8), A279079 (k=9), A279080 (k=10). For each of these values of k, is the sequence the L-sieve transform of {k-1, 2k-1, 3k-1, ...}?

Programs

  • Magma
    a:=[0]; aCurr:=0; for n in [1..48] do aCurr:=Floor(aCurr*5/4)+1; a[#a+1]:=aCurr; end for; a;
    
  • Magma
    [n eq 1 select n-1 else Floor(Self(n-1)*5/4)+1: n in [1..70]]; // Vincenzo Librandi, Dec 06 2016
  • Mathematica
    RecurrenceTable[{a[1] == 0, a[n] == Floor[a[n-1] 5/4] + 1}, a, {n, 50}] (* Vincenzo Librandi, Dec 06 2016 *)

Formula

a(n) = floor(a(n-1)*5/4) + 1.

A279080 Maximum starting value of X such that repeated replacement of X with X-ceiling(X/10) requires n steps to reach 0.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 15, 17, 19, 22, 25, 28, 32, 36, 41, 46, 52, 58, 65, 73, 82, 92, 103, 115, 128, 143, 159, 177, 197, 219, 244, 272, 303, 337, 375, 417, 464, 516, 574, 638, 709, 788, 876, 974, 1083, 1204, 1338, 1487, 1653, 1837, 2042, 2269
Offset: 0

Views

Author

Jon E. Schoenfield, Dec 06 2016

Keywords

Comments

Inspired by A278586.
Limit_{n->oo} a(n)/(10/9)^n = 5.60655601136196116133057876294687807265035051745268...

Examples

			  13 -> 13-ceiling(13/10) = 11,
  11 -> 11-ceiling(11/10) = 9,
   9 ->  9-ceiling(9/10)  = 8,
   8 ->  8-ceiling(8/10)  = 7,
...
   1 ->  1-ceiling(1/10)  = 0,
so reaching 0 from 13 requires 11 steps;
  14 -> 14-ceiling(14/10) = 12,
  12 -> 12-ceiling(12/10) = 10,
  10 -> 10-ceiling(10/10) = 9,
   9 ->  9-ceiling(9/10)  = 8,
   8 ->  8-ceiling(8/10)  = 7,
...
   1 ->  1-ceiling(1/10)  = 0,
so reaching 0 from 14 (or more) requires 12 (or more) steps;
thus, 13 is the largest starting value from which 0 can be reached in 11 steps, so a(11) = 13.
		

Crossrefs

Cf. A278586.
See the following sequences for maximum starting value of X such that repeated replacement of X with X-ceiling(X/k) requires n steps to reach 0: A000225 (k=2), A006999 (k=3), A155167 (k=4, apparently; see Formula entry there), A279075 (k=5), A279076 (k=6), A279077 (k=7), A279078 (k=8), A279079 (k=9), (this sequence) (k=10). For each of these values of k, is the sequence the L-sieve transform of {k-1, 2k-1, 3k-1, ...}?

Programs

  • Magma
    a:=[0]; aCurr:=0; for n in [1..57] do aCurr:=Floor(aCurr*10/9)+1; a[#a+1]:=aCurr; end for; a;
  • Maple
    H:= proc(y) local u,v;
         v:= -y-1 mod 9+1;
         (10*y+v)/9
    end proc:
    A:= Array(0..100):
    A[0]:= 0:
    for i from 1 to 100 do A[i]:= H(A[i-1]) od:
    convert(A,list); # Robert Israel, Jun 23 2020
  • Mathematica
    With[{s = Array[-1 + Length@ NestWhileList[# - Ceiling[#/10] &, #, # > 0 &] &, 2400, 0]}, Array[-1 + Position[s, #][[-1, 1]] &, Max@ s, 0]] (* Michael De Vlieger, Jun 23 2020 *)

Formula

a(n) = floor(a(n-1)*10/9) + 1.

A087192 a(n) = ceiling(a(n-1)*4/3), with a(1) = 1.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 11, 15, 20, 27, 36, 48, 64, 86, 115, 154, 206, 275, 367, 490, 654, 872, 1163, 1551, 2068, 2758, 3678, 4904, 6539, 8719, 11626, 15502, 20670, 27560, 36747, 48996, 65328, 87104, 116139, 154852, 206470, 275294, 367059, 489412, 652550
Offset: 1

Views

Author

Paul D. Hanna, Aug 24 2003

Keywords

Comments

If you repeatedly base 64 encode a string, starting with a single character, the length of the string at step n is 4*a(n). - Christian Perfect, Jan 06 2016

Crossrefs

Programs

  • Magma
    [n eq 1 select 1 else Ceiling(Self(n-1)*4/3): n in [1..50]]; // Vincenzo Librandi, Aug 17 2017
    
  • Maple
    A[1]:= 1:
    for n from 2 to 100 do A[n]:= ceil(4/3*A[n-1]) od:
    seq(A[i],i=1..100); # Robert Israel, Aug 17 2017
  • Mathematica
    a[1] = 1; a[n_] := a[n] = Ceiling[4 a[n - 1]/3]; Table[a@ n, {n, 45}] (* Michael De Vlieger, Jan 06 2016 *)
  • PARI
    a(n) = if (n==1, 1, ceil(a(n-1)*4/3)) \\ Michel Marcus, Aug 01 2013
    
  • Python
    from fractions import Fraction
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A087192(n): return int(Fraction(4*A087192(n-1),3)._ceil_()) if n>1 else 1 # Chai Wah Wu, Sep 07 2023

Formula

Partial sums of A072493. Also indices of records in A087165: A087165(a(n))=n.

A279076 Maximum starting value of X such that repeated replacement of X with X-ceiling(X/6) requires n steps to reach 0.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 7, 9, 11, 14, 17, 21, 26, 32, 39, 47, 57, 69, 83, 100, 121, 146, 176, 212, 255, 307, 369, 443, 532, 639, 767, 921, 1106, 1328, 1594, 1913, 2296, 2756, 3308, 3970, 4765, 5719, 6863, 8236, 9884, 11861, 14234, 17081, 20498, 24598, 29518, 35422
Offset: 0

Views

Author

Jon E. Schoenfield, Dec 06 2016

Keywords

Comments

Inspired by A278586.
Limit_{n->oo} a(n)/(6/5)^n = 3.24387249751177521384734853905517802618171089570674...

Examples

			7 -> 7-ceiling(7/6) = 5,
5 -> 5-ceiling(5/6) = 4,
4 -> 4-ceiling(4/6) = 3,
3 -> 3-ceiling(3/6) = 2,
2 -> 2-ceiling(2/6) = 1,
1 -> 1-ceiling(1/6) = 0,
so reaching 0 from 7 requires 6 steps;
8 -> 8-ceiling(8/6) = 6,
6 -> 6-ceiling(6/6) = 5,
5 -> 5-ceiling(5/6) = 4,
4 -> 4-ceiling(4/6) = 3,
3 -> 3-ceiling(3/6) = 2,
2 -> 2-ceiling(2/6) = 1,
1 -> 1-ceiling(1/6) = 0,
so reaching 0 from 8 (or more) requires 7 (or more) steps;
thus, 7 is the largest starting value from which 0 can be reached in 6 steps, so a(6) = 7.
		

Crossrefs

Cf. A278586.
See the following sequences for maximum starting value of X such that repeated replacement of X with X-ceiling(X/k) requires n steps to reach 0: A000225 (k=2), A006999 (k=3), A155167 (k=4, apparently; see Formula entry there), A279075 (k=5), (this sequence) (k=6), A279077 (k=7), A279078 (k=8), A279079 (k=9), A279080 (k=10). For each of these values of k, is the sequence the L-sieve transform of {k-1, 2k-1, 3k-1, ...}?

Programs

  • Magma
    a:=[0]; aCurr:=0; for n in [1..51] do aCurr:=Floor(aCurr*6/5)+1; a[#a+1]:=aCurr; end for; a;

Formula

a(n) = floor(a(n-1)*6/5) + 1.

A279077 Maximum starting value of X such that repeated replacement of X with X-ceiling(X/7) requires n steps to reach 0.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 18, 22, 26, 31, 37, 44, 52, 61, 72, 85, 100, 117, 137, 160, 187, 219, 256, 299, 349, 408, 477, 557, 650, 759, 886, 1034, 1207, 1409, 1644, 1919, 2239, 2613, 3049, 3558, 4152, 4845, 5653, 6596, 7696, 8979, 10476, 12223, 14261
Offset: 0

Views

Author

Jon E. Schoenfield, Dec 06 2016

Keywords

Comments

Inspired by A278586.
Limit_{n->oo} a(n)/(7/6)^n = 4.03710211215303193642791458111196922950551168987041...

Examples

			  10 -> 10-ceiling(10/7) = 8,
   8 ->  8-ceiling(8/7)  = 6,
   6 ->  6-ceiling(6/7)  = 5,
   5 ->  5-ceiling(5/7)  = 4,
   4 ->  4-ceiling(4/7)  = 3,
   3 ->  3-ceiling(3/7)  = 2,
   2 ->  2-ceiling(2/7)  = 1,
   1 ->  1-ceiling(1/7)  = 0,
so reaching 0 from 10 requires 8 steps;
  11 -> 11-ceiling(11/7) = 9,
   9 ->  9-ceiling(9/7)  = 7,
   7 ->  7-ceiling(7/7)  = 6,
   6 ->  6-ceiling(6/7)  = 5,
   5 ->  5-ceiling(5/7)  = 4,
   4 ->  4-ceiling(4/7)  = 3,
   3 ->  3-ceiling(3/7)  = 2,
   2 ->  2-ceiling(2/7)  = 1,
   1 ->  1-ceiling(1/7)  = 0,
so reaching 0 from 11 (or more) requires 9 (or more) steps;
thus, 10 is the largest starting value from which 0 can be reached in 8 steps, so a(8) = 10.
		

Crossrefs

Cf. A278586.
See the following sequences for maximum starting value of X such that repeated replacement of X with X-ceiling(X/k) requires n steps to reach 0: A000225 (k=2), A006999 (k=3), A155167 (k=4, apparently; see Formula entry there), A279075 (k=5), A279076 (k=6), (this sequence) (k=7), A279078 (k=8), A279079 (k=9), A279080 (k=10). For each of these values of k, is the sequence the L-sieve transform of {k-1, 2k-1, 3k-1, ...}?

Programs

  • Magma
    a:=[0]; aCurr:=0; for n in [1..53] do aCurr:=Floor(aCurr*7/6)+1; a[#a+1]:=aCurr; end for; a;

Formula

a(n) = floor(a(n-1)*7/6) + 1.

A279078 Maximum starting value of X such that repeated replacement of X with X-ceiling(X/8) requires n steps to reach 0.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 15, 18, 21, 25, 29, 34, 39, 45, 52, 60, 69, 79, 91, 105, 121, 139, 159, 182, 209, 239, 274, 314, 359, 411, 470, 538, 615, 703, 804, 919, 1051, 1202, 1374, 1571, 1796, 2053, 2347, 2683, 3067, 3506, 4007, 4580, 5235, 5983, 6838
Offset: 0

Views

Author

Jon E. Schoenfield, Dec 06 2016

Keywords

Comments

Inspired by A278586.
Limit_{n->oo} a(n)/(8/7)^n = 4.42210347959393228709604412445802201220907917744900...

Examples

			  11 -> 11-ceiling(11/8) = 9,
   9 ->  9-ceiling(9/8)  = 7,
   7 ->  7-ceiling(7/8)  = 6,
   6 ->  6-ceiling(6/8)  = 5,
...
   1 ->  1-ceiling(1/8)  = 0,
so reaching 0 from 11 requires 9 steps;
  12 -> 12-ceiling(12/8) = 10,
  10 -> 10-ceiling(10/8) = 8,
   8 ->  8-ceiling(8/8)  = 7,
   7 ->  7-ceiling(7/8)  = 6,
...
   1 ->  1-ceiling(1/8)  = 0,
so reaching 0 from 12 (or more) requires 10 (or more) steps;
thus, 11 is the largest starting value from which 0 can be reached in 9 steps, so a(9) = 11.
		

Crossrefs

Cf. A278586.
See the following sequences for maximum starting value of X such that repeated replacement of X with X-ceiling(X/k) requires n steps to reach 0: A000225 (k=2), A006999 (k=3), A155167 (k=4, apparently; see Formula entry there), A279075 (k=5), A279076 (k=6), A279077 (k=7), (this sequence) (k=8), A279079 (k=9), A279080 (k=10). For each of these values of k, is the sequence the L-sieve transform of {k-1, 2k-1, 3k-1, ...}?

Programs

  • Magma
    a:=[0]; aCurr:=0; for n in [1..55] do aCurr:=Floor(aCurr*8/7)+1; a[#a+1]:=aCurr; end for; a;

Formula

a(n) = floor(a(n-1)*8/7) + 1.

A279079 Maximum starting value of X such that repeated replacement of X with X-ceiling(X/9) requires n steps to reach 0.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 19, 22, 25, 29, 33, 38, 43, 49, 56, 64, 73, 83, 94, 106, 120, 136, 154, 174, 196, 221, 249, 281, 317, 357, 402, 453, 510, 574, 646, 727, 818, 921, 1037, 1167, 1313, 1478, 1663, 1871, 2105, 2369, 2666, 3000, 3376, 3799
Offset: 0

Views

Author

Jon E. Schoenfield, Dec 06 2016

Keywords

Comments

Inspired by A278586.
Lim_{n->inf} a(n)/(9/8)^n = 5.19544896392362185906460915572195169945039729234281...

Examples

			  12 -> 12-ceiling(12/9) = 10,
  10 -> 10-ceiling(10/9) = 8,
   8 ->  8-ceiling(8/9)  = 7,
   7 ->  7-ceiling(7/9)  = 6,
...
   1 ->  1-ceiling(1/9)  = 0,
so reaching 0 from 12 requires 10 steps;
  13 -> 13-ceiling(13/9) = 11,
  11 -> 11-ceiling(11/9) = 9,
   9 ->  9-ceiling(9/9)  = 8,
   8 ->  8-ceiling(8/9)  = 7,
   7 ->  7-ceiling(7/9)  = 6,
...
   1 ->  1-ceiling(1/9)  = 0,
so reaching 0 from 13 (or more) requires 11 (or more) steps;
thus, 12 is the largest starting value from which 0 can be reached in 10 steps, so a(10) = 12.
		

Crossrefs

Cf. A278586.
See the following sequences for maximum starting value of X such that repeated replacement of X with X-ceiling(X/k) requires n steps to reach 0: A000225 (k=2), A006999 (k=3), A155167 (k=4, apparently; see Formula entry there), A279075 (k=5), A279076 (k=6), A279077 (k=7), A279078 (k=8), (this sequence) (k=9), A279080 (k=10). For each of these values of k, is the sequence the L-sieve transform of {k-1, 2k-1, 3k-1, ...}?

Programs

  • Magma
    a:=[0]; aCurr:=0; for n in [1..56] do aCurr:=Floor(aCurr*9/8)+1; a[#a+1]:=aCurr; end for; a;

Formula

a(n) = floor(a(n-1)*9/8) + 1.

A357081 Leader at step n of the THROWBACK procedure (see definition in comments).

Original entry on oeis.org

3, 4, 5, 6, 3, 7, 4, 8, 3, 5, 9, 4, 3, 6, 10, 5, 3, 4, 7, 11, 3, 6, 4, 5, 3, 8, 12, 4, 3, 7, 5, 6, 3, 4, 9, 13, 3, 5, 4, 8, 3, 6, 7, 4, 3, 5, 10, 14, 3, 4, 6, 5, 3, 9, 4, 7, 3, 8, 5, 4, 3, 6, 11, 15, 3, 4, 5, 7, 3, 6, 4, 10, 3, 5, 8, 4, 3, 9, 6, 5, 3, 4, 7, 12, 3, 16, 4, 5, 3, 6, 8, 4, 3, 7, 5, 11, 3, 4, 6, 9
Offset: 0

Views

Author

Anthony M. Kozar Jr., Sep 08 2022

Keywords

Comments

The THROWBACK procedure: Start with the infinite sequence of natural numbers beginning with 3, that is 3, 4, 5, 6, 7, 8, ... The first number in the sequence at any step of the procedure is called the "leader". At each step, the leader is moved back in the sequence the number of places equal to its value.
It is conjectured that every number (n >= 3) appears an infinite number of times in this sequence.
The indices of records, ignoring the initial 3, appear to match A155167.
Every fourth term is 3. Values k > 3 occur at nonconstant intervals and the sequence of intervals for each k appears to be cyclic with a period of 3^(k-3). Ignoring the last value, the first 3^(k-3)-1 values of any of these cycles of intervals appear to be a palindrome. E.g., a(n)=5 for n=2,9,15,23,30,37,45,51,58,66,... The intervals between the 5's appear to repeat the pattern 7,6,8,7,7,8,6,7,8 and 7,6,8,7,7,8,6,7 is a palindrome.
Appears to be A087165 with every term incremented by 2. If so, then the recurrence a(n)=3 when n == 0 (mod 4), otherwise a(n) = a(n - ceiling(n/4)) + 1 holds. Also appears to be A087165 with every 1 and every 2 removed. See the comment by Benoit Cloitre on A087165 for another possible way to construct this sequence.
If every 3 is removed then the result appears to be the original sequence with every term incremented by 1.
If the THROWBACK procedure is performed on all natural numbers including 1 and 2, then the sequence of leaders appears to be A001511. Other initial values appear to produce similar patterns to this sequence.

Examples

			Before the first step, 3 is the leader, so a(0) = 3. In the first step, 3 is moved back 3 places giving the new sequence 4, 5, 6, 3, 7, 8, ..., so a(1) = 4.
		

Crossrefs

Cf. A354223, A355080. (Other variants of the THROWBACK procedure).

Programs

  • Python
    from collections import deque
    from itertools import count, islice
    def tgen(): yield from count(3) # generator of sequence to throwback
    def agen(): # generator of terms
        g = tgen()
        a = deque([next(g)])
        while True:
            leader = a.popleft()
            yield leader
            while leader > len(a): a.append(next(g))
            a.insert(leader, leader)
    print(list(islice(agen(), 100))) # Michael S. Branicky, Sep 11 2022

Formula

a(n) = A087165(n+1) + 2 (conjectured).
Showing 1-9 of 9 results.