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.

A256414 Indices of prime terms in A121217.

Original entry on oeis.org

2, 3, 10, 13, 21, 26, 34, 35, 47, 54, 61, 68, 77, 82, 91, 100, 109, 118, 127, 136, 137, 151, 156, 168, 181, 191, 201, 208, 209, 217, 240, 245, 262, 263, 278, 292, 299, 307, 320, 329, 339, 346, 367, 370, 379, 380, 405, 420, 433, 441, 446, 456, 461, 474, 488
Offset: 1

Views

Author

N. J. A. Sloane, Apr 05 2015

Keywords

Comments

A010051(A121217(a(n))) = 1; conjecture: sequence is strictly increasing. - Reinhard Zumkeller, Apr 05 2015

Crossrefs

Cf. A121217.
Cf. A010051.

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a256414 = (+ 1) . fromJust . (`elemIndex` a121217_list) . a000040
    -- Reinhard Zumkeller, Apr 05 2015

A256419 A121217 smoothed by replacing, for each prime p, the terms equal to either p or 3p with 2p.

Original entry on oeis.org

1, 4, 6, 4, 4, 8, 6, 10, 12, 10, 14, 10, 14, 18, 14, 16, 24, 20, 22, 25, 22, 30, 22, 26, 27, 26, 36, 26, 28, 42, 32, 34, 38, 34, 38, 34, 38, 45, 48, 35, 40, 49, 44, 56, 46, 50, 46, 52, 46, 54, 60, 58, 55, 58, 65, 58, 70, 63, 62, 66, 62, 64, 62, 68, 72, 74, 75, 74, 78, 74, 76, 81
Offset: 1

Views

Author

N. J. A. Sloane, Apr 06 2015

Keywords

Comments

a(n) = A256415(A121217(n)). - Reinhard Zumkeller, Apr 06 2015

Crossrefs

Programs

A256618 Index i such that A121217(i) = n, or 0 if no such i exists.

Original entry on oeis.org

1, 2, 3, 4, 10, 5, 13, 6, 7, 8, 21, 9, 26, 11, 12, 16, 34, 14, 35, 18, 15, 19, 47, 17, 20, 24, 25, 29, 54, 22, 61, 31, 23, 32, 40, 27, 68, 33, 28, 41, 77, 30, 82, 43, 38, 45, 91, 39, 42, 46, 36, 48, 100, 50, 53, 44, 37, 52, 109, 51, 118, 59, 58, 62, 55, 60
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 05 2015

Keywords

Comments

If A121217 is a permutation, as conjectured, then this is the inverse permutation.

Crossrefs

Cf. A121217.

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a256618 = (+ 1) . fromJust . (`elemIndex` a121217_list)

A121216 a(1)=1, a(2) = 2; thereafter a(n) = the smallest positive integer which does not occur earlier in the sequence and which is coprime to a(n-2).

Original entry on oeis.org

1, 2, 3, 5, 4, 6, 7, 11, 8, 9, 13, 10, 12, 17, 19, 14, 15, 23, 16, 18, 21, 25, 20, 22, 27, 29, 26, 24, 31, 35, 28, 32, 33, 37, 34, 30, 39, 41, 38, 36, 43, 47, 40, 42, 49, 53, 44, 45, 51, 46, 50, 55, 57, 48, 52, 59, 61, 54, 56, 65, 67, 58, 60, 63, 71, 62, 64, 69, 73, 68, 66, 75
Offset: 1

Views

Author

Leroy Quet, Aug 20 2006

Keywords

Comments

Permutation of the positive natural numbers with inverse A225047: a(A225047(n)) = A225047(a(n)) = n. - Reinhard Zumkeller, Apr 25 2013
I confirm that this is a permutation. - N. J. A. Sloane, Mar 28 2015 [This can be proved using an argument similar to (but simpler than) the proof in A093714. - N. J. A. Sloane, May 05 2022]

Crossrefs

Programs

  • Haskell
    import Data.List (delete, (\\))
    a121216 n = a121216_list !! (n-1)
    a121216_list = 1 : 2 : f 1 2 [3..] where
    f x y zs = g zs where
      g (u:us) = if gcd x u == 1 then h $ delete u zs else g us where
       h (v:vs) = if gcd y v == 1 then u : v : f u v (zs \\ [u,v]) else h vs
    -- Reinhard Zumkeller, Apr 25 2013
  • Mathematica
    Nest[Append[#, Block[{k = 3}, While[Nand[FreeQ[#, k], GCD[#[[-2]], k] == 1], k++]; k]] &, {1, 2}, 70] (* Michael De Vlieger, Dec 26 2019 *)

Extensions

Extended by Ray Chandler, Aug 22 2006

A270139 a(n)=n when n<=3, otherwise a(n) is the smallest unused positive integer which is not coprime to the two previous terms.

Original entry on oeis.org

1, 2, 3, 6, 9, 12, 15, 10, 5, 20, 25, 30, 35, 14, 7, 21, 28, 18, 4, 8, 16, 22, 24, 26, 32, 34, 36, 38, 40, 42, 44, 33, 11, 55, 66, 45, 27, 39, 48, 51, 54, 57, 60, 63, 56, 49, 70, 77, 84, 88, 46, 50, 52, 58, 62, 64, 68, 72, 74, 76, 78, 80, 65, 75, 85, 90, 95, 100, 105, 96
Offset: 1

Views

Author

Ivan Neretin, Mar 11 2016

Keywords

Comments

Other possible conditions on a(n) with respect to its common factors with a(n-2) and a(n-1) lead to the following:
Coprime to both: A084937.
Coprime to the latter and not the former: A098550.
Coprime to the former and not the latter: with any initial conditions, the sequence "paints itself into a corner", i.e., is finite. With the added condition of a(n) having an extra prime factor not contained in a(n-1), it is A336957.
Coprime to the latter, regardless of the former: simply A000027.
Coprime to the former, regardless of the latter: A121216.
Non-coprime to the latter, regardless of the former: A064413.
Non-coprime to the former, regardless of the latter: A121217.

Examples

			a(12) = 30, a(13) = 35, so a(14) must have common factors (possibly different) with 30 and 35, and the smallest unused number with that property turns out to be 14, so a(14) = 14.
		

Crossrefs

Programs

  • Mathematica
    a = {1, 2, 3}; Do[k = 1; While[(MemberQ[a, k] || GCD[a[[-1]], k] == 1 || GCD[a[[-2]], k] == 1), k++]; AppendTo[a, k], {n, 2, 68}]; a
Showing 1-5 of 5 results.