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 10 results.

A048204 a(n) = T(n+1,n), array T given by A048201.

Original entry on oeis.org

2, 6, 11, 19, 29, 43, 58, 74, 95, 117, 142, 168, 196, 229, 263, 298, 334, 372, 412, 454, 500, 548, 597, 647, 700, 757, 817, 879, 943, 1008, 1078, 1155, 1235, 1316, 1399, 1484, 1570, 1660, 1751, 1843, 1943, 2047, 2154, 2262, 2378, 2497, 2621, 2748, 2880, 3013
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Python
    from itertools import count, accumulate, islice
    from collections import deque
    def A048204_gen(): # generator of terms
        aset, alist, c = {1}, deque([1]), 0
        for k in count(2):
            if k in aset:
                aset.remove(k)
            else:
                yield (c:=c+k)
                aset |= set(k+d for d in accumulate(alist))
                alist.appendleft(k)
    A048204_list = list(islice(A048204_gen(),50)) # Chai Wah Wu, Sep 01 2025

Formula

a(n) = A004978(n+2) - 2. - Sean A. Irvine, Jun 05 2021

A048202 a(n)=T(n,2), array T given by A048201.

Original entry on oeis.org

3, 6, 9, 13, 18, 24, 29, 31, 37, 43, 47, 51, 54, 61, 67, 69, 71, 74, 78, 82, 88, 94, 97, 99, 103, 110, 117, 122, 126, 129, 135, 147, 157, 161, 164, 168, 171, 176, 181, 183, 192, 204, 211, 215, 224, 235, 243, 251, 259, 265, 270, 278
Offset: 2

Views

Author

Keywords

Crossrefs

Programs

  • Python
    from itertools import count, accumulate, islice
    from collections import deque
    def A048202_gen(): # generator of terms
        aset, alist = {1}, deque([1])
        for k in count(2):
            if k in aset:
                aset.remove(k)
            else:
                yield k+alist[0]
                aset |= set(k+d for d in accumulate(alist))
                alist.appendleft(k)
    A048202_list = (list(islice(A048202_gen(),52))) # Chai Wah Wu, Sep 02 2025

Formula

a(n) = A002048(n) + A002048(n+1). [Gerald Hillier, Oct 04 2008]

A048205 a(n)=T(n+2,n), array T given by A048201.

Original entry on oeis.org

4, 9, 17, 27, 41, 56, 72, 93, 115, 140, 166, 194, 227, 261, 296, 332, 370, 410, 452, 498, 546, 595, 645, 698, 755, 815, 877, 941, 1006, 1076, 1153, 1233, 1314, 1397, 1482, 1568, 1658, 1749, 1841, 1941, 2045, 2152, 2260, 2376
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A004978.

Programs

  • Python
    from itertools import count, accumulate, islice
    from collections import deque
    def A048205_gen(): # generator of terms
        aset, alist, c = {1,3}, deque([2,1]), 0
        for k in count(3):
            if k in aset:
                aset.remove(k)
            else:
                yield (c:=c+k)
                aset |= set(k+d for d in accumulate(alist))
                alist.appendleft(k)
    A048205_list = list(islice(A048205_gen(),50)) # Chai Wah Wu, Sep 02 2025

Formula

a(n) = A004978(n+3) - 4. - Sean A. Irvine, Jun 05 2021

A048206 a(n)=least m such that row m of T contains n, array T given by A048201.

Original entry on oeis.org

1, 2, 2, 3, 4, 3, 3, 5, 4, 6, 4, 4, 5, 7, 8, 9, 5, 6, 5, 5, 10, 11, 6, 7, 12, 13, 6, 14, 6, 6, 9, 7, 15, 16, 17, 18, 7, 19, 8, 20, 7, 21, 7, 7, 9, 22, 8, 23, 24, 25, 13, 8, 26, 14, 9, 8, 27, 8, 8, 28, 15, 29, 9, 30, 31, 10, 16, 9, 17, 32, 18, 9, 13, 9, 9
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • PARI
    See Links section.

A048208 a(n) = T(2n-1,n), array T given by A048201.

Original entry on oeis.org

1, 6, 17, 37, 63, 98, 139, 186, 240, 298, 359, 431, 505, 589, 683, 779, 892, 1018, 1150, 1288, 1431, 1593, 1762, 1949, 2151, 2366, 2591, 2823, 3061, 3304, 3557, 3820, 4095, 4367, 4645, 4930, 5222, 5530, 5851, 6176, 6517, 6868, 7222, 7582, 7952, 8331, 8710
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Python
    from itertools import count, accumulate, islice
    from collections import deque
    def A048208_gen(): # generator of terms
        aset, alist, b, blist, c = set(), deque(), 1, [], 0
        for k in count(1):
            if k in aset:
                aset.remove(k)
            else:
                if c&1:
                    yield b-blist[c>>1]
                aset |= set(k+d for d in accumulate(alist))
                alist.appendleft(k)
                blist.append(b)
                b += k
                c += 1
    A048208_list = list(islice(A048208_gen(),47)) # Chai Wah Wu, Sep 02 2025

Formula

a(n) = A004978(2*n) - A004978(n). - Sean A. Irvine, Jun 05 2021

Extensions

More terms from Sean A. Irvine, Jun 05 2021

A048210 T(n,1) + T(n,n), array T given by A048201.

Original entry on oeis.org

2, 5, 11, 17, 28, 40, 58, 74, 91, 117, 140, 168, 195, 225, 263, 298, 334, 371, 411, 453, 497, 547, 597, 647, 698, 754, 815, 878, 942, 1008, 1074, 1149, 1233, 1316, 1398, 1483, 1570, 1657, 1751, 1843, 1936, 2044, 2152, 2262, 2371
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Python
    from itertools import count, accumulate, islice
    from collections import deque
    def A048210_gen(): # generator of terms
        aset, alist, c = set(), deque(), 0
        for k in count(1):
            if k in aset:
                aset.remove(k)
            else:
                yield (c:=c+k)+k
                aset |= set(k+d for d in accumulate(alist))
                alist.appendleft(k)
    A048210_list = list(islice(A048210_gen(),45)) # Chai Wah Wu, Sep 02 2025

Formula

a(n) = 2*A004978(n+1) - A004978(n) - 1. - Sean A. Irvine, Jun 05 2021

A048203 a(n)=T(n,3), array T given by A048201.

Original entry on oeis.org

7, 11, 17, 23, 32, 39, 45, 52, 59, 68, 73, 79, 87, 95, 102, 105, 109, 114, 120, 128, 136, 143, 147, 152, 160, 170, 179, 186, 191, 199, 212, 227, 238, 244, 249, 254, 261, 267, 273, 283, 296, 311, 319, 331, 343, 359, 370, 383, 392
Offset: 3

Views

Author

Keywords

A048207 a(n)=least m such that column m of T that contains n, array T given by A048201.

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 3, 1, 2, 1, 3, 4, 2, 1, 1, 1, 3, 2, 4, 5, 1, 1, 3, 2, 1, 1, 4, 1, 5, 6, 2, 3, 1, 1, 1, 1, 4, 1, 3, 1, 5, 1, 6, 7, 3, 1, 4, 1, 1, 1, 2, 5, 1, 2, 4, 6, 1, 7, 8, 1, 2, 1, 5, 1, 1, 4, 2, 6, 2, 1, 2, 7, 3, 8, 9, 5, 1, 2, 3, 1, 1, 2, 1, 6, 1, 1, 3, 5, 7, 1
Offset: 1

Views

Author

Keywords

A048209 a(n)=Sum{T(n,j): j=1,2,...,n}, array T given by A048201.

Original entry on oeis.org

1, 5, 17, 37, 77, 137, 235, 355, 499, 709, 951, 1251, 1589, 1981, 2476, 3020, 3615, 4263, 4985, 5785, 6667, 7679, 8783, 9959, 11209, 12587, 14126, 15806, 17604, 19524, 21539, 23779, 26320, 29040, 31875, 34863, 38008, 41276
Offset: 1

Views

Author

Keywords

A004978 a(n) = least integer m > a(n-1) such that m - a(n-1) != a(j) - a(k) for all j, k less than n; a(1) = 1, a(2) = 2.

Original entry on oeis.org

1, 2, 4, 8, 13, 21, 31, 45, 60, 76, 97, 119, 144, 170, 198, 231, 265, 300, 336, 374, 414, 456, 502, 550, 599, 649, 702, 759, 819, 881, 945, 1010, 1080, 1157, 1237, 1318, 1401, 1486, 1572, 1662, 1753, 1845, 1945, 2049, 2156, 2264, 2380, 2499, 2623, 2750, 2882
Offset: 1

Views

Author

N. J. A. Sloane. This was in the 1973 "Handbook", but was then dropped from the database. Resubmitted by Clark Kimberling. Entry revised by N. J. A. Sloane, Jun 10 2012

Keywords

Comments

Equivalently, if S(n) = { a(j) - a(k); n > j > k > 0 }, then a(n) = a(n-1) + M where M = min( {1, 2, 3, ...} \ S(n) ) is the smallest positive integer not in S(n). - M. F. Hasler, Jun 26 2019

Examples

			From _M. F. Hasler_, Jun 26 2019: (Start)
After a(1) = 1, a(2) = 2, we have a(3) = least m > a(2) such that m - a(2) = m - 2 is not in { a(j) - a(k); 1 <= k < j < 3 } = { a(2) - a(1) } = { 1 }. Thus we must have m - 2 = 2, whence m = 4.
The next term a(4) is the least m > a(3) such that m - a(3) = m - 4 is not in { a(j) - a(k); 1 <= k < j < 4 } = { 1, 4 - 2 = 2, 4 - 1 = 3 }, i.e., m = 4 + 4 = 8.
The next term a(5) is the least m > a(4) such that m - a(4) = m - 8 is not in { a(j) - a(k); 1 <= k < j < 5 } = { 1, 2, 3, 8 - 4 = 4, 8 - 2 = 6, 8 - 1 = 7 }, i.e., m = 5 + 8 = 13. (End)
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

Crossrefs

Differences give A002048, see also A048201.
See also A001856.
For n>2, a(n) equals A002049(n-1)+1 and A048204(n-2)+2.

Programs

  • MATLAB
    s=1:2000^2;d(1)=1;A004978(1)=1;A004978(2)=2;
    for n=3:2000
      A004978(n)=A004978(n-1)+find([d,0]~=s(1:max(size(d))+1),1);
      d(end+1:end+n-1)=A004978(n)-A004978(1:n-1);
      d=sort(unique(d));
    end
    % Nathaniel Johnston, Feb 09 2011
    
  • PARI
    A004978_vec(N,a=[1..N],S=[1])={for(n=3,N,a[n]=a[n-1]+S[1]+1;S=setunion(S,select(t->t>S[1],vector(n-1,k,a[n]-a[n-k])));for(k=1,#S-1, if(S[k+1]-S[k]>1, S=S[k..-1];next(2)));S[#S]==#S&&S=[#S]);a} \\ M. F. Hasler, Jun 26 2019
    
  • Python
    from itertools import count, accumulate, islice
    from collections import deque
    def A004978_gen(): # generator of terms
        aset, alist, c = set(), deque(), 1
        for k in count(1):
            if k in aset:
                aset.remove(k)
            else:
                yield c
                aset |= set(k+d for d in accumulate(alist))
                alist.appendleft(k)
                c += k
    A004978_list = list(islice(A004978_gen(),20)) # Chai Wah Wu, Sep 01 2025

Extensions

Definition corrected by Bryan S. Robinson, Mar 16 2006
Name edited by M. F. Hasler, Jun 26 2019
Showing 1-10 of 10 results.