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 30 results. Next

A317686 a(1) = a(2) = 1; for n >= 3, a(n) = a(t(n)) + a(n-t(n)) where t = A063882.

Original entry on oeis.org

1, 1, 2, 3, 3, 4, 5, 5, 6, 7, 7, 8, 8, 9, 10, 11, 12, 12, 12, 13, 14, 15, 15, 16, 16, 17, 18, 19, 20, 20, 21, 21, 22, 22, 23, 24, 25, 26, 27, 27, 27, 27, 28, 29, 29, 30, 31, 32, 33, 33, 34, 35, 36, 36, 36, 37, 38, 38, 39, 40, 41, 41, 42, 42, 43, 44, 45, 46, 46, 47, 48, 49, 49, 49, 49, 50, 51
Offset: 1

Views

Author

Altug Alkan, Aug 04 2018

Keywords

Comments

This sequence hits every positive integer and it has a fractal-like structure, see scatterplot of 2*n-3*a(n) in Links section.
Let b(1) = b(2) = b(3) = b(4) = 1; for n >= 5, b(n) = b(t(n)) + b(n-t(n)) where t = A063882. Observe the symmetric relation between this sequence (a(n)) and b(n) thanks to plots of a(n)-2*n/3 and b(n)-n/3 in Links section. Note that a(n) + b(n) = n for n >= 2.

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<5, 1,
          b(n-b(n-1)) +b(n-b(n-4)))
        end:
    a:= proc(n) option remember; `if`(n<3, 1,
          a(b(n)) +a(n-b(n)))
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Aug 05 2018
  • Mathematica
    b[n_] := b[n] = If[n < 5, 1, b[n - b[n - 1]] + b[n - b[n - 4]]];
    a[n_] := a[n] = If[n < 3, 1, a[b[n]] + a[n - b[n]]];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Mar 02 2022, after Alois P. Heinz *)
  • PARI
    t=vector(99); t[1]=t[2]=t[3]=t[4]=1; for(n=5, #t, t[n] = t[n-t[n-1]]+t[n-t[n-4]]); a=vector(99); a[1]=a[2]=1; for(n=3, #a, a[n] = a[t[n]]+a[n-t[n]]); a

Formula

a(n+1) - a(n) = 0 or 1 for all n >= 1.

A132157 a(n) = number of times n occurs in A063882.

Original entry on oeis.org

4, 1, 1, 1, 2, 2, 1, 2, 2, 1, 3, 2, 1, 2, 2, 1, 3, 2, 1, 2, 2, 3, 2, 1, 2, 2, 2, 1, 3, 2, 1, 2, 2, 3, 2, 1, 2, 2, 2, 1, 3, 2, 2, 3, 2, 1, 2, 2, 2, 1, 3, 2, 2, 1, 2, 2, 2, 3, 2, 1, 2, 2, 2, 1, 3, 2, 2, 3, 2, 1, 2, 2, 2, 1, 3, 2, 2, 1, 2, 2, 2, 3, 2, 1, 3, 2, 2, 3, 2, 1, 2, 2, 2, 1, 3, 2, 2, 1, 2
Offset: 1

Views

Author

N. J. A. Sloane, Nov 06 2007

Keywords

Comments

a(A202016(n)) = 1. [Reinhard Zumkeller, Dec 08 2011]

Programs

  • Haskell
    import Data.List (group)
    a132157 n = a132157_list !! (n-1)
    a132157_list = (map length) (group a063882_list)
    -- Reinhard Zumkeller, Dec 08 2011

A202016 Numbers occurring only once in A063882.

Original entry on oeis.org

2, 3, 4, 7, 10, 13, 16, 19, 24, 28, 31, 36, 40, 46, 50, 54, 60, 64, 70, 74, 78, 84, 90, 94, 98, 104, 107, 110, 114, 118, 122, 126, 132, 138, 142, 146, 152, 155, 158, 162, 166, 172, 178, 182, 186, 192, 195, 198, 202, 206, 212, 216, 219, 224, 227, 234, 238
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 08 2011

Keywords

Comments

A132157(a(n)) = 1.

Programs

  • Haskell
    import Data.List (elemIndices)
    a202016 n = a202016_list !! (n-1)
    a202016_list = map (+ 1) $ elemIndices 1 a132157_list

A132174 Index of starting position of n-th generation of terms in A063882.

Original entry on oeis.org

1, 5, 10, 21, 44, 92, 189, 385, 778, 1565, 3141, 6294, 12602, 25219, 50454, 100926, 201871, 403763, 807548, 1615119, 3230263, 6460552, 12921132, 25842293, 51684616, 103369264, 206738561, 413477157, 826954350, 1653908737, 3307817513, 6615635066, 13231270174
Offset: 1

Views

Author

N. J. A. Sloane, Nov 07 2007

Keywords

Programs

  • Python
    from _future_ import division
    def A132174(n):
        if n == 1:
            return 1
        if n == 2:
            return 5
        h, m = divmod(n - 3, 5)
        return (382*2**(5*h + m)-10*2**m)//31- 7*h - m -(1 if m==3 else (-1 if m==4 else 2)) # Chai Wah Wu, May 17 2017

Formula

From Chai Wah Wu, May 17 2017: (Start)
a(n) = 3*a(n-1) - 2*a(n-2) + a(n-5) - 3*a(n-6) + 2*a(n-7) for n > 8.
G.f.: x*(-5*x^7 + x^6 - x^5 - x^4 - x^3 + 3*x^2 - 2*x - 1)/((x - 1)^2*(2*x - 1)*(x^4 + x^3 + x^2 + x + 1)). (End)

Extensions

More terms from Chai Wah Wu, May 17 2017

A202014 Smallest m such that A063882(m) = n.

Original entry on oeis.org

1, 5, 6, 7, 8, 10, 12, 13, 15, 17, 18, 21, 23, 24, 26, 28, 29, 32, 34, 35, 37, 39, 42, 44, 45, 47, 49, 51, 52, 55, 57, 58, 60, 62, 65, 67, 68, 70, 72, 74, 75, 78, 80, 82, 85, 87, 88, 90, 92, 94, 95, 98, 100, 102, 103, 105, 107, 109, 112, 114, 115, 117, 119
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 08 2011

Keywords

Comments

A063882(a(n)) = n and A063882(m) < n for m < a(n).

Programs

  • Haskell
    import Data.List (elemIndex)
    import Data.Maybe (fromJust)
    a202014 n = (fromJust $ elemIndex n a063882_list) + 1

A319020 Let b_i(k) = 1 for k <= i; for n > i, b_i(n) = b_i(t(n)) + b_i(n-t(n)) where t = A063882. a(n) = 3*b_2(n)-2*n if n is even, a(n) = 3*b_4(n)-n if n is odd.

Original entry on oeis.org

2, -1, 0, 1, 1, 0, -1, -1, 0, 1, 1, 0, 2, -1, 0, 1, -2, 0, 2, -1, 0, 1, 1, 0, 2, -1, 0, 1, -2, 0, -1, -1, 0, -2, 1, 0, -1, 2, -3, 1, 1, -3, 2, -1, 3, -2, 1, 0, -1, -1, 0, 1, -2, 0, 2, -1, 0, -2, 1, 0, -1, -1, 0, -2, 1, 0, -1, 2, 0, 1, -2, 3, -1, -1, 3, -2, 1, -3, 2, -1, 0, 1, -2, 0, 2, -4, 3, -2, 4, -3, 2, -1, 0, -2
Offset: 1

Views

Author

Altug Alkan, Sep 08 2018

Keywords

Crossrefs

Programs

  • PARI
    t=f=g=vector(200); t[1]=t[2]=t[3]=t[4]=1; for(n=5, #t, t[n] = t[n-t[n-1]]+t[n-t[n-4]]); f[1]=f[2]=1; for(n=3, #f, f[n] = f[t[n]]+f[n-t[n]]); g[1]=g[2]=g[3]=g[4]=1; for(n=5, #g, g[n] = g[t[n]]+g[n-t[n]]); vector(200, n, if(n%2==0, 3*f[n]-2*n,3*g[n]-n))

A129632 Partial sums of A063882.

Original entry on oeis.org

1, 2, 3, 4, 6, 9, 13, 18, 23, 29, 35, 42, 50, 58, 67, 76, 86, 97, 108, 119, 131, 143, 156, 170, 184, 199, 214, 230, 247, 264, 281, 299, 317, 336, 356, 376, 397, 418, 440, 462, 484, 507, 530, 554, 579, 604, 630, 656, 683, 710, 738, 767, 796, 825, 855, 885, 916, 948, 980, 1013
Offset: 1

Views

Author

Gary W. Adamson, Nov 08 2007

Keywords

A132175 Index of end of n-th generation of terms in A063882.

Original entry on oeis.org

4, 9, 20, 43, 91, 188, 384, 777, 1564, 3140, 6293, 12601, 25218, 50453, 100925, 201870, 403762, 807547
Offset: 1

Views

Author

N. J. A. Sloane, Nov 07 2007

Keywords

A132176 Value of A063882 at start of n-th generation of terms.

Original entry on oeis.org

1, 2, 6, 12, 24, 49, 98, 197, 394, 788, 1577, 3154, 6309, 12618, 25236, 50473, 100946, 201893
Offset: 1

Views

Author

N. J. A. Sloane, Nov 07 2007

Keywords

A132177 Value of A063882 at end of n-th generation of terms.

Original entry on oeis.org

1, 5, 11, 23, 48, 97, 196, 393, 787, 1576, 3153, 6308, 12617, 25235, 50472, 100945, 201892, 403785
Offset: 1

Views

Author

N. J. A. Sloane, Nov 07 2007

Keywords

Showing 1-10 of 30 results. Next