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.

Previous Showing 11-12 of 12 results.

A335905 Number of distinct integers encountered on all possible paths from n to any first encountered powers of 2 (that are excluded from the count), when using the transitions x -> x - (x/p) and x -> x + (x/p) in any order, where p is the largest prime dividing x.

Original entry on oeis.org

0, 0, 1, 0, 2, 1, 2, 0, 3, 2, 3, 1, 3, 2, 4, 0, 4, 3, 5, 2, 4, 3, 4, 1, 6, 3, 6, 2, 6, 4, 5, 0, 5, 4, 6, 3, 6, 5, 5, 2, 6, 4, 7, 3, 7, 4, 5, 1, 6, 6, 7, 3, 9, 6, 7, 2, 8, 6, 7, 4, 6, 5, 7, 0, 7, 5, 7, 4, 6, 6, 7, 3, 7, 6, 9, 5, 8, 5, 7, 2, 10, 6, 7, 4, 9, 7, 9, 3, 10, 7, 7, 4, 8, 5, 11, 1, 7, 6, 8, 6, 11, 7, 10, 3, 9
Offset: 1

Views

Author

Antti Karttunen, Jun 30 2020

Keywords

Examples

			From 9 one can reach with the transitions x -> A171462(x) (leftward arrow) and x -> A335876(x) (rightward arrow) the following three numbers, when one doesn't expand any power of 2 (in this case, 4, 8 and 16, that are not included in the count) further:
       9
      / \
     6   12
    / \ / \
  (4) (8) (16)
thus a(9) = 3.
From 10 one can reach with the transitions x -> A171462(x) and x -> A335876(x) the following two numbers (10 & 12), when one doesn't expand any powers of 2 (8 and 16 in this case, not counted) further:
  10
   |\
   | \
   | 12
   | /\
   |/  \
  (8)  (16)
thus a(10) = 2.
For n = 9, the numbers encountered are 6, 9, 12, thus a(9) = 3.
For n = 67, the numbers encountered are 48, 60, 66, 67, 68, 72, 96, thus a(67) = 7.
For n = 105, the numbers encountered are 48, 72, 90, 96, 105, 108, 120, 144, 192, thus a(105) = 9.
		

Crossrefs

Programs

  • PARI
    A171462(n) = if(1==n,0,(n-(n/vecmax(factor(n)[, 1]))));
    A335876(n) = if(1==n,2,(n+(n/vecmax(factor(n)[, 1]))));
    A209229(n) = (n && !bitand(n,n-1));
    A335905(n) = if(A209229(n),0,my(xs=Set([n]),allxs=xs,newxs,a,b,u); for(k=1,oo, newxs=Set([]); if(!#xs, return(#allxs)); allxs = setunion(allxs,xs); for(i=1,#xs,u = xs[i]; a = A171462(u); if(!A209229(a), newxs = setunion([a],newxs)); b = A335876(u); if(!A209229(b), newxs = setunion([b],newxs))); xs = newxs));

A333959 First occurrence of n in A334144.

Original entry on oeis.org

1, 6, 15, 33, 65, 77, 154, 161, 217, 231, 455, 469, 483, 693, 957, 987, 1001, 1449, 1463, 2021, 2717, 2093, 2415, 2967, 3003, 4147, 3059, 4853, 4945, 4899, 6083, 8533, 4991, 7161, 9982, 8987, 9177, 10787, 10857, 10465, 10199, 12857, 14539, 20355, 18753, 20398
Offset: 1

Views

Author

Keywords

Comments

Consider the mappings f(m) := m -> m - m/p across primes p | m.
Row m of A334184, read as a triangle T(m, k), lists the number of distinct values that proceed from the mapping after exactly k iterations.
A334144(m) is the largest value in row m of A334184.
The smallest term in this sequence that is not an index of a record in A334144 is a(22) = 2093.
From Robert G. Wilson v, Jun 14 2020: (Start)
All terms are nonprimes, but not necessarily squarefree. They are: 693, 1449, 91791, 13126113, 46334057, ..., .
Even terms: 6, 154, 9982, 20398, 29946, 812630, 1366666, 4263182, 17766658, 22866158, 34688186, 80633294, ..., .
Except for the initial even term, all even terms divided by 2 are also terms.
(End)

Examples

			1 is the first term since 1 is the empty product.
6 follows 1 since 2 <= m <= 5 have total order, thus the maximum number in A333184 is 1. For m = 6, the mapping f(m) has two distinct results {4, 3}, which generate chains {4, 2, 1} and {3, 2, 1}, respectively, with the last two terms in both chains coincident. Since the largest number of terms in an antichain is 2, a(2) = 6.
15 follows 6 since row 15 of A334184 = [1, 2, 3, 2, 1, 1] is the smallest m for which n = 3 appears.
Hasse diagrams of the 3 smallest terms, with brackets around the widest row.
[1]        6           15
          / \          /\
         /   \        /  \
        [4   3]     12  __10
         |  /       | \/   |
         | /        |_/\   |
         2         [8  _6  5]
         |          | /_|_/
         |          |// |
         1          4   3
                    |  /
                    |_/
                    2
                    |
                    |
                    1
		

Crossrefs

Programs

  • Mathematica
    With[{s = Table[Max[Length@ Union@ # & /@ Transpose@ #] &@ If[n == 1, {{1}}, NestWhile[If[Length[#] == 0, Map[{n, #} &, # - # /FactorInteger[#][[All, 1]] ], Union[Join @@ Map[Function[{w, n}, Map[Append[w, If[n == 0, 0, n - n/#]] &, FactorInteger[n][[All, 1]] ]] @@ {#, Last@ #} &, #]] ] &, n, If[ListQ[#], AllTrue[#, Last[#] > 1 &], # > 1] &]], {n, 10^3}]}, TakeWhile[Array[FirstPosition[s, #][[1]] &, Max@ s], IntegerQ]]
    f[n_] := Block[{lst = {{n}}}, While[lst[[-1]] != {1}, lst = Join[ lst, {Union[ Flatten[# - #/(First@# & /@ FactorInteger@#) & /@ lst[[-1]]] ]}]]; Max[Length@# & /@ lst]]; t[] := 0; k = 1; While[k < 21001, a = f@k; If[ t[a] == 0, t[a] = k]; k++]; t@# & /@ Range@ 46 (* _Robert G. Wilson v, Jun 14 2020 *)
Previous Showing 11-12 of 12 results.