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.

A362404 Numbers k such that k and k+1 are both in A362401.

Original entry on oeis.org

24, 27, 48, 79, 120, 168, 199, 288, 350, 360, 378, 391, 447, 507, 528, 775, 840, 895, 960, 1088, 1136, 1368, 1638, 1639, 1680, 1848, 1849, 2095, 2127, 2208, 2322, 2749, 2808, 3720, 3726, 3798, 3799, 3919, 4050, 4087, 4488, 4550, 4872, 5040, 5328, 5448, 5631, 6240
Offset: 1

Views

Author

Amiram Eldar, Apr 18 2023

Keywords

Examples

			24 is a term since 24 and 25 are both in the range of A162296: A162296(20) = 24 and A162296(25) = 25.
		

Crossrefs

Subsequence of A362401.
A362405 is a subsequence.
Cf. A162296.

Programs

  • Mathematica
    s[n_] := Module[{f = FactorInteger[n], p, e}, p = f[[;; , 1]]; e = f[[;; , 2]]; Times @@ ((p^(e + 1) - 1)/(p - 1)) - Times @@ (p + 1)]; s[1] = 0; seq[max_] := Module[{v = Select[Union[Array[s, max]], 0 < # <= max &], i}, i = Position[Differences[v], 1] // Flatten; v[[i]]]; seq[10^4]
  • PARI
    s(n) = {my(f = factor(n), p, e); prod(i = 1, #f~, p = f[i, 1]; e = f[i, 2]; ((p^(e + 1) - 1)/(p - 1))) -  prod(i = 1, #f~, f[i, 1] + 1);}
    lista(kmax) = {my(v = select(x -> (x < kmax), Set(vector(kmax, k, s(k))))); for(k=1, #v-1, if(v[k+1] - v[k] == 1, print1(v[k], ", ")));}