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-10 of 12 results. Next

A095259 Smallest m such that A095258(m) = n.

Original entry on oeis.org

1, 3, 2, 4, 10, 5, 21, 9, 6, 16, 18, 14, 19, 39, 25, 26, 11, 8, 51, 38, 46, 56, 20, 15, 17, 34, 7, 48, 50, 37, 78, 27, 67, 12, 52, 33, 64, 66, 69, 44, 169, 53, 134, 93, 95, 40, 22, 28, 47, 41, 29, 89, 91, 54, 96, 60, 70, 99, 312, 43, 202, 80, 157, 55, 63, 92, 130, 13
Offset: 1

Views

Author

Reinhard Zumkeller, May 31 2004

Keywords

Comments

Inverse of A095258, if the conjecture is true, that this is a permutation: a(A095258(n)) = A095258(a(n)) = n;
A095261(n) = a(a(n)).

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a095259 = (+ 1) . fromJust . (`elemIndex` a095258_list)
    -- Reinhard Zumkeller, Dec 31 2014

Extensions

Revised version: Reinhard Zumkeller, Dec 31 2014

A253415 Smallest missing number within the first n terms in A095258.

Original entry on oeis.org

2, 4, 5, 5, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 22, 22, 22, 22, 22, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31
Offset: 2

Views

Author

Reinhard Zumkeller, Dec 31 2014

Keywords

Crossrefs

Cf. A095258, A095259, A253425 (run lengths).

Programs

A095260 a(n) = A095258(A095258(n)).

Original entry on oeis.org

1, 2, 3, 4, 9, 8, 32, 11, 18, 6, 25, 26, 99, 34, 235, 5, 15, 17, 68, 94, 27, 49, 241, 243, 24, 10, 102, 28, 19, 10519, 505, 74, 219, 16, 119, 506, 289, 23, 12, 21, 29, 925, 56, 46, 116, 7, 113, 48, 193, 51, 13, 73, 470, 54, 37, 47, 72, 174, 85, 22, 471, 479, 131
Offset: 1

Views

Author

Reinhard Zumkeller, May 31 2004

Keywords

Comments

Integer permutation with inverse A095261: a(A095261(n)) = A095261(a(n)) = n;
A095259(a(n)) = a(A095259(n)) = A095258(n).

Crossrefs

A350928 {Partial sums of A095258} + 2.

Original entry on oeis.org

3, 6, 8, 12, 18, 27, 54, 72, 80, 85, 102, 136, 204, 216, 240, 250, 275, 286, 299, 322, 329, 376, 470, 705, 720, 736, 768, 816, 867, 1156, 1734, 1836, 1872, 1898, 1971, 2190, 2220, 2240, 2254, 2300, 2350, 2820, 2880, 2920, 3066, 3087, 3136, 3164, 3277, 3306, 3325
Offset: 1

Views

Author

Michael De Vlieger, Jan 23 2022

Keywords

Comments

Let A095258(n) = m | a(n) such that m is minimal and distinct in A095258.

Crossrefs

Programs

  • Mathematica
    c[_] = 0; j = c[1] = 1; s = 3; Reap[Do[d = Divisors[s]; k = 1; While[c[d[[k]]] > 0, k++]; Set[k, d[[k]]]; Set[c[k], i]; Sow[s]; j = k; s += k, {i, 2, 52}]][[-1, -1]]

Formula

a(n) = A095258(n) * A350929(n).

A350929 a(n) = A350928(n)/A095258(n).

Original entry on oeis.org

3, 2, 4, 3, 3, 3, 2, 4, 10, 17, 6, 4, 3, 18, 10, 25, 11, 26, 23, 14, 47, 8, 5, 3, 48, 46, 24, 17, 17, 4, 3, 18, 52, 73, 27, 10, 74, 112, 161, 50, 47, 6, 48, 73, 21, 147, 64, 113, 29, 114, 175, 96, 81, 64, 55, 161, 47, 12, 48, 73, 15, 13, 74, 131, 38, 132, 153
Offset: 1

Views

Author

Michael De Vlieger, Jan 23 2022

Keywords

Crossrefs

Programs

  • Mathematica
    c[_] = 0; j = c[1] = 1; s = 3; Reap[Do[d = Divisors[s]; k = 1; While[c[d[[k]]] > 0, k++]; Set[k, d[[k]]]; Set[c[k], i]; Sow[s/j]; j = k; s += k, {i, 2, 68}]][[-1, -1]]

A308751 a(n) = (2 + Sum_{k = 1..n-1} A095258(k)) / A095258(n).

Original entry on oeis.org

2, 1, 3, 2, 2, 2, 1, 3, 9, 16, 5, 3, 2, 17, 9, 24, 10, 25, 22, 13, 46, 7, 4, 2, 47, 45, 23, 16, 16, 3, 2, 17, 51, 72, 26, 9, 73, 111, 160, 49, 46, 5, 47, 72, 20, 146, 63, 112, 28, 113, 174, 95, 80, 63, 54, 160, 46, 11, 47, 72, 14, 12, 73, 130, 37, 131, 152, 51
Offset: 1

Views

Author

Rémy Sigrist, Jun 22 2019

Keywords

Comments

Are there infinitely many 1's in this sequence?

Examples

			a(3) = (2 + A095258(1) + A095258(2)) / A095258(3) = (2 + 1 + 3) / 2 = 3.
		

Crossrefs

Cf. A095258.

Programs

  • PARI
    See Links section.
    
  • Python
    from itertools import islice
    from sympy import divisors
    def A308751_gen(): # generator of terms
        bset, s = {1}, 3
        yield 2
        while True:
            for d in divisors(s):
                if d not in bset:
                    yield s//d
                    bset.add(d)
                    s += d
                    break
    A308751_list = list(islice(A308751_gen(),30)) # Chai Wah Wu, Jan 25 2022

A350741 Records in A095258.

Original entry on oeis.org

1, 3, 4, 6, 9, 27, 34, 68, 94, 235, 289, 578, 799, 1921, 9683, 16021, 27421, 54842, 69301, 138602, 434789, 1787371, 5179771, 5655149, 9653251, 10209853, 20419706, 43184409, 301039141, 611363527, 1274384647, 5084853899, 14906805553, 14946637163, 22591381313, 69291164983
Offset: 1

Views

Author

Michael De Vlieger, Jan 23 2022

Keywords

Crossrefs

Cf. A095258.

Programs

  • Mathematica
    c[_] = 0; j = c[1] = r = 1; s = 3; Prepend[Reap[Do[d = Divisors[s]; k = 1; While[c[d[[k]]] > 0, k++]; Set[k, d[[k]]]; Set[c[k], i]; If[k > r, r = k; Sow[r]]; j = k; s += k, {i, 2, 2100}] ][[-1, -1]], 1]
  • Python
    from itertools import islice
    from sympy import divisors
    def A350741_gen(): # generator of terms
        bset, c, s = {1}, 1, 3
        yield 1
        while True:
            for d in divisors(s):
                if d not in bset:
                    if d > c:
                        yield d
                        c = d
                    bset.add(d)
                    s += d
                    break
    A350741_list = list(islice(A350741_gen(),20)) # Chai Wah Wu, Jan 25 2022

A109890 a(1)=1; for n>1, a(n) is the smallest number not already present which is a divisor or a multiple of a(1)+...+a(n-1).

Original entry on oeis.org

1, 2, 3, 6, 4, 8, 12, 9, 5, 10, 15, 25, 20, 24, 16, 32, 48, 30, 18, 36, 27, 13, 7, 53, 106, 265, 159, 318, 212, 14, 107, 321, 214, 428, 642, 535, 35, 21, 181, 11, 33, 22, 23, 59, 70, 28, 151, 29, 19, 233, 466, 2563, 699, 932, 40, 26, 38, 31, 61, 39, 49, 98, 42
Offset: 1

Views

Author

Amarnath Murthy, Jul 13 2005

Keywords

Comments

Conjectured to be a rearrangement of the natural numbers.
For n>2, a(n) <= a(1)+...+a(n-1). Proof: a(1)+...+a(n-1) >= max { a(i), i=1..n-1}, so a(1)+...+a(n-1) is always a candidate for a(n). QED. So the definition may be changed to: a(1)=1, a(2)=2; for n>2, a(n) is the smallest number not already present which is a divisor of a(1)+...+a(n-1). - N. J. A. Sloane, Nov 05 2005
Except for first two terms, same as A094339. - David Wasserman, Jan 06 2009
A253443(n) = smallest missing number within the first n terms. - Reinhard Zumkeller, Jan 01 2015

Examples

			Let s(n) = A109735(n) = sum(a(1..n)):
.                   | divisors of s(n),
.                   | in brackets when occurring in a(1..n)
.   n | a(n) | s(n) | A027750(s(n),1..A000005(s(n)))
.  ---+------+------+---------------------------------------------------
.   1 |    1 |    1 | (1)
.   2 |    2 |    3 | (1)  3
.   3 |    3 |    6 | (1 2 3)  6
.   4 |    6 |   12 | (1 2 3)  4  (6)  12
.   5 |    4 |   16 | (1 2 4)  8 16
.   6 |    8 |   24 | (1 2 3 4 6 8)  12 24
.   7 |   12 |   36 | (1 2 3 4 6)  9  (12)  18 36
.   8 |    9 |   45 | (1 3)  5  (9)  15 45
.   9 |    5 |   50 | (1 2 5)  10 25 50
.  10 |   10 |   60 | (1 2 3 4 5 6 10 12)  15 20 30 60
.  11 |   15 |   75 | (1 3 5 15)  25 75
.  12 |   25 |  100 | (1 2 4 5 10)  20  (25)  50 100
.  13 |   20 |  120 | (1 2 3 4 5 6 8 10 12 15 20)  24 30 40 60 120
.  14 |   24 |  144 | (1 2 3 4 6 8 9 12)  16 18  (24)  36 48 72 144
.  15 |   16 |  160 | (1 2 4 5 8 10 16 20)  32 40 80 160
.  16 |   32 |  192 | (1 2 3 4 6 8 12 16 24 32)  48 64 96 192
.  17 |   48 |  240 | (.. 8 10 12 15 16 20 24)  30 40  (48)  60 80 120 240
.  18 |   30 |  270 | (1 2 3 5 6 9 10 15)  18 27  (30)  45 54 90 135 270
.  19 |   18 |  288 | (.. 6 8 9 12 16 18 24 32)  36  (48)  72 96 144 288
.  20 |   36 |  324 | (1 2 3 4 6 9 12 18)  27  (36)  54 81 108 162 324
.  21 |   27 |  351 | (1 3 9)  13  (27)  39 117 351
.  22 |   13 |  364 | (1 2 4)  7  (13)  14 26 28 52 91 182 364
.  23 |    7 |  371 | (1 7)  53 371
.  24 |   53 |  424 | (1 2 4 8 53)  106 212 424
.  25 |  106 |  530 | (1 2 5 10 53 106)  265 530  .
- _Reinhard Zumkeller_, Jan 05 2015
		

Crossrefs

Programs

  • Haskell
    import Data.List (insert)
    a109890 n = a109890_list !! (n-1)
    a109890_list = 1 : 2 : 3 : f (4, []) 6 where
       f (m,ys) z = g $ dropWhile (< m) $ a027750_row' z where
         g (d:ds) | elem d ys = g ds
                  | otherwise = d : f (ins [m, m + 1 ..] (insert d ys)) (z + d)
         ins (u:us) vs'@(v:vs) = if u < v then (u, vs') else ins us vs
    -- Reinhard Zumkeller, Jan 02 2015
    
  • Maple
    M:=2000; a:=array(1..M): a[1]:=1: a[2]:=2: as:=convert(a,set): b:=3: for n from 3 to M do t2:=divisors(b) minus as; t4:=sort(convert(t2,list))[1]; a[n]:=t4; b:=b+t4; as:={op(as),t4}; od: aa:=[seq(a[n],n=1..M)]:
  • Mathematica
    a[1] = 1; a[2] = 2; a[n_] := a[n] = Block[{t = Table[a[i], {i, n - 1}]}, s = Plus @@ t; d = Divisors[s]; l = Complement[d, t]; If[l != {}, k = First[l], k = s; While[Position[t, k] == {}, k += s]; k]]; Table[ a[n], {n, 40}] (* Robert G. Wilson v, Aug 12 2005 *)
  • Python
    from sympy import divisors
    A109890_list, s, y, b = [1, 2], 3, 3, set()
    for _ in range(1,10**3):
        for i in divisors(s):
            if i >= y and i not in b:
                A109890_list.append(i)
                s += i
                b.add(i)
                while y in b:
                    b.remove(y)
                    y += 1
                break # Chai Wah Wu, Jan 05 2015

Extensions

More terms from Erich Friedman, Aug 08 2005

A253443 Smallest missing number within the first n terms in A109890.

Original entry on oeis.org

4, 4, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 34, 37, 37, 37, 37, 37
Offset: 4

Views

Author

Reinhard Zumkeller, Jan 01 2015

Keywords

Comments

A253584(n) occurs exactly A253444(n) times.

Crossrefs

Cf. A095258, A095259, A253444 (run lengths), A253584 (range), A253415.

Programs

  • Haskell
    import Data.List (insert)
    a253443 n = a253443_list !! (n-4)
    a253443_list = f (4, []) 6 where
       f (m,ys) z = g $ dropWhile (< m) $ a027750_row' z where
         g (d:ds) | elem d ys = g ds
                  | otherwise = m : f (ins [m, m+1 ..] (insert d ys)) (z + d)
         ins (u:us) vs'@(v:vs) = if u < v then (u, vs') else ins us vs
    -- Reinhard Zumkeller, Jan 03 2015

A095261 A095259(A095259(n)).

Original entry on oeis.org

1, 2, 3, 4, 16, 10, 46, 6, 5, 26, 8, 39, 51, 69, 17, 34, 18, 9, 29, 66, 40, 60, 38, 25, 11, 12, 21, 28, 41, 64, 112, 7, 130, 14, 89, 67, 55, 92, 71, 93, 448, 91, 189, 107, 85, 44, 56, 48, 22, 169, 50, 273, 158, 54, 76, 43, 133, 68, 417, 134, 239, 100, 288, 96, 157
Offset: 1

Views

Author

Reinhard Zumkeller, May 31 2004

Keywords

Comments

Integer permutation with inverse A095260: a(A095260(n))=A095260(a(n))=n;
A095258(a(n))=a(A095258(n))=A095259(n).
Showing 1-10 of 12 results. Next