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

A091263 Inverse permutation to A091023.

Original entry on oeis.org

1, 2, 4, 7, 11, 5, 13, 20, 10, 22, 8, 24, 3, 26, 40, 23, 42, 19, 44, 17, 46, 15, 48, 12, 50, 6, 52, 79, 49, 81, 45, 83, 41, 85, 38, 87, 36, 89, 34, 91, 32, 93, 30, 95, 28, 97, 25, 99, 18, 101, 14, 103, 155, 100, 157, 96, 159, 92, 161, 88, 163, 84, 165, 80, 167, 77, 169, 75
Offset: 1

Views

Author

N. J. A. Sloane, following a suggestion of Leroy Quet, Feb 23 2004

Keywords

Comments

Let S_n be the set of all positive integers except a(1), a(2), ..., a(n-1) and a(n). Let k_n be the number of members of S_n that are less than a(n). (k_n = A091068(n+1).) If k_n >= n, then a(n+1) is the (1+k_n-n)th member of S_n; if k_n < n then a(n+1) is the (k_n+n)th member of S_n. - David Wasserman, Feb 23 2006

Extensions

More terms from John W. Layman, Feb 25 2004

A091052 Record values in A091023.

Original entry on oeis.org

1, 2, 13, 26, 205, 410, 3277, 6554, 52429, 104858, 838861, 1677722, 13421773, 26843546, 214748365, 429496730, 3435973837, 6871947674, 54975581389, 109951162778, 879609302221, 1759218604442, 14073748835533, 28147497671066
Offset: 1

Views

Author

N. J. A. Sloane, Feb 23 2004

Keywords

Crossrefs

Programs

Formula

Add 1 to every term of A077854, then take the terms with indices 4k and 4k+3.
(1/20) [3*4^n - (-4)^n + 2*(-1)^n + 6]. - Ralf Stephan, Dec 02 2004
G.f. -x*(2*x-1)*(1+2*x)^2 / ( (x-1)*(4*x-1)*(4*x+1)*(1+x) ). - R. J. Mathar, Jun 10 2013

Extensions

More terms from David Wasserman, Feb 23 2006

A091053 Where records occur in A091023.

Original entry on oeis.org

1, 2, 3, 6, 9, 21, 33, 78, 129, 309
Offset: 1

Views

Author

N. J. A. Sloane, Feb 23 2004

Keywords

Crossrefs

A110080 a(1) = 1; skipping over integers occurring earlier in the sequence, count down p(n) (p(n) = n-th prime) from a(n) to get a(n+1). If this is <= 0, instead count up from a(n) p(n) positions (skipping already occurring integers) to get a(n+1).

Original entry on oeis.org

1, 3, 6, 11, 2, 16, 29, 10, 32, 4, 39, 70, 31, 75, 27, 80, 20, 87, 17, 94, 9, 97, 176, 91, 183, 81, 188, 77, 193, 73, 198, 57, 203, 50, 206, 38, 209, 28, 216, 22, 223, 12, 226, 417, 222, 422, 219, 435, 202, 440, 199, 445, 190, 448, 177, 455, 169, 462, 166, 469, 161, 472
Offset: 1

Views

Author

Leroy Quet, Oct 12 2005

Keywords

Comments

If we did not skip earlier occurring integers when counting, we would instead have Cald's sequence (A006509).

Examples

			The first 5 terms of the sequence can be plotted on the number line as:
1,2,3,*,*,6,*,*,*,*,11,*,*,*,*,*.
a(5) is 2. Counting p(5) = 11 down from 2 gets a negative integer. So we instead count up 11 positions, skipping the 3, 6 and 11 as we count, to arrive at 16 (which is at the rightmost * of the number line above).
Here is the calculation of the first 6 terms in more detail:
integers i : 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ...
i at n = ... : 1 5 2 . . 3 . . . .. .4 .. .. .. .. .6 ...
prime p used : - 7 2 . . 3 . . . .. .5 .. .. .. .. 11 ...
		

Crossrefs

Cf. A091023, A091263, A006509, A111187 (inverse).

Programs

  • Haskell
    import Data.Set (singleton, member, insert)
    a110080 n = a110080_list !! (n-1)
    a110080_list = 1 : f 1 a000040_list (singleton 1) where
       f x (p:ps) m = y : f y ps (insert y m) where
         y = g x p
         g 0 _ = h x p
         g u 0 = u
         g u v = g (u - 1) (if member (u - 1) m then v else v - 1)
         h u 0 = u
         h u v = h (u + 1) (if member (u + 1) m then v else v - 1)
    -- Reinhard Zumkeller, Sep 02 2014

Extensions

More terms from Klaus Brockhaus and Hans Havermann, Oct 17 2005

A091068 a(0) = 0; for n>0, a(n) = a(n-1) - n if that is >= 0, else a(n) = a(n-1) + n - 1.

Original entry on oeis.org

0, 0, 1, 3, 6, 1, 6, 12, 4, 12, 2, 12, 0, 12, 25, 10, 25, 8, 25, 6, 25, 4, 25, 2, 25, 0, 25, 51, 23, 51, 21, 51, 19, 51, 17, 51, 15, 51, 13, 51, 11, 51, 9, 51, 7, 51, 5, 51, 3, 51, 1, 51, 102, 49, 102, 47, 102, 45, 102, 43, 102, 41, 102, 39, 102, 37, 102, 35, 102, 33
Offset: 0

Views

Author

N. J. A. Sloane, Feb 23 2004

Keywords

Comments

A sequence equivalent to A091023. Let b(k) = A091023(k) for all k. Suppose we have just assigned b(x) = n. Then a(n-1) is the number of b(k) for 1 <= k < x that are not yet assigned.

Examples

			a(4) = 6, 6-5 = 1 >= 0, so a(5) = 1. 1-6 < 0, so a(6) = 1 + 5 = 6.
When in A091023 we assign b(8) = 11, there are 2 unassigned b's to the left, namely b(3) and b(6) and indeed a(10) = 2.
		

Crossrefs

Programs

  • Mathematica
    t={0};Do[AppendTo[t,If[t[[-1]]-n>=0,t[[-1]]-n,t[[-1]]+n-1]],{n,1,69}];t (* Indranil Ghosh, Feb 22 2017 *)
    nxt[{n_,a_}]:={n+1,If[a-n-1>=0,a-n-1,a+n]}; NestList[nxt,{0,0},70][[;;,2]] (* Harvey P. Dale, Jun 14 2023 *)
  • Python
    print("0 0")
    i=1
    a=0
    if a-i>=0:b=a-i
    else:b=a+i-1
    while i<=100:
        print(str(i)+" "+str(b))
        a=b
        i+=1
        if a-i>=0:b=a-i
        else:b=a+i-1 # Indranil Ghosh, Feb 22 2017

Formula

This is a concatenation of blocks: b(-2) = [0], b(-1) = [0], b(0) = [1], b(1) = [3], b(2) = [6 1 6], b(3) = [12 4 12 2 12 0 12], b(4) = [25 10 25 8 25 6 25 4 25 2 25 0 25], ...
Let M(k) be the k-th term of A077854. Then block b(k) for k >= 2 is [M(k), x, M(k), x-2, M(k), x-4, M(k), ..., M(k), 0 or 1, M(k)] where x = M(k-1) - 2. The length of the block is M(k+1) - 2 M(k) + M(k-1) (the second difference of A077854, shifted one place).

A378822 Inverse permutation to A378821.

Original entry on oeis.org

1, 2, 6, 3, 9, 12, 4, 15, 18, 7, 5, 21, 24, 27, 30, 10, 33, 8, 36, 39, 42, 13, 45, 48, 51, 11, 16, 54, 57, 60, 63, 19, 66, 69, 14, 72, 22, 75, 78, 81, 25, 17, 84, 87, 90, 93, 28, 96, 99, 102, 20, 105, 31, 108, 111, 114, 34, 23, 117, 120, 123, 37, 126, 129, 132, 26
Offset: 1

Views

Author

Neal Gersh Tolunsky, Dec 08 2024

Keywords

Examples

			A378821(6) = 3, so a(3) = 6.
		

Crossrefs

Showing 1-6 of 6 results.