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

A047988 Start with n and reach 2 by repeatedly either dividing by d where d <= the square root or by adding or subtracting 1. The division steps are free, but adding or subtracting 1 costs 1 point. a(n) is the smallest cost to reach 2.

Original entry on oeis.org

0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 2, 1, 1, 1, 1, 0, 1, 1, 1, 1, 2, 1, 1, 0, 1, 1, 1, 0, 1, 2, 1, 0, 1, 1, 2, 1, 1, 1, 1, 0, 1, 1, 1, 1, 2, 1, 1, 0, 1, 2, 1, 0, 1, 1, 1, 0, 1, 1, 2, 1, 1, 1, 1, 0, 1, 1, 1, 2, 1, 1, 1, 0, 1, 1, 1, 0, 1, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 2
Offset: 2

Views

Author

Thomas Kantke (bytes.more(AT)ibm.net)

Keywords

Examples

			From _David A. Corneth_, Jun 05 2020: (Start)
For n = 19 we get to 2 via
n := 19 - 1 = 2 (+1 point as we subtract 1 from n)
n := 18/3 = 6 (+0 point as we divide by a divisor)
n := 6/2 = 3 (+0 point, we divide by a divisor. we can't divide by 3 as 3 > sqrt(6)).
n := 3 - 1 = 2 (+1 point; steps end here; we have n = 2)
We earned 2 points in these steps. As this is the minimal number of points starting at n = 19, a(19) = 2. (End)
		

Crossrefs

Programs

Extensions

More terms from David W. Wilson

A047836 "Nullwertzahlen" (or "inverse prime numbers"): n=p1*p2*p3*p4*p5*...*pk, where pi are primes with p1 <= p2 <= p3 <= p4 ...; then p1 = 2 and p1*p2*...*pi >= p(i+1) for all i < k.

Original entry on oeis.org

2, 4, 8, 12, 16, 24, 32, 36, 40, 48, 56, 60, 64, 72, 80, 84, 96, 108, 112, 120, 128, 132, 144, 160, 168, 176, 180, 192, 200, 208, 216, 224, 240, 252, 256, 264, 280, 288, 300, 312, 320, 324, 336, 352, 360, 384, 392, 396, 400, 408, 416, 420, 432, 440, 448
Offset: 1

Views

Author

Thomas Kantke (bytes.more(AT)ibm.net)

Keywords

Comments

Start with n and reach 2 by repeatedly either dividing by d where d <= the square root or by adding or subtracting 1. The division steps are free, but adding or subtracting 1 costs 1 point. The "value" of n (A047988) is the smallest cost to reach 2. Sequence gives numbers with value 0.
a(n) is also the length of the largest Dyck path of the symmetric representation of sigma of the n-th number whose symmetric representation of sigma has only one part. For an illustration see A317305. (Cf. A237593.) - Omar E. Pol, Aug 25 2018
This sequence can be defined equivalently as the increasing terms of the set containing 2 and all the integers such that if n is in the set, then all m * n are in the set for all m <= n. - Giuseppe Melfi, Oct 21 2019
The subsequence giving the largest term with k prime factors (k >= 1) starts 2, 4, 12, 132, 17292, 298995972, ... . - Peter Munn, Jun 04 2020

Examples

			Starting at 24 we divide by 3, 2, then 2, reaching 2.
		

Crossrefs

Programs

  • Haskell
    import Data.List.Ordered (union)
    a047836 n = a047836_list !! (n-1)
    a047836_list = f [2] where
       f (x:xs) = x : f (xs `union` map (x *) [2..x])
    -- Reinhard Zumkeller, Jun 25 2015, Sep 28 2011
  • Mathematica
    nMax = 100; A174973 = Select[Range[10*nMax], AllTrue[Rest[dd = Divisors[#]] / Most[dd], Function[r, r <= 2]]&]; a[n_] := 2*A174973[[n]]; Array[a, nMax] (* Jean-François Alcover, Nov 10 2016, after Reinhard Zumkeller *)

Formula

a(n) = 2 * A174973(n). - Reinhard Zumkeller, Sep 28 2011
The number of terms <= x is c*x/log(x) + O(x/(log(x))^2), where c = 0.612415..., and a(n) = C*n*log(n*log(n)) + O(n), where C = 1/c = 1.63287... This follows from the formula just above. - Andreas Weingartner, Jun 30 2021

Extensions

More terms from David W. Wilson

A047984 Integers n such that A047988(n)=1.

Original entry on oeis.org

3, 5, 6, 7, 9, 10, 11, 13, 14, 15, 17, 18, 20, 21, 22, 23, 25, 26, 27, 28, 30, 31, 33, 34, 35, 37, 39, 41, 42, 44, 45, 46, 47, 49, 50, 51, 52, 54, 55, 57, 59, 61, 62, 63, 65, 66, 68, 69, 70, 71, 73, 74, 75, 77, 78, 79, 81, 82, 83, 85, 88, 90, 91, 92, 93, 94, 95, 97
Offset: 1

Views

Author

Thomas Kantke (bytes.more(AT)ibm.net)

Keywords

Examples

			7 has value 1 since we add 1 to get 8, then divide by 2 twice.
		

Crossrefs

Extensions

More terms from David W. Wilson

A047986 Integers n such that A047988(n)=3.

Original entry on oeis.org

173, 347, 823, 907, 1237, 1697, 2137, 2333, 2423, 2473, 2767, 2777, 3253, 3413, 3547, 3559, 3623, 3767, 4243, 4273, 4457, 4547, 4723, 5091, 5297, 5861, 6185, 6197, 6593, 6823, 6827, 6871, 7093, 7247, 7537, 7717, 7817, 7823, 7879, 8243
Offset: 1

Views

Author

Thomas Kantke (bytes.more(AT)ibm.net)

Keywords

Crossrefs

Extensions

More terms from David W. Wilson

A213531 Number of k < 10^n such that A047988(k) = 2.

Original entry on oeis.org

0, 11, 201, 2592, 29916, 328988, 3550745, 37432690, 390065916, 4034529147, 41532029309, 425608837164
Offset: 1

Views

Author

Martin Renner, Jun 13 2012

Keywords

References

  • Thomas Kantke, Mathematische Unterhaltungen, in: Spektrum der Wissenschaft 4/1993, p. 11-13.
  • Thomas Kantke, Das Spiel Minimum, in: Spektrum der Wissenschaft Spezial Physik - Mathematik - Technik 2/2012, pp. 57-66.

Crossrefs

Showing 1-5 of 5 results.