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.

A376619 a(n) is the least odd number k such that A376615(k) = n, or -1 if no such number exists.

Original entry on oeis.org

3, 21, 345, 10625, 74375, 860625, 84189105, 1599592995, 23993894925
Offset: 1

Views

Author

Amiram Eldar, Sep 30 2024

Keywords

Comments

Without the restriction to odd numbers the corresponding sequence is 3*2^(n-1) = A007283(n-1).
All the terms above 3 are odd binary Niven numbers (A144302).
a(10) > 10^13, if it exists.

Examples

			  n | The n iterations
  --+------------------------------------------------------
  1 | 3 -> 3/2
  2 | 21 -> 7 -> 7/3
  3 | 345 -> 69 -> 23 -> 23/4
  4 | 10625 -> 2125 -> 425 -> 85 -> 85/4
  5 | 74375 -> 10625 -> 2125 -> 425 -> 85 -> 85/4
  6 | 860625 -> 95625 -> 10625 -> 2125 -> 425 -> 85 -> 85/4
		

Crossrefs

Programs

  • Mathematica
    s[n_] := s[n] = Module[{bw = DigitCount[n, 2, 1]}, If[bw == 1, 0, If[!Divisible[n, bw], 1, 1 + s[n/bw]]]]; seq[len_] := Module[{v = Table[0, {len}], c = 0, k = 3, i}, While[c < len, i = s[k]; If[v[[i]] == 0, c++; v[[i]] = k]; k += 2]; v]; seq[5]
  • PARI
    s(n) = {my(w = hammingweight(n)); if(w == 1, 0, if(n % w, 1, 1 + s(n/w)));}
    lista(len) = {my(v = vector(len), c = 0, k = 3, i); while(c < len, i = s(k); if(v[i] == 0, c++; v[i] = k); k += 2); v;}