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

A235600 a(n) = n/d(n) if d(n) divides n, otherwise a(n) = n, where d(n) is the sum of the digits of n (A007953).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 11, 4, 13, 14, 15, 16, 17, 2, 19, 10, 7, 22, 23, 4, 25, 26, 3, 28, 29, 10, 31, 32, 33, 34, 35, 4, 37, 38, 39, 10, 41, 7, 43, 44, 5, 46, 47, 4, 49, 10, 51, 52, 53, 6, 55, 56, 57, 58, 59, 10, 61, 62, 7, 64, 65, 66, 67, 68, 69, 10, 71, 8, 73, 74, 75, 76, 77, 78, 79, 10, 9, 82, 83, 7, 85
Offset: 1

Views

Author

N. J. A. Sloane, Jan 18 2014

Keywords

Crossrefs

Cf. A065517 (first differs at n=15).

Programs

  • Mathematica
    A235600[n_]:=With[{d=Total[IntegerDigits[n]]},If[Divisible[n,d],n/d,n]];
    Array[A235600,100] (* Paolo Xausa, Dec 06 2023 *)
  • PARI
    a(n) = my(s=sumdigits(n)); if (n % s, n, n/s); \\ Michel Marcus, Jul 15 2021

A235601 Smallest number m such that repeated application of A235600 takes n steps to reach 1, where A235600(k) = k/A007953(k) if the digital sum A007953(k) divides k, A235600(k) = k otherwise.

Original entry on oeis.org

1, 2, 12, 108, 1944, 52488, 1102248, 44641044, 2008846980, 108477736920, 6508664215200, 421761441144960, 22142475660110400, 1793540528468942400, 160701231350817239040, 15909421903730906664960, 1874419162475932276162560
Offset: 0

Views

Author

N. J. A. Sloane and David W. Wilson, Jan 18 2014

Keywords

Comments

Numbers m > 1 which never reach 1 are not candidates for a(n).
There is no analog in base 2 (cf. A235602).
Comment from David W. Wilson, Jan 20 2013: let S(0) = {1}; for each n >= 1, compute the set S(n) of possible predecessors of elements of S(n-1). Then a(n) is the smallest element of S(n). Using this approach, I was able to compute up to a(100).
The sequence is finite with a(440), a 1434-digit number being the final term. - Hans Havermann and Ray Chandler, Jan 21 2014
Sequence A236338 gives the count of iterations of A235600 required to reach 1 when starting from any n. Otherwise said: This sequence is the RECORDS transform of A236338. - M. F. Hasler, Jan 22 2014
The terms are a proper subset of A114440. - Robert G. Wilson v, Jan 22 2014

Examples

			a(4) = 1944: 1944 ->1944/18 = 108 -> 108/9 = 12 -> 12/3 = 4 -> 4/4 = 1 in 4 steps.
		

Crossrefs

Programs

  • Mathematica
    s={1}; Print[s[[1]]]; Do[t={}; Do[v=s[[k]]; u={}; Do[If[Total[IntegerDigits[c*v]]==c, AppendTo[u,c*v]], {c,2,7000}]; t=Join[t,u], {k,Length[s]}]; s=Sort[t]; Print[s[[1]]], {440}] (* Hans Havermann, Jan 21 2014 *)

Extensions

a(8) from Hans Havermann, Jan 19 2014
a(9)-a(100) from David W. Wilson, Jan 21 2014
a(101)-a(440) from Hans Havermann and Ray Chandler, Jan 21 2014

A358139 Numbers k > 0 sorted by k/A000120(k) in increasing order. A000120 is the binary weight of k. If k/A000120(k) yields equal values, the smaller k will appear first.

Original entry on oeis.org

1, 3, 2, 7, 5, 6, 11, 15, 4, 13, 9, 14, 10, 23, 12, 31, 19, 27, 21, 29, 22, 30, 8, 25, 17, 26, 18, 28, 47, 39, 20, 63, 43, 55, 45, 46, 35, 59, 24, 61, 37, 62, 38, 51, 53, 54, 41, 42, 57, 58, 44, 60, 79, 95, 16, 49, 33, 50, 34, 52, 87, 71, 36, 127, 91, 111, 93, 56
Offset: 1

Views

Author

Thomas Scheuerle, Oct 31 2022

Keywords

Comments

A permutation of the positive integers.
This permutation satisfies a weak ordering: If b = a(c*d) and e = a(c) and f = a(d) then b > e and b > f with c,d > 1.

Crossrefs

Programs

  • PARI
    f(x) = x/hammingweight(x);
    cmpb(x, y) = my(hx=f(x), hy=f(y)); if (hx != hy, return(sign(hx-hy))); return(sign(x-y));
    lista(nn) = Vec(vecsort([1..2*nn], cmpb, 1), nn); \\ Michel Marcus, Nov 05 2022

Formula

a(2^n) = 2^(n+1) - 1.
abs(a(n)-n) < n.
Showing 1-3 of 3 results.