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.

A297022 A permutation of the natural numbers: a(n) = A067565(A018252(n)).

Original entry on oeis.org

1, 4, 2, 3, 9, 5, 6, 7, 8, 16, 10, 12, 14, 11, 15, 25, 13, 18, 21, 20, 24, 22, 17, 27, 36, 19, 26, 28, 30, 33, 32, 23, 35, 49, 40, 34, 39, 48, 44, 42, 38, 29, 45, 31, 50, 64, 52, 55, 51, 46, 54
Offset: 1

Views

Author

Peter Kagey, Dec 23 2017

Keywords

Crossrefs

Formula

a(n) = A067565(A018252(n)).

A255980 Number of iterations of A067565 required to reach a perfect square.

Original entry on oeis.org

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

Views

Author

Peter Kagey, Mar 12 2015

Keywords

Comments

Iterating A067565 will always result in a perfect square, because all fixed points are squares, and A067565(n) <= n all n.
a(n) = 0 if and only if n is a perfect square.
a(n) = 1 if and only if n is prime.

Examples

			Let g(n) = A067565(n)
a(12) = 3 because g(g(g(12))) = g(g(6)) = g(3) = 0, which is a perfect square.
		

Crossrefs

Cf. A067565.

Programs

  • Ruby
    def a(n)
      c = 0
      n = a067565(n) while n.is_nonsquare? && c += 1
      c
    end

A006255 R. L. Graham's sequence: a(n) = smallest m for which there is a sequence n = b_1 < b_2 < ... < b_t = m such that b_1*b_2*...*b_t is a perfect square.

Original entry on oeis.org

1, 6, 8, 4, 10, 12, 14, 15, 9, 18, 22, 20, 26, 21, 24, 16, 34, 27, 38, 30, 28, 33, 46, 32, 25, 39, 35, 40, 58, 42, 62, 45, 44, 51, 48, 36, 74, 57, 52, 50, 82, 56, 86, 55, 60, 69, 94, 54, 49, 63, 68, 65, 106, 70, 66, 72, 76, 87, 118, 75, 122, 93, 77, 64, 78, 80, 134, 85, 92, 84
Offset: 1

Views

Author

Keywords

Comments

Every nonprime appears exactly once in this sequence.
If n is a square we can take t=1 and a(n) = n. If n is a prime > 3, then a(n) = 2n and t=3. If n is twice a prime, say p, then a(n) = 3p most of the time. The sequence b_1 < b_2 < ... < b_t will not contain either perfect squares or primes for they bring nothing to the solution. Also I know of no n such that t = 2. - Robert G. Wilson v, Jan 30 2002
Let k be a fixed integer and p be a prime, then a(k*p) = (k+1)*p for sufficiently large p. - Peter Kagey, Feb 03 2015
From David A. Corneth, Oct 26 2016: (Start)
Is for all k*p in A277624, a(k*p) = (k+1) * p?
Conjecture: Let b(n) = A006530(A007913(n)). If b(n)^2 >= 2 * n then a(n) = n + b(n) except for n = 3, 10, and 171.
(End)
a(n) <= A072905(n).
a(n) <= 2*n for all n > 3.
a(n) >= n + A006530(A007913(n)) for all nonsquare n. - Peter Kagey, Feb 21 2015

Examples

			a(2) = 6 because the best such sequence is 2,3,6.
For n = 3 through 6 the {smallest m then smallest t then smallest product} solutions are 3,6,8; 4; 5,8,10; 6,8,12.
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 2nd. ed., Problem 4.39, pages 147, 616, 533. [Reference revised by N. J. A. Sloane, Jan 13 2014]
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Having minimized m, next minimize t, then minimize product: A066400 and A066401 give values of t and square root of b_1*...*b_t.
If squares are omitted we get A233421.
A067565 is the inverse of R. L. Graham's sequence.

Programs

  • Mathematica
    Table[k = 0; Which[IntegerQ@ Sqrt@ n, k, And[PrimeQ@ n, n > 3], k = n, True, While[Length@ Select[n Map[Times @@ # &, n + Rest@ Subsets@ Range@ k], IntegerQ@ Sqrt@ # &] == 0, k++]]; k + n, {n, 40}] (* Michael De Vlieger, Oct 26 2016 *)

Formula

If n is a square we can take t=1 and a(n)=n.
a(n) = A245499(n,A066400(n)). - Reinhard Zumkeller, Jul 25 2014
a(n) = A092487(n) + n. - Peter Kagey, Oct 22 2016

Extensions

More terms from Robert G. Wilson v, Jan 30 2002
Erroneous program (pointed out by Peter Kagey) removed by Reinhard Zumkeller, Nov 28 2014
Showing 1-3 of 3 results.