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

A011185 A B_2 sequence: a(n) = least value such that sequence increases and pairwise sums of distinct elements are all distinct.

Original entry on oeis.org

1, 2, 3, 5, 8, 13, 21, 30, 39, 53, 74, 95, 128, 152, 182, 212, 258, 316, 374, 413, 476, 531, 546, 608, 717, 798, 862, 965, 1060, 1161, 1307, 1386, 1435, 1556, 1722, 1834, 1934, 2058, 2261, 2497, 2699, 2874, 3061, 3197, 3332, 3629, 3712, 3868, 4140, 4447, 4640
Offset: 1

Views

Author

Keywords

Comments

a(n) = least positive integer > a(n-1) and not equal to a(i)+a(j)-a(k) for distinct i and j with 1 <= i,j,k <= n-1. [Comment corrected by Jean-Paul Delahaye, Oct 02 2020.]

Crossrefs

Programs

  • Python
    from itertools import islice
    def agen(): # generator of terms
        aset, sset, k = set(), set(), 0
        while True:
            k += 1
            while any(k+an in sset for an in aset): k += 1
            yield k; sset.update(k+an for an in aset); aset.add(k)
    print(list(islice(agen(), 51))) # Michael S. Branicky, Feb 05 2023

Formula

a(n) = A010672(n-1)+1.

A003663 a(n) is smallest number != a(j) + a(k), j < k and a(1) = 1, a(2) = 6.

Original entry on oeis.org

1, 6, 8, 10, 12, 15, 17, 19, 24, 26, 28, 33, 35, 37, 42, 44, 46, 51, 53, 55, 60, 62, 64, 69, 71, 73, 78, 80, 82, 87, 89, 91, 96, 98, 100, 105, 107, 109, 114, 116, 118, 123, 125, 127, 132, 134, 136, 141, 143, 145, 150, 152, 154, 159, 161, 163, 168, 170, 172, 177, 179
Offset: 1

Views

Author

Keywords

Comments

Numbers congruent to {1, 6, 8} mod 9 plus the number 12.

References

  • R. K. Guy, "s-Additive sequences", preprint, 1994.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Magma
    I:=[1,6,8,10,12,15,17,19,24]; [n le 9 select I[n] else Self(n-1)+Self(n-3)-Self(n-4): n in [1..70]]; // Vincenzo Librandi, Feb 22 2018
  • Mathematica
    f[s_List, j_Integer] := Block[{k = s[[-1]] + 1, ss = Union[Plus @@@ Subsets[s, {j}]]}, While[ MemberQ[ss, k], k++]; Append[s, k]]; Nest[ f[#, 2] &, {1, 6}, 65] (* Robert G. Wilson v, Jul 05 2014 *)
    LinearRecurrence[{1,0,1,-1},{1,6,8,10,12,15,17,19,24},70] (* Harvey P. Dale, Jul 25 2018 *)

Formula

From Chai Wah Wu, Feb 21 2018: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n > 9.
G.f.: x*(2*x^8 + x^5 - 3*x^4 + x^3 + 2*x^2 + 5*x + 1)/(x^4 - x^3 - x + 1). (End)

Extensions

Name clarified by David A. Corneth, Mar 13 2023

A075123 a(n) is the least positive integer > a(n-1) and a(n) is not 2*a(i)+a(j) for 1<=i

Original entry on oeis.org

1, 2, 3, 6, 9, 14, 17, 22, 25, 30, 33, 38, 41, 46, 49, 54, 57, 62, 65, 70, 73, 78, 81, 86, 89, 94, 97, 102, 105, 110, 113, 118, 121, 126, 129, 134, 137, 142, 145, 150, 153, 158, 161, 166, 169, 174, 177, 182, 185, 190, 193, 198, 201, 206, 209, 214, 217, 222, 225, 230
Offset: 1

Views

Author

Floor van Lamoen, Sep 02 2002

Keywords

Comments

a(n) = A047452(n-2) for n > 3 because of first formula. - Georg Fischer, Oct 19 2018

Crossrefs

Programs

  • Mathematica
    Join[{1,2,3},Table[4n-10-Mod[n,2],{n,4,60}]] (* or *)
    LinearRecurrence[ {1,1,-1},{1,2,3,6,9,14},60] (* Harvey P. Dale, Oct 28 2012 *)
  • Python
    def A075123(n): return (n-2<<2)-2-(n&1) if n>3 else n # Chai Wah Wu, Mar 30 2024

Formula

a(n) = 4n - 10 - (n mod 2), for n>3. - Ralf Stephan, Nov 16 2004
a(n) = a(n-1) + a(n-2) - a(n-3) for n > 3. - Harvey P. Dale, Oct 28 2012
G.f.: x*(1+x+2*x^3+2*x^4+2*x^5)/((1+x)*(1-x)^2). - Georg Fischer, May 15 2019

A075122 a(n) = least positive integer > a(n-1) and not a(i)+2*a(j) for 1<=i

Original entry on oeis.org

1, 2, 3, 4, 6, 12, 17, 18, 19, 20, 21, 22, 23, 24, 29, 31, 32, 33, 34, 73, 94, 96, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137
Offset: 1

Views

Author

Floor van Lamoen, Sep 02 2002

Keywords

Crossrefs

A168068 Array T(n,k) read by antidiagonals: T(n,2k+1) = 2k+1. T(n,2k) = 2^n*k.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 0, 1, 2, 3, 0, 1, 4, 3, 2, 0, 1, 8, 3, 4, 5, 0, 1, 16, 3, 8, 5, 3, 0, 1, 32, 3, 16, 5, 6, 7, 0, 1, 64, 3, 32, 5, 12, 7, 4, 0, 1, 128, 3, 64, 5, 24, 7, 8, 9, 0, 1, 256, 3, 128, 5, 48, 7, 16, 9, 5, 0, 1, 512, 3, 256, 5, 96, 7, 32, 9, 10, 11, 0, 1, 1024, 3, 512, 5, 192, 7, 64, 9, 20, 11, 6, 0, 1, 2048, 3, 1024, 5
Offset: 0

Views

Author

Paul Curtz, Nov 18 2009

Keywords

Comments

The array is constructed multiplying the even-indexed A026741(k) by 2^n, and keeping the odd-indexed A026471(k) as they are.
Connections to the hydrogen spectrum: The squares of the second row are T(1,k)^2 = A001477(k)^2 = A000290(k) which are the denominators of the Lyman lines (see A171522). The squares of the row T(2,k) are in A154615, denominators of the Balmer series. Row T(3,k) is related to A106833 and A061038.

Examples

			The array starts in row n=0 with columns k>=0 as:
0,1,1,3,2,5,3,7,4, A026741
0,1,2,3,4,5,6,7,8, A001477
0,1,4,3,8,5,12,7,16, A022998
0,1,8,3,16,5,24,7,32, A144433
0,1,16,3,32,5,48,7,64,
0,1,32,3,64,5,96,7,128,
		

Programs

  • Maple
    A168068 := proc(n,k) if type(k,'odd') then k; else 2^(n-1)*k ; end if; end proc: # R. J. Mathar, Jan 22 2011

A244750 0-additive sequence: a(n) is the smallest number larger than a(n-1) which is not the sum of any subset of earlier terms, with initial values {0, 2, 3, 4}.

Original entry on oeis.org

0, 2, 3, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144
Offset: 1

Views

Author

Keywords

Examples

			a(5) cannot be 5=2+3. It cannot be 6=2+4. It cannot be 7=3+4, and becomes a(5)=8.
a(6) cannot be 9=2+3+4. It cannot be 10=2+8. It cannot be 11=3+8. It cannot be 12 = 4+8. It cannot be 13=2+3+8. It cannot be 14=2+4+8. It cannot be 15=3+4+8, and becomes a(6)=16.
		

References

  • R. K. Guy, "s-Additive sequences," preprint, 1994.

Crossrefs

Programs

  • Maple
    A244750:= proc(n)
        option remember;
        if n <= 4 then
            op(n,[0,2,3,4]);
        else
            prev := {seq(procname(k),k=1..n-1)} ;
            for a from procname(n-1)+1 do
                awrks := true ;
                for asub in combinat[choose](prev) do
                    if add(p,p=asub) = a then
                        awrks := false;
                        break;
                    end if;
                end do:
                if awrks then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    for n from 1 do
        print(A244750(n)) ;
    end do: # R. J. Mathar, Jul 12 2014
  • Mathematica
     f[s_List] := f[n] = Block[{k = s[[-1]] + 1, ss = Union[Plus @@@ Subsets[s]]}, While[ MemberQ[ss, k], k++]; Append[s, k]]; Nest[ f[#] &, {0, 2, 3, 4}, 16]

Extensions

Corrected by R. J. Mathar, Jul 12 2014

A026475 a(1)=1, a(2)=3, otherwise a(n) = least positive integer > a(n-1) and not a(i) + a(j) + a(k) for 1 <= i < j < k <= n.

Original entry on oeis.org

1, 3, 4, 5, 6, 7, 19, 20, 21, 22, 36, 37, 38, 39, 53, 54, 55, 69, 70, 71, 72, 86, 87, 88, 102, 103, 104, 105, 119, 120, 121, 135, 136, 137, 138, 152, 153, 154, 168, 169, 170, 171, 185, 186, 187, 201, 202, 203, 204, 218, 219, 220, 234, 235, 236, 237, 251, 252, 253
Offset: 1

Views

Author

Keywords

Comments

Without specifying a(2)=3, a(2) would be 2 and sequence would be A026471. - Robert Israel, Aug 27 2018

Crossrefs

Cf. A026471.

Programs

  • Maple
    1, 3, 4, 5, 6, 7, 19, seq(op([20, 21, 22, 36, 37, 38, 39]+k*[33$7]),k=0..10); # Robert Israel, Aug 30 2018
  • Mathematica
    LinearRecurrence[{1,0,0,0,0,0,1,-1},{1,3,4,5,6,7,19,20,21,22,36,37,38,39,53},60] (* Harvey P. Dale, Jan 04 2022 *)
  • PARI
    Vec(x*(1 + 2*x + x^2 + x^3 + x^4 + x^5 + 12*x^6 - x^8 + 13*x^10 - 11*x^13 + 13*x^14) / ((1 - x)^2*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6)) + O(x^40)) \\ Colin Barker, Oct 10 2019

Formula

a(n+7) = a(n) + 33 for n >= 8. - Robert Israel, Aug 27 2018
From Colin Barker, Oct 10 2019: (Start)
G.f.: x*(1 + 2*x + x^2 + x^3 + x^4 + x^5 + 12*x^6 - x^8 + 13*x^10 - 11*x^13 + 13*x^14) / ((1 - x)^2*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6)).
a(n) = a(n-1) + a(n-7) - a(n-8) for n>15.
(End)

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Sep 25 2000

A244749 0-additive sequence: a(n) is the smallest number larger than a(n-1) that is not the sum of any subset of earlier terms, starting with initial values {2, 5}.

Original entry on oeis.org

2, 5, 6, 9, 10, 28, 29, 85, 86, 256, 257, 769, 770, 2308, 2309, 6925, 6926, 20776, 20777, 62329, 62330, 186988, 186989, 560965, 560966, 1682896, 1682897, 5048689, 5048690, 15146068, 15146069, 45438205, 45438206, 136314616, 136314617, 408943849, 408943850, 1226831548, 1226831549
Offset: 1

Views

Author

Keywords

Comments

This sequence differs from A003664.

Examples

			The numbers 11-27 are not in the sequence since some combination of the previous terms add to it. example 17=2+5+10.
The number 28 however is a term since no combination of the previous terms cannot be found which sum to 28.
		

References

  • R. K. Guy, "s-Additive sequences," preprint, 1994.

Crossrefs

Programs

  • Mathematica
    f[s_List] := f[n] = Block[{k = s[[-1]] + 1, ss = Union[ Plus @@@ Subsets[s]]}, While[ MemberQ[ss, k], k++]; Append[s, k]]; Nest[ f[#] &, {2, 5}, 20] (* or *)
    b = LinearRecurrence[{4, -3}, {9, 28}, 18]; Join[{2, 5, 6}, Riffle[b, b + 1]]
    Join[{2, 5, 6},LinearRecurrence[{-1, 3, 3},{9, 10, 28},36]] (* Ray Chandler, Aug 03 2015 *)
  • PARI
    Vec(x*(7*x^5+14*x^4+6*x^3-5*x^2-7*x-2)/((x+1)*(3*x^2-1)) + O(x^100)) \\ Colin Barker, Jul 11 2014

Formula

a(2n) = 4a(2n - 2) - 3a(2n - 4) and a(2n +1) = a(2n) +1, for n>2.
a(n) = -a(n-1) + 3*a(n-2) + 3*a(n-3) for n>6. - Colin Barker, Jul 11 2014
G.f.: x*(7*x^5+14*x^4+6*x^3-5*x^2-7*x-2) / ((x+1)*(3*x^2-1)). - Colin Barker, Jul 11 2014
Showing 1-8 of 8 results.