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

A231330 Table of distinct terms in rows of triangle A230871, in natural order.

Original entry on oeis.org

0, 1, 1, 3, 2, 4, 8, 3, 5, 7, 9, 11, 21, 5, 7, 11, 13, 17, 19, 23, 25, 29, 55, 8, 10, 12, 16, 18, 22, 24, 26, 30, 32, 34, 36, 44, 46, 50, 60, 64, 66, 76, 144, 13, 17, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49, 53, 55, 61, 65, 67, 71, 73, 77, 79, 83, 89, 95
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 07 2013

Keywords

Comments

A230872 gives the union of all rows;
A231335(n) = number of Fibonacci numbers in row n.

Examples

			Initial rows:
.  0:  0;
.  1:  1;
.  2:  1,3;
.  3:  2,4,8                     from A230871(3,*) = [2,2,4,8];
.  4:  3,5,7,9,11,21             from A230871(4,*) = [3,5,3,5,7,9,11,21];
.  5:  5,7,11,13,17,19,23,25,29,55;
.  6:  8,10,12,16,18,22,24,26,30,32,34,36,44,46,50,60,64,66,76,144.
		

Crossrefs

Cf. A231331 (row lengths), A000045 (left edge), A001906 (right edge).

Programs

  • Haskell
    import Data.List (sort, nub)
    a231330 n k = a231330_tabf !! n !! k
    a231330_row n = a231330_tabf !! n
    a231330_tabf = map (sort . nub) a230871_tabf

A230872 Numbers that appear in A230871.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 39, 41, 43, 44, 45, 46, 47, 49, 50, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 79, 80, 81, 82, 83, 85, 87, 89, 91, 92, 93, 94, 95, 97, 98, 99
Offset: 1

Views

Author

N. J. A. Sloane, Nov 07 2013

Keywords

Comments

Union of rows of triangle A231330. - Reinhard Zumkeller, Nov 08 2013

Crossrefs

Cf. A230871, A230873 (complement).

Programs

  • Haskell
    a230872 n = a230872_list !! (n-1)
    a230872_list = f [] a231330_tabf where
       f ws (xs:xss) = us ++ f (merge vs xs) xss where
         (us,vs) = span (< head xs) ws
       merge us [] = us
       merge [] vs = vs
       merge us'@(u:us) vs'@(v:vs)
            | u < v = u : merge us vs'
            | u > v = v : merge us' vs
            | otherwise = u : merge us vs
    -- Reinhard Zumkeller, Nov 08 2013

A231331 Number of distinct terms in row n of triangle A230871.

Original entry on oeis.org

1, 1, 2, 3, 6, 10, 20, 35, 74, 130, 258, 473, 1007, 1830, 3912, 7093, 15233, 27831, 60458, 109555, 239039, 433654, 946849, 1709524, 3746021, 6750928
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 07 2013

Keywords

Comments

Length of row n in triangle A231330.

Crossrefs

Cf. A231335.

Programs

  • Haskell
    a231331 = length . a231330_row
    
  • PARI
    vf(v) = #Set(v);
    lista(nn) = my(va=[0], vb=[1]); print1(vf(va), ", "); print1(vf(vb), ", "); for (n=2, nn, v = vector(2^(n-1), k, j=(k+1)\2; i=(j+1)\2; y=vb[j]; x=va[i]; if (k%2, y+x, 3*y-x)); print1(vf(v), ", "); va = vb; vb = v;); \\ Michel Marcus, Sep 23 2023

Extensions

a(23)-a(25) from Michel Marcus, Sep 23 2023

A231335 Number of distinct Fibonacci numbers in rows of triangle A230871.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 3, 4, 3, 3, 5, 4, 3, 4, 6, 4, 5, 4, 5, 6, 5, 4, 6, 7, 4, 5
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 07 2013

Keywords

Comments

a(n) = Sum_{k=1..A231331(n)} A010056(A231330(n,k));
a(n) > 1 for n > 1.

Examples

			a(0) = #{0} = 1;
a(1) = #{1} = 1;
a(2) = #{1, 3} = 2;
a(3) = #{2, 8} = 2;
a(4) = #{3, 5, 21} = 3;
a(5) = #{5, 13, 55} = 3;
a(6) = #{8, 34, 144} = 3;
a(7) = #{13, 55, 89, 377} = 4;
a(8) = #{21, 233, 987} = 3;
a(9) = #{34, 610, 2584} = 3;
a(10) = #{55, 89, 377, 1597, 6765} = 5;
a(11) = #{89, 377, 4181, 17711} = 4;
a(12) = #{144, 10946, 46368} = 3;
a(13) = #{233, 1597, 28657, 121393} = 4;
a(14) = #{377, 987, 1597, 6765, 75025, 317811} = 6;
a(15) = #{610, 10946, 196418, 832040} = 4;
a(16) = #{987, 4181, 6765, 514229, 2178309} = 5.
		

Crossrefs

Programs

  • Haskell
    a231335 = length . filter ((== 1) . a010056) . a231330_row
    
  • PARI
    isfib(n) = my(k=n^2); k+=(k+1)<<2; issquare(k) || issquare(k-8);
    vf(v) = #select(isfib, Set(v));
    lista(nn) = my(va=[0], vb=[1]); print1(vf(va), ", "); print1(vf(vb), ", "); for (n=2, nn, v = vector(2^(n-1), k, j=(k+1)\2; i=(j+1)\2; y=vb[j]; x=va[i]; if (k%2, y+x, 3*y-x)); print1(vf(v), ", "); va = vb; vb = v;); \\ Michel Marcus, Sep 23 2023

Extensions

a(19)-a(25) from Michel Marcus, Sep 23 2023

A230873 Numbers that do not appear in A230871.

Original entry on oeis.org

6, 14, 15, 20, 28, 38, 40, 42, 48, 51, 52, 54, 72, 78, 84, 86, 88, 90, 96, 102, 103, 108, 110, 113, 114, 120, 124, 125, 126, 127, 132, 138, 150, 156, 162, 164, 168, 174, 180, 197, 198, 204, 210, 216, 220, 222, 224, 228, 236, 238, 245, 248, 250, 252, 258, 262, 270, 276, 279, 285, 286, 295, 298, 304, 306, 310, 315, 316
Offset: 1

Views

Author

N. J. A. Sloane, Nov 07 2013

Keywords

Comments

Complement of A230872.

Crossrefs

Programs

  • Haskell
    a230873 n = a230873_list !! (n-1)
    a230873_list = f [0..] a230872_list where
       f (u:us) vs'@(v:vs) = if u == v then f us vs else u : f us vs'
    -- Reinhard Zumkeller, Nov 08 2013
Showing 1-5 of 5 results.