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.

A099130 Inverse integer permutation to A077220.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Sep 28 2004

Keywords

Crossrefs

Programs

  • PARI
    See Links section.

A257218 Lexicographically earliest sequence of distinct positive integers such that gcd(a(n), a(n-1)) takes no value more than twice.

Original entry on oeis.org

1, 2, 3, 6, 4, 8, 10, 5, 15, 9, 18, 12, 16, 24, 30, 20, 40, 32, 48, 36, 27, 54, 72, 60, 45, 75, 25, 50, 70, 7, 14, 28, 42, 21, 63, 126, 84, 56, 112, 64, 96, 120, 80, 100, 150, 90, 108, 81, 162, 216, 144, 168, 140, 35, 105, 210, 180, 135, 225, 300
Offset: 1

Views

Author

Ivan Neretin, Apr 18 2015

Keywords

Comments

Presumably a(n) is a permutation of the positive integers.
Primes seem to occur in their natural order. 31 appears as a(7060). Primes p >= 37 are not found among the first 10000 terms.
Numbers n such that a(n)=n are 1, 2, 3, 12, 306, ...
A256918(n) = gcd(a(n), a(n+1)); gcd(a(A257120(n)), a(A257120(n)+1)) = gcd(a(A257475(n)), a(A257475(n)-1)) = n. - Reinhard Zumkeller, Apr 25 2015
For p prime: A257122(p)-1 = index of the smallest multiple of p: a(A257122(p)-1) mod p = 0 and a(m) mod p > 0 for m < A257122(p)-1. - Reinhard Zumkeller, Apr 26 2015

Examples

			After a(9)=15, the values 1, 2, 3, 4, 6, and 8 are already used, while 7 is forbidden because gcd(15,7)=1 and that value of GCD has already occurred twice, at (1,2) and (2,3). The minimal value which is neither used not forbidden is 9, so a(10)=9.
		

Crossrefs

Other minimal sequences of distinct positive integers that match some condition imposed on a(n) and a(n-1):
A175498 (differences are unique),
A081145 (absolute differences are unique),
A235262 (bitwise XORs are unique),
A163252 (differ by one bit in binary),
A000027 (GCD=1),
A064413 (GCD>1),
A128280 (sum is a prime),
A034175 (sum is a square),
A175428 (sum is a cube),
A077220 (sum is a triangular number),
A073666 (product plus 1 is a prime),
A081943 (product minus 1 is a prime),
A091569 (product plus 1 is a square),
A100208 (sum of squares is a prime).
Cf. A004526.
Cf. A256918, A257120, A257475, A257478, A257122 (putative inverse).
Cf. also A281978.

Programs

  • Haskell
    import Data.List (delete); import Data.List.Ordered (member)
    a257218 n = a257218_list !! (n-1)
    a257218_list = 1 : f 1 [2..] a004526_list where
       f x zs cds = g zs where
         g (y:ys) | cd `member` cds = y : f y (delete y zs) (delete cd cds)
                  | otherwise       = g ys
                  where cd = gcd x y
    -- Reinhard Zumkeller, Apr 24 2015
  • Mathematica
    a={1}; used=Array[0&,10000]; Do[i=1; While[MemberQ[a,i] || used[[l=GCD[a[[-1]],i]]]>=2, i++]; used[[l]]++; AppendTo[a,i], {n,2,100}]; a (* Ivan Neretin, Apr 18 2015 *)

A382245 Lexicographically earliest sequence of distinct nonnegative integers such that the product of two consecutive terms is always a triangular number (A000217).

Original entry on oeis.org

0, 1, 3, 2, 5, 9, 4, 7, 13, 6, 11, 21, 10, 12, 23, 45, 14, 15, 8, 17, 33, 16, 31, 61, 30, 26, 51, 25, 49, 24, 22, 43, 85, 42, 28, 55, 18, 35, 44, 87, 19, 37, 73, 36, 56, 111, 98, 195, 62, 69, 34, 39, 20, 41, 81, 40, 52, 103, 205, 66, 58, 115, 57, 29, 59, 117
Offset: 0

Views

Author

Rémy Sigrist, Mar 19 2025

Keywords

Comments

This sequence has similarities with A026741: in both sequences, the product of two consecutive terms is always a triangular number; here all terms are distinct, there all products of two consecutive terms are distinct.

Examples

			The initial terms are:
  n   a(n)  a(n)*a(n+1)
  --  ----  ------------------
   0     0     0 = A000217(0)
   1     1     3 = A000217(2)
   2     3     6 = A000217(3)
   3     2    10 = A000217(4)
   4     5    45 = A000217(9)
   5     9    36 = A000217(8)
   6     4    28 = A000217(7)
   7     7    91 = A000217(13)
   8    13    78 = A000217(12)
   9     6    66 = A000217(11)
  10    11   231 = A000217(21)
  11    21   210 = A000217(20)
  12    10   120 = A000217(15)
  13    12   276 = A000217(23)
  14    23  1035 = A000217(45)
  15    45   630 = A000217(35)
		

Crossrefs

Programs

  • PARI
    \\ See Links section.
Showing 1-3 of 3 results.