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.

A140485 Trajectory of 1 under repeated application of the map: n -> n + second-smallest number that does not divide n.

Original entry on oeis.org

1, 4, 9, 13, 16, 21, 25, 28, 33, 37, 40, 46, 50, 54, 59, 62, 66, 71, 74, 78, 83, 86, 90, 97, 100, 106, 110, 114, 119, 122, 126, 131, 134, 138, 143, 146, 150, 157, 160, 166, 170, 174, 179, 182, 186, 191, 194, 198, 203, 206, 210, 218, 222, 227, 230, 234, 239, 242, 246
Offset: 1

Views

Author

Eric Angelini, Jun 25 2008

Keywords

Examples

			The numbers that do not divide 4 are 3, 5, 6, 7, ..., so a(3) = 4+5 = 9.
Here are the beginnings of the trajectories of some small numbers:
...1--4--9---13--16--21--25--28--32--37--40---
.............|...................|...|
......5--8---+...............29--+...|
.....................................|
...2--6--11--14--18--23--26--30------+
.............|...........|...........|
...3--7--10--+...........|.......33--+
.........................|
.............12--19--22--+
.................|.......|
.............15--+.......|
.........................|
.................17--20--+
..............................................
.........................24--31--34--38--42---
.............................|.......|
.........................27--+...35--+
		

Crossrefs

Programs

  • Mathematica
    f[n_] := (k = 1; s = {}; While[ True, k++; If[ !Divisible[n, k], AppendTo[s, k]]; If[Length[s] == 2, Break[]]]; n + Last[s]); NestList[f, 1, 58] (* Jean-François Alcover, Oct 05 2011 *)
    NestList[#+Complement[Range[100],Divisors[#]][[2]]&,1,60] (* Harvey P. Dale, Apr 27 2012 *)

Extensions

More terms from Stefan Steinerberger, Jul 01 2008

A140488 Trajectory of 5 under repeated application of the map: n -> n + second-smallest number that does not divide n.

Original entry on oeis.org

5, 8, 13, 16, 21, 25, 28, 33, 37, 40, 46, 50, 54, 59, 62, 66, 71, 74, 78, 83, 86, 90, 97, 100, 106, 110, 114, 119, 122, 126, 131, 134, 138, 143, 146, 150, 157, 160, 166, 170, 174, 179, 182, 186, 191, 194, 198, 203, 206, 210, 218, 222, 227, 230, 234, 239, 242, 246
Offset: 1

Views

Author

Eric Angelini, Jun 25 2008

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) local k,c;
    c:= 0:
    for k from 2 do
      if n mod k <> 0 then
        if c = 1 then return n+k fi;
        c:= 1;
      fi
    od
    end proc:
    R:= 5: t:= 5:
    for count from 2 to 100 do
      t:= f(t);
      R:= R,t;
    od:
    R; # Robert Israel, Oct 19 2021
  • Mathematica
    a = {5}; Do[AppendTo[a, a[[ -1]] + Select[Range[a[[ -1]]], Mod[a[[ -1]], # ] > 0 &][[2]]], {60}]; a (* Stefan Steinerberger, Jul 01 2008 *)
  • Python
    def aupton(terms):
        alst = [5]
        while len(alst) < terms:
            an, k, smallest = alst[-1], 2, False
            while not smallest or an%k == 0:
                if not smallest and an%k != 0: smallest = True
                k += 1
            alst.append(an+k)
        return alst
    print(aupton(58)) # Michael S. Branicky, Oct 19 2021

Formula

It appears that a(n+98) = a(n)+420 for n >= 9. - Robert Israel, Oct 19 2021

Extensions

Corrected and extended by Stefan Steinerberger, Jul 01 2008

A140486 Trajectory of 2 under repeated application of the map: n -> n + second-smallest number that does not divide n.

Original entry on oeis.org

2, 6, 11, 14, 18, 23, 26, 30, 37, 40, 46, 50, 54, 59, 62, 66, 71, 74, 78, 83, 86, 90, 97, 100, 106, 110, 114, 119, 122, 126, 131, 134, 138, 143, 146, 150, 157, 160, 166, 170, 174, 179, 182, 186, 191, 194, 198, 203, 206, 210, 218, 222, 227, 230, 234, 239, 242, 246
Offset: 1

Views

Author

Eric Angelini, Jun 25 2008

Keywords

Crossrefs

Extensions

More terms from Stefan Steinerberger, Jul 01 2008

A140487 Trajectory of 3 under repeated application of the map: n -> n + second-smallest number that does not divide n.

Original entry on oeis.org

3, 7, 10, 14, 18, 23, 26, 30, 37, 40, 46, 50, 54, 59, 62, 66, 71, 74, 78, 83, 86, 90, 97, 100, 106, 110, 114, 119, 122, 126, 131, 134, 138, 143, 146, 150, 157, 160, 166, 170, 174, 179, 182, 186, 191, 194, 198, 203, 206, 210, 218, 222, 227, 230, 234, 239, 242, 246
Offset: 1

Views

Author

Eric Angelini, Jun 25 2008

Keywords

Crossrefs

Programs

  • Mathematica
    a = {3, 7}; Do[AppendTo[a, a[[ -1]] + Select[Range[a[[ -1]]], Mod[a[[ -1]], # ] > 0 &][[2]]], {60}]; a (* Stefan Steinerberger, Jul 01 2008 *)

Extensions

More terms from Stefan Steinerberger, Jul 01 2008

A140490 Trajectory of 1 under repeated application of the map: n -> n + third-smallest number that does not divide n.

Original entry on oeis.org

1, 5, 9, 14, 19, 23, 27, 32, 38, 43, 47, 51, 56, 62, 67, 71, 75, 81, 86, 91, 95, 99, 104, 110, 116, 122, 127, 131, 135, 141, 146, 151, 155, 159, 164, 170, 176, 182, 187, 191, 195, 201, 206, 211, 215, 219, 224, 230, 236, 242, 247, 251, 255, 261, 266, 271, 275, 279, 284, 290, 296
Offset: 1

Views

Author

Jacques Tramu, Jun 25 2008

Keywords

Comments

Suggested by Eric Angelini.

Crossrefs

Cf. A140485, A140486, A140487, A140488, A140489 (second-smallest sequences).
Cf. A140491, A140492, A140493, A140494 (third-smallest sequences).

Programs

  • Maple
    f:= proc(n) local k,count;
      count:= 0;
      for k from 2 do
        if n mod k <> 0 then count:= count+1; if count = 3 then return n+k fi fi
      od
    end proc:
    R:= 1: x:= 1:
    for i from 1 to 100 do x:= f(x); R:= R, x od:
    R; # Robert Israel, Jan 17 2023
  • Mathematica
    NestList[#+Complement[Range[#+50],Divisors[#]][[3]]&,1,60] (* Harvey P. Dale, Apr 21 2022 *)
  • PARI
    third(n) = {my(nb = 0, k = 1); while (nb != 3, if (n % k, nb++); if (nb != 3, k++);); k;}
    f(n) = n + third(n);
    lista1(nn) = {a = 1; print1(a, ", "); for (n=2, nn, newa = f(a); print1(newa, ", "); a = f(a););} \\ Michel Marcus, Oct 04 2018

Formula

a(n+12) = a(n) + 60 for n >= 13. - Robert Israel, Jan 17 2023
From Chai Wah Wu, Nov 14 2024: (Start)
A140490-A140493 all converge to the same trajectory.
a(n) = a(n-1) + a(n-12) - a(n-13) for n > 25.
G.f.: x*(x^24 + 2*x^23 + x^22 - x^21 - 2*x^20 + x^18 + 2*x^17 - x^16 - x^15 + x^14 + 2*x^13 + 4*x^12 + 4*x^11 + 4*x^10 + 5*x^9 + 6*x^8 + 5*x^7 + 4*x^6 + 4*x^5 + 5*x^4 + 5*x^3 + 4*x^2 + 4*x + 1)/(x^13 - x^12 - x + 1). (End)

Extensions

More terms from Michel Marcus, Oct 04 2018

A140491 Trajectory of 2 under repeated application of the map: n -> n + third-smallest number that does not divide n.

Original entry on oeis.org

2, 7, 11, 15, 21, 26, 31, 35, 39, 44, 50, 56, 62, 67, 71, 75, 81, 86, 91, 95, 99, 104, 110, 116, 122, 127, 131, 135, 141, 146, 151, 155, 159, 164, 170, 176, 182, 187, 191, 195, 201, 206, 211, 215, 219, 224, 230, 236, 242, 247, 251, 255, 261, 266, 271, 275, 279, 284, 290, 296
Offset: 1

Views

Author

Jacques Tramu, Jun 25 2008

Keywords

Crossrefs

Cf. A140485, A140486, A140487, A140488, A140489 (second-smallest sequences).
Cf. A140490, A140492, A140493, A140494 (third-smallest sequences).

Programs

  • Mathematica
    NestList[Complement[Range[3+#],Divisors[#]][[3]]+#&,2,60] (* Harvey P. Dale, Jan 15 2024 *)
  • PARI
    third(n) = {my(nb = 0, k = 1); while (nb != 3, if (n % k, nb++); if (nb != 3, k++);); k;}
    f(n) = n + third(n);
    lista2(nn) = {a = 2; print1(a, ", "); for (n=2, nn, newa = f(a); print1(newa, ", "); a = f(a););} \\ Michel Marcus, Oct 04 2018

Formula

From Chai Wah Wu, Nov 14 2024: (Start)
A140490-A140493 all converge to the same trajectory.
a(n) = a(n-1) + a(n-12) - a(n-13) for n > 13.
G.f.: x*(4*x^12 + 6*x^11 + 6*x^10 + 5*x^9 + 4*x^8 + 4*x^7 + 5*x^6 + 5*x^5 + 6*x^4 + 4*x^3 + 4*x^2 + 5*x + 2)/(x^13 - x^12 - x + 1). (End)

Extensions

More terms from Michel Marcus, Oct 04 2018

A140493 Trajectory of 4 under repeated application of the map: n -> n + third-smallest number that does not divide n.

Original entry on oeis.org

4, 10, 16, 22, 27, 32, 38, 43, 47, 51, 56, 62, 67, 71, 75, 81, 86, 91, 95, 99, 104, 110, 116, 122, 127, 131, 135, 141, 146, 151, 155, 159, 164, 170, 176, 182, 187, 191, 195, 201, 206, 211, 215, 219, 224, 230, 236, 242, 247, 251, 255, 261, 266, 271, 275, 279, 284, 290, 296
Offset: 1

Views

Author

Jacques Tramu, Jun 25 2008

Keywords

Crossrefs

Cf. A140485, A140486, A140487, A140488, A140489 (second-smallest sequences).
Cf. A140491, A140492, A140493, A140494 (third-smallest sequences).

Programs

  • Mathematica
    NestList[Complement[Range[#+10],Divisors[#]][[3]]+#&,4,60] (* Harvey P. Dale, Aug 28 2023 *)
  • PARI
    third(n) = {my(nb = 0, k = 1); while (nb != 3, if (n % k, nb++); if (nb != 3, k++);); k;}
    f(n) = n + third(n);
    lista4(nn) = {a = 4; print1(a, ", "); for (n=2, nn, newa = f(a); print1(newa, ", "); a = f(a););} \\ Michel Marcus, Oct 04 2018

Formula

From Chai Wah Wu, Nov 14 2024: (Start)
A140490-A140493 all converge to the same trajectory.
a(n) = a(n-1) + a(n-12) - a(n-13) for n > 23.
G.f.: x*(x^22 + 2*x^21 + x^20 - x^19 - 2*x^18 - 2*x^14 - 2*x^13 + x^12 + 6*x^11 + 5*x^10 + 4*x^9 + 4*x^8 + 5*x^7 + 6*x^6 + 5*x^5 + 5*x^4 + 6*x^3 + 6*x^2 + 6*x + 4)/(x^13 - x^12 - x + 1). (End)

Extensions

More terms from Michel Marcus, Oct 04 2018

A140492 Trajectory of 3 under repeated application of the map: n -> n + third-smallest number that does not divide n.

Original entry on oeis.org

3, 8, 14, 19, 23, 27, 32, 38, 43, 47, 51, 56, 62, 67, 71, 75, 81, 86, 91, 95, 99, 104, 110, 116, 122, 127, 131, 135, 141, 146, 151, 155, 159, 164, 170, 176, 182, 187, 191, 195, 201, 206, 211, 215, 219, 224, 230, 236, 242, 247, 251, 255, 261, 266, 271, 275
Offset: 1

Views

Author

Jacques Tramu, Jun 25 2008

Keywords

Crossrefs

Cf. A140485, A140486, A140487, A140488, A140489 (second-smallest sequences).
Cf. A140490, A140491, A140493, A140494 (third-smallest sequences).

Programs

  • Mathematica
    Join[{3},NestList[#+Complement[Range[#],Divisors[#]][[3]]&,8,50]] (* Harvey P. Dale, Apr 04 2015 *)
  • PARI
    third(n) = {my(nb = 0, k = 1); while (nb != 3, if (n % k, nb++); if (nb != 3, k++);); k;}
    f(n) = n + third(n);
    lista3(nn) = {a = 3; print1(a, ", "); for (n=2, nn, newa = f(a); print1(newa, ", "); a = f(a););} \\ Michel Marcus, Oct 04 2018

Formula

From Chai Wah Wu, Nov 14 2024: (Start)
A140490-A140493 all converge to the same trajectory.
a(n) = a(n-1) + a(n-12) - a(n-13) for n > 24.
G.f.: x*(x^23 + 2*x^22 + x^21 - x^20 - 2*x^19 + x^17 + 2*x^16 - x^15 - 2*x^14 + 3*x^12 + 5*x^11 + 4*x^10 + 4*x^9 + 5*x^8 + 6*x^7 + 5*x^6 + 4*x^5 + 4*x^4 + 5*x^3 + 6*x^2 + 5*x + 3)/(x^13 - x^12 - x + 1). (End)

Extensions

More terms from Harvey P. Dale, Apr 04 2015

A140494 Numbers that cannot be part of the trajectory of any number under repeated application of the map: n -> n + third-smallest number that does not divide n, unless they are the first term of the trajectory.

Original entry on oeis.org

1, 2, 3, 4, 6, 12, 18, 24, 28, 30, 36, 37, 40, 42, 46, 48, 49, 52, 54, 55, 60, 64, 66, 72, 78, 80, 84, 88, 90, 96, 97, 100, 102, 106, 108, 112, 114, 115, 120, 124, 126, 132, 133, 138, 144, 150, 156, 157, 160, 162, 166, 168, 172, 174, 175, 180, 184, 186, 192, 198, 200
Offset: 1

Views

Author

Jacques Tramu, Jun 25 2008

Keywords

Crossrefs

Cf. A140485, A140486, A140487, A140488, A140489 (second-smallest sequences).
Cf. A140490, A140491, A140492, A140493 (third-smallest sequences).

Programs

  • PARI
    third(n) = {my(nb = 0, k = 1); while (nb != 3, if (n % k, nb++); if (nb != 3, k++);); k;}
    f(n) = n + third(n);
    canbe(n) = {for (k=1, n, if (k + third(k) == n, return (1));); return (0);}
    cannotbe(n) = 1 - canbe(n);
    lista(nn) = {for (n=1, nn, if (cannotbe(n), print1(n, ", ")););} \\ Michel Marcus, Oct 04 2018

Extensions

Corrected by Michel Marcus, Oct 04 2018
Showing 1-9 of 9 results.