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

A122281 Inverse permutation to sequence A122280.

Original entry on oeis.org

1, 2, 5, 3, 9, 4, 14, 12, 6, 8, 18, 7, 24, 13, 10, 22, 28, 11, 36, 31, 15, 17, 41, 16, 32, 23, 20, 34, 51, 21, 57, 45, 19, 27, 33, 26, 65, 35, 25, 39, 72, 30, 79, 47, 38, 40, 84, 43, 54, 44, 29, 60, 95, 46, 48, 55, 37, 50, 104, 49, 112, 56, 53, 63, 61, 59, 121, 70, 42, 62, 135
Offset: 1

Views

Author

Leroy Quet, Aug 29 2006

Keywords

Crossrefs

Cf. A122280.

Extensions

Extended by Ray Chandler and Klaus Brockhaus, Aug 30 2006

A122462 a(n) = gcd(b(n-1),b(n)), where b(i) = A122280(i).

Original entry on oeis.org

2, 2, 3, 3, 3, 2, 5, 5, 3, 2, 2, 7, 7, 3, 2, 11, 11, 3, 3, 2, 2, 13, 13, 3, 2, 17, 17, 3, 2, 5, 5, 7, 2, 19, 19, 3, 5, 2, 23, 23, 3, 2, 2, 2, 2, 11, 5, 2, 29, 29, 3, 7, 7, 2, 31, 31, 3, 2, 13, 5, 2, 2, 37, 37, 3, 3, 3, 2, 2, 41, 41, 3, 3, 7, 11, 2, 43, 43, 3, 2, 2, 47, 47, 3, 2, 2, 5, 5, 5, 2, 2, 2
Offset: 3

Views

Author

Klaus Brockhaus, Sep 09 2006

Keywords

Comments

Primes arising in A122280 as greatest common divisor.

Crossrefs

Cf. A122280.

Programs

  • PARI
    {m=100;z=2*m;w=vectorsmall(z);b=1;a=2;w[b]=1;w[a]=1;stop=0;n=3;while(!stop&&n<=m,j=1;while(j<=z&&(w[j]==1||!isprime(p=gcd(a,j))),j++);if(j>z,stop=1,print1(p,",");a=j;w[a]=1;n++))}

A166133 After initial 1,2,4, a(n+1) is the smallest divisor of a(n)^2-1 that has not yet appeared in the sequence.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The initial 1,2,4 provides the smallest example with this rule that is not simply the integers in order, nor (apparently) ends with all divisors of a(n)^2-1 already present.
Apparently the sequence is infinite and includes every positive integer.
Apr 05 2015: John Mason has computed the first ten million terms. See link to zipped file. - N. J. A. Sloane, Apr 06 2015
The sequence contains many runs of incrementing and decrementing values. In the 1200 steps following the 4, there are 136 increments, 706 decrements, and 358 larger steps. What is the limiting distribution for these steps? [Click the "listen" button to appreciate these runs. - N. J. A. Sloane, Apr 03 2015]
After 3, 198, 270, 570, 522, 600, 822, and 882, we have a(n+1) = a(n)^2-1. Does this happen infinitely often? Cf. A256406, A256407.
A256543 gives numbers m such that a(m+1) = a(m)-1 or a(m+1) = a(m)+1. - Reinhard Zumkeller, Apr 01 2015
If this is a permutation, then A255833 is the inverse permutation. - M. F. Hasler, Apr 01 2015
a(A256703(n)+1) = a(A256703(n))^2 - 1. - Reinhard Zumkeller, Apr 08 2015
For n > 3: a(n) = A027750(a(n-1)^2-1, A256751(n)). - Reinhard Zumkeller, Apr 09 2015

Examples

			After a(24) = 22, the divisors of 22^2-1 = 483 are 1, 3, 7, 21, 23, 69, 161, and 483; 1, 3, 7, 21, and 23 have already occurred, so a(25) = 69.
		

Crossrefs

For records see A256403, A256404.
Smallest missing numbers: A256405, A256408, A256409.
Cf. A256541 (first differences), A256543.
Inverse (conjectured): A255833.
Cf. A256564 (smallest prime factors), A244080 (largest prime factors), A256578 (largest proper divisors), A256542 (number of divisors).
Upper envelope: the sequence of pairs (A256422(n),A256423(n)).
Cf. A256703.
Cf. A256751.

Programs

  • Haskell
    import Data.List (delete); import Data.List.Ordered (isect)
    a166133 n = a166133_list !! (n-1)
    a166133_list = 1 : 2 : 4 : f (3:[5..]) 4 where
       f zs x = y : f (delete y zs) y where
                y = head $ isect (a027750_row' (x ^ 2 - 1)) zs
    -- Reinhard Zumkeller, Apr 01 2015
  • Mathematica
    s = {1, 2, 4}; e = 4; Do[d = Divisors[e^2 - 1]; i = 1;
    While[MemberQ[s, d[[i]]], i++]; e = d[[i]]; AppendTo[s, e], {19997}]; s (* Hans Havermann, Apr 03 2015 *)
  • PARI
    al(n,m=4,u=6)={local(ds,db);
    u=bitor(u,1<
    				

A354225 Lexicographically earliest sequence of distinct positive integers such that a(1) = 1 and for any n > 1, n / gcd(n, a(n)) and a(n) / gcd(n, a(n)) are prime.

Original entry on oeis.org

1, 3, 2, 6, 7, 4, 5, 12, 15, 14, 13, 8, 11, 10, 9, 24, 19, 27, 17, 28, 33, 26, 29, 16, 35, 22, 18, 20, 23, 42, 37, 48, 21, 38, 25, 54, 31, 34, 51, 56, 43, 30, 41, 52, 63, 58, 53, 32, 77, 70, 39, 44, 47, 36, 65, 40, 69, 46, 61, 84, 59, 74, 45, 96, 55, 78, 71
Offset: 1

Views

Author

Rémy Sigrist, May 20 2022

Keywords

Comments

This sequence is a self-inverse permutation of the positive integers that preserves the number of prime divisors (with or without multiplicity).

Examples

			The first terms are:
  n   a(n)  g=gcd(n, a(n))  n/g  a(n)/g
  --  ----  --------------  ---  ------
   1     1               1    1       1
   2     3               1    2       3
   3     2               1    3       2
   4     6               2    2       3
   5     7               1    5       7
   6     4               2    3       2
   7     5               1    7       5
   8    12               4    2       3
   9    15               3    3       5
  10    14               2    5       7
  11    13               1   11      13
  12     8               4    3       2
  13    11               1   13      11
  14    10               2    7       5
		

Crossrefs

Cf. A122280.

Programs

Formula

a(prime(2*n)) = prime(2*n-1) (where prime(n) denotes the n-th prime number).
Showing 1-4 of 4 results.